From 3b2c8a4d36f7adb6581e62acd1c7fbce36c5d46f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 24 Mar 2026 14:29:36 +0530 Subject: [PATCH 001/192] added schema for presence api --- app/config/collections/projects.php | 147 ++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index b41e8f0fd5..653d0e21bc 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2754,4 +2754,151 @@ return [ ], ], ], + // to track connected users via realtime + // TODO: check we need expiry or not so that we ttl the user + 'presence' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('presence'), + 'name' => 'Presence', + 'attributes' => [ + [ + '$id' => ID::custom('userInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('userId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ] + ], + 'indexes' => [ + [ + '$id' => ID::custom('_unique_userId'), + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['userId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ] + ] + ], + + // event logs + 'presenceLogs' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('presenceLogs'), + 'name' => 'Presence Logs', + 'attributes' => [ + [ + '$id' => ID::custom('userInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('userId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + // permissions must be sorted before md5 conversion to have deterministic hashes + [ + '$id' => ID::custom('perms_md5'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('expiry'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, // TODO: needed a default value + 'array' => false, + 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('status'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('source'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'array' => false, + 'filters' => [], + ], + // TODO: check the usecase and apply it + [ + '$id' => ID::custom('hostname'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('metadata'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 65535, + 'signed' => true, + 'required' => false, + 'default' => new \stdClass(), + 'array' => false, + 'filters' => ['json'], + ], + ], + 'indexes' => [ + [ + '$id' => ID::custom('_unique_userId_perms'), + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['userId','perms_md5'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ] + ] + ] ]; From 467b2a92812e79a4e7982f47d707bf0f5f63acfd Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 25 Mar 2026 18:39:49 +1300 Subject: [PATCH 002/192] (feat): Increase databases.database attribute size to 2048 --- app/config/collections/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index b41e8f0fd5..d3521ee9ca 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -64,7 +64,7 @@ return [ [ '$id' => ID::custom('database'), 'type' => Database::VAR_STRING, - 'size' => 128, + 'size' => 2048, 'required' => false, 'signed' => true, 'array' => false, From 11fc170d7268f52efb9033791bfcbc4717208c8e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 25 Mar 2026 22:53:03 +1300 Subject: [PATCH 003/192] (docs): Add documentsdb and vectorsdb reference docs --- docs/references/documentsdb/create-operations.md | 1 + docs/references/documentsdb/create-transaction.md | 1 + docs/references/documentsdb/delete-transaction.md | 1 + docs/references/documentsdb/get-transaction.md | 1 + docs/references/documentsdb/list-transactions.md | 1 + docs/references/documentsdb/update-transaction.md | 1 + docs/references/vectorsdb/create-collection.md | 1 + docs/references/vectorsdb/create-document.md | 1 + docs/references/vectorsdb/create-documents.md | 1 + docs/references/vectorsdb/create-index.md | 2 ++ docs/references/vectorsdb/create-operations.md | 1 + docs/references/vectorsdb/create-transaction.md | 1 + docs/references/vectorsdb/create.md | 1 + docs/references/vectorsdb/decrement-document-attribute.md | 1 + docs/references/vectorsdb/delete-collection.md | 1 + docs/references/vectorsdb/delete-document.md | 1 + docs/references/vectorsdb/delete-documents.md | 1 + docs/references/vectorsdb/delete-index.md | 1 + docs/references/vectorsdb/delete-transaction.md | 1 + docs/references/vectorsdb/delete.md | 1 + docs/references/vectorsdb/get-collection-logs.md | 1 + docs/references/vectorsdb/get-collection-usage.md | 1 + docs/references/vectorsdb/get-collection.md | 1 + docs/references/vectorsdb/get-database-usage.md | 1 + docs/references/vectorsdb/get-document-logs.md | 1 + docs/references/vectorsdb/get-document.md | 1 + docs/references/vectorsdb/get-index.md | 1 + docs/references/vectorsdb/get-logs.md | 1 + docs/references/vectorsdb/get-transaction.md | 1 + docs/references/vectorsdb/get.md | 1 + docs/references/vectorsdb/increment-document-attribute.md | 1 + docs/references/vectorsdb/list-attributes.md | 1 + docs/references/vectorsdb/list-collections.md | 1 + docs/references/vectorsdb/list-documents.md | 1 + docs/references/vectorsdb/list-indexes.md | 1 + docs/references/vectorsdb/list-transactions.md | 1 + docs/references/vectorsdb/list-usage.md | 1 + docs/references/vectorsdb/list.md | 1 + docs/references/vectorsdb/update-collection.md | 1 + docs/references/vectorsdb/update-document.md | 1 + docs/references/vectorsdb/update-documents.md | 1 + docs/references/vectorsdb/update-transaction.md | 1 + docs/references/vectorsdb/update.md | 1 + docs/references/vectorsdb/upsert-document.md | 1 + docs/references/vectorsdb/upsert-documents.md | 1 + 45 files changed, 46 insertions(+) create mode 100644 docs/references/documentsdb/create-operations.md create mode 100644 docs/references/documentsdb/create-transaction.md create mode 100644 docs/references/documentsdb/delete-transaction.md create mode 100644 docs/references/documentsdb/get-transaction.md create mode 100644 docs/references/documentsdb/list-transactions.md create mode 100644 docs/references/documentsdb/update-transaction.md create mode 100644 docs/references/vectorsdb/create-collection.md create mode 100644 docs/references/vectorsdb/create-document.md create mode 100644 docs/references/vectorsdb/create-documents.md create mode 100644 docs/references/vectorsdb/create-index.md create mode 100644 docs/references/vectorsdb/create-operations.md create mode 100644 docs/references/vectorsdb/create-transaction.md create mode 100644 docs/references/vectorsdb/create.md create mode 100644 docs/references/vectorsdb/decrement-document-attribute.md create mode 100644 docs/references/vectorsdb/delete-collection.md create mode 100644 docs/references/vectorsdb/delete-document.md create mode 100644 docs/references/vectorsdb/delete-documents.md create mode 100644 docs/references/vectorsdb/delete-index.md create mode 100644 docs/references/vectorsdb/delete-transaction.md create mode 100644 docs/references/vectorsdb/delete.md create mode 100644 docs/references/vectorsdb/get-collection-logs.md create mode 100644 docs/references/vectorsdb/get-collection-usage.md create mode 100644 docs/references/vectorsdb/get-collection.md create mode 100644 docs/references/vectorsdb/get-database-usage.md create mode 100644 docs/references/vectorsdb/get-document-logs.md create mode 100644 docs/references/vectorsdb/get-document.md create mode 100644 docs/references/vectorsdb/get-index.md create mode 100644 docs/references/vectorsdb/get-logs.md create mode 100644 docs/references/vectorsdb/get-transaction.md create mode 100644 docs/references/vectorsdb/get.md create mode 100644 docs/references/vectorsdb/increment-document-attribute.md create mode 100644 docs/references/vectorsdb/list-attributes.md create mode 100644 docs/references/vectorsdb/list-collections.md create mode 100644 docs/references/vectorsdb/list-documents.md create mode 100644 docs/references/vectorsdb/list-indexes.md create mode 100644 docs/references/vectorsdb/list-transactions.md create mode 100644 docs/references/vectorsdb/list-usage.md create mode 100644 docs/references/vectorsdb/list.md create mode 100644 docs/references/vectorsdb/update-collection.md create mode 100644 docs/references/vectorsdb/update-document.md create mode 100644 docs/references/vectorsdb/update-documents.md create mode 100644 docs/references/vectorsdb/update-transaction.md create mode 100644 docs/references/vectorsdb/update.md create mode 100644 docs/references/vectorsdb/upsert-document.md create mode 100644 docs/references/vectorsdb/upsert-documents.md diff --git a/docs/references/documentsdb/create-operations.md b/docs/references/documentsdb/create-operations.md new file mode 100644 index 0000000000..a737b95a55 --- /dev/null +++ b/docs/references/documentsdb/create-operations.md @@ -0,0 +1 @@ +Create multiple operations in a single transaction. \ No newline at end of file diff --git a/docs/references/documentsdb/create-transaction.md b/docs/references/documentsdb/create-transaction.md new file mode 100644 index 0000000000..fdf369a789 --- /dev/null +++ b/docs/references/documentsdb/create-transaction.md @@ -0,0 +1 @@ +Create a new transaction. \ No newline at end of file diff --git a/docs/references/documentsdb/delete-transaction.md b/docs/references/documentsdb/delete-transaction.md new file mode 100644 index 0000000000..f1395c228f --- /dev/null +++ b/docs/references/documentsdb/delete-transaction.md @@ -0,0 +1 @@ +Delete a transaction by its unique ID. \ No newline at end of file diff --git a/docs/references/documentsdb/get-transaction.md b/docs/references/documentsdb/get-transaction.md new file mode 100644 index 0000000000..41900f7468 --- /dev/null +++ b/docs/references/documentsdb/get-transaction.md @@ -0,0 +1 @@ +Get a transaction by its unique ID. \ No newline at end of file diff --git a/docs/references/documentsdb/list-transactions.md b/docs/references/documentsdb/list-transactions.md new file mode 100644 index 0000000000..9a63d9f04a --- /dev/null +++ b/docs/references/documentsdb/list-transactions.md @@ -0,0 +1 @@ +List transactions across all databases. \ No newline at end of file diff --git a/docs/references/documentsdb/update-transaction.md b/docs/references/documentsdb/update-transaction.md new file mode 100644 index 0000000000..d9d5f45439 --- /dev/null +++ b/docs/references/documentsdb/update-transaction.md @@ -0,0 +1 @@ +Update a transaction, to either commit or roll back its operations. \ No newline at end of file diff --git a/docs/references/vectorsdb/create-collection.md b/docs/references/vectorsdb/create-collection.md new file mode 100644 index 0000000000..c6293a4c38 --- /dev/null +++ b/docs/references/vectorsdb/create-collection.md @@ -0,0 +1 @@ +Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/vectorsdb/create-document.md b/docs/references/vectorsdb/create-document.md new file mode 100644 index 0000000000..197744b4a0 --- /dev/null +++ b/docs/references/vectorsdb/create-document.md @@ -0,0 +1 @@ +Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/vectorsdb/create-documents.md b/docs/references/vectorsdb/create-documents.md new file mode 100644 index 0000000000..9f4a4a1396 --- /dev/null +++ b/docs/references/vectorsdb/create-documents.md @@ -0,0 +1 @@ +Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/vectorsdb/create-index.md b/docs/references/vectorsdb/create-index.md new file mode 100644 index 0000000000..164b754161 --- /dev/null +++ b/docs/references/vectorsdb/create-index.md @@ -0,0 +1,2 @@ +Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. +Attributes can be `key`, `fulltext`, and `unique`. \ No newline at end of file diff --git a/docs/references/vectorsdb/create-operations.md b/docs/references/vectorsdb/create-operations.md new file mode 100644 index 0000000000..a737b95a55 --- /dev/null +++ b/docs/references/vectorsdb/create-operations.md @@ -0,0 +1 @@ +Create multiple operations in a single transaction. \ No newline at end of file diff --git a/docs/references/vectorsdb/create-transaction.md b/docs/references/vectorsdb/create-transaction.md new file mode 100644 index 0000000000..fdf369a789 --- /dev/null +++ b/docs/references/vectorsdb/create-transaction.md @@ -0,0 +1 @@ +Create a new transaction. \ No newline at end of file diff --git a/docs/references/vectorsdb/create.md b/docs/references/vectorsdb/create.md new file mode 100644 index 0000000000..b608485341 --- /dev/null +++ b/docs/references/vectorsdb/create.md @@ -0,0 +1 @@ +Create a new Database. diff --git a/docs/references/vectorsdb/decrement-document-attribute.md b/docs/references/vectorsdb/decrement-document-attribute.md new file mode 100644 index 0000000000..b7b32d6148 --- /dev/null +++ b/docs/references/vectorsdb/decrement-document-attribute.md @@ -0,0 +1 @@ +Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/vectorsdb/delete-collection.md b/docs/references/vectorsdb/delete-collection.md new file mode 100644 index 0000000000..90f7aa6aa5 --- /dev/null +++ b/docs/references/vectorsdb/delete-collection.md @@ -0,0 +1 @@ +Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/vectorsdb/delete-document.md b/docs/references/vectorsdb/delete-document.md new file mode 100644 index 0000000000..36fbf6802d --- /dev/null +++ b/docs/references/vectorsdb/delete-document.md @@ -0,0 +1 @@ +Delete a document by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/delete-documents.md b/docs/references/vectorsdb/delete-documents.md new file mode 100644 index 0000000000..a7b05503de --- /dev/null +++ b/docs/references/vectorsdb/delete-documents.md @@ -0,0 +1 @@ +Bulk delete documents using queries, if no queries are passed then all documents are deleted. \ No newline at end of file diff --git a/docs/references/vectorsdb/delete-index.md b/docs/references/vectorsdb/delete-index.md new file mode 100644 index 0000000000..c5b8f49e5f --- /dev/null +++ b/docs/references/vectorsdb/delete-index.md @@ -0,0 +1 @@ +Delete an index. \ No newline at end of file diff --git a/docs/references/vectorsdb/delete-transaction.md b/docs/references/vectorsdb/delete-transaction.md new file mode 100644 index 0000000000..f1395c228f --- /dev/null +++ b/docs/references/vectorsdb/delete-transaction.md @@ -0,0 +1 @@ +Delete a transaction by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/delete.md b/docs/references/vectorsdb/delete.md new file mode 100644 index 0000000000..605fa290d3 --- /dev/null +++ b/docs/references/vectorsdb/delete.md @@ -0,0 +1 @@ +Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-collection-logs.md b/docs/references/vectorsdb/get-collection-logs.md new file mode 100644 index 0000000000..8578cef03c --- /dev/null +++ b/docs/references/vectorsdb/get-collection-logs.md @@ -0,0 +1 @@ +Get the collection activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-collection-usage.md b/docs/references/vectorsdb/get-collection-usage.md new file mode 100644 index 0000000000..48682a075f --- /dev/null +++ b/docs/references/vectorsdb/get-collection-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-collection.md b/docs/references/vectorsdb/get-collection.md new file mode 100644 index 0000000000..97b39e8474 --- /dev/null +++ b/docs/references/vectorsdb/get-collection.md @@ -0,0 +1 @@ +Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-database-usage.md b/docs/references/vectorsdb/get-database-usage.md new file mode 100644 index 0000000000..2c2628a464 --- /dev/null +++ b/docs/references/vectorsdb/get-database-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-document-logs.md b/docs/references/vectorsdb/get-document-logs.md new file mode 100644 index 0000000000..9b96df5ad4 --- /dev/null +++ b/docs/references/vectorsdb/get-document-logs.md @@ -0,0 +1 @@ +Get the document activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-document.md b/docs/references/vectorsdb/get-document.md new file mode 100644 index 0000000000..4e4d76bec0 --- /dev/null +++ b/docs/references/vectorsdb/get-document.md @@ -0,0 +1 @@ +Get a document by its unique ID. This endpoint response returns a JSON object with the document data. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-index.md b/docs/references/vectorsdb/get-index.md new file mode 100644 index 0000000000..cdea5b4f27 --- /dev/null +++ b/docs/references/vectorsdb/get-index.md @@ -0,0 +1 @@ +Get index by ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-logs.md b/docs/references/vectorsdb/get-logs.md new file mode 100644 index 0000000000..8e49da4603 --- /dev/null +++ b/docs/references/vectorsdb/get-logs.md @@ -0,0 +1 @@ +Get the database activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/get-transaction.md b/docs/references/vectorsdb/get-transaction.md new file mode 100644 index 0000000000..41900f7468 --- /dev/null +++ b/docs/references/vectorsdb/get-transaction.md @@ -0,0 +1 @@ +Get a transaction by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/get.md b/docs/references/vectorsdb/get.md new file mode 100644 index 0000000000..24183f6f6b --- /dev/null +++ b/docs/references/vectorsdb/get.md @@ -0,0 +1 @@ +Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. \ No newline at end of file diff --git a/docs/references/vectorsdb/increment-document-attribute.md b/docs/references/vectorsdb/increment-document-attribute.md new file mode 100644 index 0000000000..7a19b3fbc7 --- /dev/null +++ b/docs/references/vectorsdb/increment-document-attribute.md @@ -0,0 +1 @@ +Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/vectorsdb/list-attributes.md b/docs/references/vectorsdb/list-attributes.md new file mode 100644 index 0000000000..72ad6d727f --- /dev/null +++ b/docs/references/vectorsdb/list-attributes.md @@ -0,0 +1 @@ +List attributes in the collection. \ No newline at end of file diff --git a/docs/references/vectorsdb/list-collections.md b/docs/references/vectorsdb/list-collections.md new file mode 100644 index 0000000000..e437674915 --- /dev/null +++ b/docs/references/vectorsdb/list-collections.md @@ -0,0 +1 @@ +Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/vectorsdb/list-documents.md b/docs/references/vectorsdb/list-documents.md new file mode 100644 index 0000000000..4e2ae91792 --- /dev/null +++ b/docs/references/vectorsdb/list-documents.md @@ -0,0 +1 @@ +Get a list of all the user's documents in a given collection. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/vectorsdb/list-indexes.md b/docs/references/vectorsdb/list-indexes.md new file mode 100644 index 0000000000..a8c687fb2b --- /dev/null +++ b/docs/references/vectorsdb/list-indexes.md @@ -0,0 +1 @@ +List indexes in the collection. \ No newline at end of file diff --git a/docs/references/vectorsdb/list-transactions.md b/docs/references/vectorsdb/list-transactions.md new file mode 100644 index 0000000000..9a63d9f04a --- /dev/null +++ b/docs/references/vectorsdb/list-transactions.md @@ -0,0 +1 @@ +List transactions across all databases. \ No newline at end of file diff --git a/docs/references/vectorsdb/list-usage.md b/docs/references/vectorsdb/list-usage.md new file mode 100644 index 0000000000..a88e76680e --- /dev/null +++ b/docs/references/vectorsdb/list-usage.md @@ -0,0 +1 @@ +List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/vectorsdb/list.md b/docs/references/vectorsdb/list.md new file mode 100644 index 0000000000..d93fb9d7a8 --- /dev/null +++ b/docs/references/vectorsdb/list.md @@ -0,0 +1 @@ +Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/vectorsdb/update-collection.md b/docs/references/vectorsdb/update-collection.md new file mode 100644 index 0000000000..b8f6bef997 --- /dev/null +++ b/docs/references/vectorsdb/update-collection.md @@ -0,0 +1 @@ +Update a collection by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/update-document.md b/docs/references/vectorsdb/update-document.md new file mode 100644 index 0000000000..526f3971d1 --- /dev/null +++ b/docs/references/vectorsdb/update-document.md @@ -0,0 +1 @@ +Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/vectorsdb/update-documents.md b/docs/references/vectorsdb/update-documents.md new file mode 100644 index 0000000000..5f560c6435 --- /dev/null +++ b/docs/references/vectorsdb/update-documents.md @@ -0,0 +1 @@ +Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/vectorsdb/update-transaction.md b/docs/references/vectorsdb/update-transaction.md new file mode 100644 index 0000000000..d9d5f45439 --- /dev/null +++ b/docs/references/vectorsdb/update-transaction.md @@ -0,0 +1 @@ +Update a transaction, to either commit or roll back its operations. \ No newline at end of file diff --git a/docs/references/vectorsdb/update.md b/docs/references/vectorsdb/update.md new file mode 100644 index 0000000000..4e99bf2e07 --- /dev/null +++ b/docs/references/vectorsdb/update.md @@ -0,0 +1 @@ +Update a database by its unique ID. \ No newline at end of file diff --git a/docs/references/vectorsdb/upsert-document.md b/docs/references/vectorsdb/upsert-document.md new file mode 100644 index 0000000000..f1b68d13d5 --- /dev/null +++ b/docs/references/vectorsdb/upsert-document.md @@ -0,0 +1 @@ +Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/vectorsdb/upsert-documents.md b/docs/references/vectorsdb/upsert-documents.md new file mode 100644 index 0000000000..4feb473076 --- /dev/null +++ b/docs/references/vectorsdb/upsert-documents.md @@ -0,0 +1 @@ +Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. From fdca14e6594d45addec925a7d74081e561561658 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 7 Apr 2026 23:45:59 +1200 Subject: [PATCH 004/192] (feat): precomputed guage write in stats resources --- src/Appwrite/Event/StatsResources.php | 44 ++++++++++++++++++- .../Platform/Workers/StatsResources.php | 39 ++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Event/StatsResources.php b/src/Appwrite/Event/StatsResources.php index 07f23feda8..42259f76b9 100644 --- a/src/Appwrite/Event/StatsResources.php +++ b/src/Appwrite/Event/StatsResources.php @@ -9,6 +9,18 @@ class StatsResources extends Event { protected bool $critical = false; + /** + * Pre-computed gauge metric snapshots to write to the stats collection. When non-empty, + * the StatsResources worker takes the fast path: it writes these directly via + * upsertDocuments (replace semantics) and skips the standard counting work. + * + * Each entry is a tuple of (metric key, value). The worker writes one stats document per + * (metric, period) tuple using the project's region. + * + * @var array + */ + protected array $gauges = []; + public function __construct(protected Publisher $publisher) { parent::__construct($publisher); @@ -18,6 +30,35 @@ class StatsResources extends Event ->setClass(System::getEnv('_APP_STATS_RESOURCES_CLASS_NAME', Event::STATS_RESOURCES_CLASS_NAME)); } + /** + * Set the full set of pre-computed gauge metrics for this message. Replaces any + * previously-set gauges. + * + * @param array $gauges + */ + public function setGauges(array $gauges): self + { + $this->gauges = $gauges; + return $this; + } + + /** + * Append a single pre-computed gauge metric to this message. + */ + public function addGauge(string $metric, int $value): self + { + $this->gauges[] = ['metric' => $metric, 'value' => $value]; + return $this; + } + + /** + * @return array + */ + public function getGauges(): array + { + return $this->gauges; + } + /** * Prepare the payload for the usage event. * @@ -26,7 +67,8 @@ class StatsResources extends Event protected function preparePayload(): array { return [ - 'project' => $this->project + 'project' => $this->project, + 'gauges' => $this->gauges, ]; } } diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index b2823d3722..e0947ed244 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -79,9 +79,48 @@ class StatsResources extends Action // Reset documents for each job $this->documents = []; + $gauges = $payload['gauges'] ?? []; + if (!empty($gauges)) { + $this->writeGauges($getLogsDB, $project, $gauges); + return; + } + $this->countForProject($dbForPlatform, $getLogsDB, $getProjectDB, $getDatabasesDB, $project); } + /** + * Write a batch of pre-computed gauge metrics to the logs database for one project. + * + * Builds (1h, 1d, inf) period documents for each metric using the existing + * createStatsDocuments helper, then commits via writeDocuments — same code path the + * standard counting flow uses, just with externally-supplied values. + * + * @param callable $getLogsDB + * @param Document $project + * @param array $gauges + */ + protected function writeGauges(callable $getLogsDB, Document $project, array $gauges): void + { + $region = $project->getAttribute('region', ''); + + foreach ($gauges as $gauge) { + $metric = $gauge['metric'] ?? ''; + if ($metric === '') { + continue; + } + $value = (int) ($gauge['value'] ?? 0); + $this->createStatsDocuments($region, $metric, $value); + } + + if ($this->documents === []) { + return; + } + + /** @var \Utopia\Database\Database $dbForLogs */ + $dbForLogs = call_user_func($getLogsDB, $project); + $this->writeDocuments($dbForLogs, $project); + } + protected function countForProject(Database $dbForPlatform, callable $getLogsDB, callable $getProjectDB, callable $getDatabasesDB, Document $project): void { /** @var \Utopia\Database\Database $dbForLogs */ From c6f16cde4a3ce83cec783c4f18e6e4680c622c50 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 11:44:01 +0530 Subject: [PATCH 005/192] updated schema --- app/config/collections/projects.php | 106 ++++++++++++---------------- 1 file changed, 46 insertions(+), 60 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 653d0e21bc..8379f5bb8e 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2754,48 +2754,9 @@ return [ ], ], ], - // to track connected users via realtime - // TODO: check we need expiry or not so that we ttl the user - 'presence' => [ - '$collection' => ID::custom(Database::METADATA), - '$id' => ID::custom('presence'), - 'name' => 'Presence', - 'attributes' => [ - [ - '$id' => ID::custom('userInternalId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => true, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - [ - '$id' => ID::custom('userId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ] - ], - 'indexes' => [ - [ - '$id' => ID::custom('_unique_userId'), - 'type' => Database::INDEX_UNIQUE, - 'attributes' => ['userId'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], - ] - ] - ], - // event logs + // Naming it presenceLogs as later it might be only be used as a presence events table only and not for the actual presence + // TODO: check between var_string and var_id => userInternalId, userId(they can be null as well in case of guest login) 'presenceLogs' => [ '$collection' => ID::custom(Database::METADATA), '$id' => ID::custom('presenceLogs'), @@ -2803,7 +2764,7 @@ return [ 'attributes' => [ [ '$id' => ID::custom('userInternalId'), - 'type' => Database::VAR_STRING, + 'type' => Database::VAR_ID, 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, @@ -2814,19 +2775,7 @@ return [ ], [ '$id' => ID::custom('userId'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], - // permissions must be sorted before md5 conversion to have deterministic hashes - [ - '$id' => ID::custom('perms_md5'), - 'type' => Database::VAR_STRING, + 'type' => Database::VAR_ID, 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, @@ -2867,7 +2816,7 @@ return [ 'array' => false, 'filters' => [], ], - // TODO: check the usecase and apply it + // TODO: the current pod? Shall we make it the region? instead of the hostname? So that when its restarted it can delete all the presence? [ '$id' => ID::custom('hostname'), 'type' => Database::VAR_STRING, @@ -2891,13 +2840,50 @@ return [ 'filters' => ['json'], ], ], + // TODO: shall we create the perms_md5 now only for the upsertion based on perms_md5 or later via patch script? + // permissions must be sorted before md5 conversion to have deterministic hashes 'indexes' => [ [ - '$id' => ID::custom('_unique_userId_perms'), - 'type' => Database::INDEX_UNIQUE, - 'attributes' => ['userId','perms_md5'], + '$id' => ID::custom('_key_userId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['userId'], 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], + 'orders' => [Database::ORDER_ASC] + ], + [ + '$id' => ID::custom('_key_userInternal'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['userInternalId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC] + ], + [ + '$id' => ID::custom('_key_expiry'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['expiry'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC] + ], + [ + '$id' => ID::custom('_key_status'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['status'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC] + ], + [ + '$id' => ID::custom('_key_source'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['source'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC] + ], + [ + '$id' => ID::custom('_key_source_status'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['source', 'status'], + 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC] ] ] ] From 01c6cc86cebc9df2005ce22c0cd93b6ebf73e30f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 20:28:23 +0530 Subject: [PATCH 006/192] Presence api response models --- app/config/collections/projects.php | 2 +- src/Appwrite/Utopia/Response.php | 2 + .../Utopia/Response/Model/Presence.php | 120 ++++++++++++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 src/Appwrite/Utopia/Response/Model/Presence.php diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 8379f5bb8e..25ffacbcf2 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2840,7 +2840,7 @@ return [ 'filters' => ['json'], ], ], - // TODO: shall we create the perms_md5 now only for the upsertion based on perms_md5 or later via patch script? + // TODO: shall we create the perms_md5 now only for the upsertion based on perms_md5 or later via patch script? // permissions must be sorted before md5 conversion to have deterministic hashes 'indexes' => [ [ diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index c2fc520da3..12ef3dce2a 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -64,6 +64,8 @@ class Response extends SwooleResponse public const MODEL_COLUMN_INDEX_LIST = 'columnIndexList'; public const MODEL_DOCUMENT = 'document'; public const MODEL_DOCUMENT_LIST = 'documentList'; + public const MODEL_PRESENCE = 'presence'; + public const MODEL_PRESENCE_LIST = 'presenceList'; public const MODEL_ROW = 'row'; public const MODEL_ROW_LIST = 'rowList'; diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php new file mode 100644 index 0000000000..d23328bebb --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -0,0 +1,120 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Presence ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$sequence', [ + 'type' => self::TYPE_ID, + 'description' => 'Presence sequence ID.', + 'default' => '', + 'example' => '1', + 'readOnly' => true, + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Presence creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Presence update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$permissions', [ + 'type' => self::TYPE_STRING, + 'description' => 'Presence permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'default' => '', + 'example' => ['read("any")'], + 'array' => true, + ]) + ->addRule('userInternalId', [ + 'type' => self::TYPE_STRING, + 'description' => 'User internal ID.', + 'default' => '', + 'example' => '1', + ]) + ->addRule('userId', [ + 'type' => self::TYPE_STRING, + 'description' => 'User ID.', + 'default' => '', + 'example' => '674af8f3e12a5f9ac0be', + ]) + ->addRule('status', [ + 'type' => self::TYPE_STRING, + 'description' => 'Presence status.', + 'required' => false, + 'default' => null, + 'example' => 'online', + ]) + ->addRule('source', [ + 'type' => self::TYPE_STRING, + 'description' => 'Presence source.', + 'default' => '', + 'example' => 'HTTP', + ]) + ->addRule('expiry', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Presence expiry date in ISO 8601 format.', + 'required' => false, + 'default' => null, + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + // not adding hostname here in the response model + ->addRule('metadata', [ + 'type' => self::TYPE_STRING, + 'description' => 'Presence metadata.', + 'required' => false, + 'default' => [], + 'example' => ['device' => 'web'], + ]); + } + + public function filter(DatabaseDocument $document): DatabaseDocument + { + $document->removeAttribute('$collection'); + $document->removeAttribute('$tenant'); + + if (!$document->isEmpty()) { + $document->setAttribute('$sequence', (string) $document->getAttribute('$sequence', '')); + } + + foreach ($document->getAttributes() as $attribute) { + if (\is_array($attribute)) { + foreach ($attribute as $subAttribute) { + if ($subAttribute instanceof DatabaseDocument) { + $this->filter($subAttribute); + } + } + } elseif ($attribute instanceof DatabaseDocument) { + $this->filter($attribute); + } + } + + return $document; + } +} From 14351c7338d9aca8a893ff9e65c9f7c35e005a1a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 20:28:31 +0530 Subject: [PATCH 007/192] updated model --- app/init/models.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/init/models.php b/app/init/models.php index bf6d67dd95..974050de75 100644 --- a/app/init/models.php +++ b/app/init/models.php @@ -107,6 +107,7 @@ use Appwrite\Utopia\Response\Model\MockNumber; use Appwrite\Utopia\Response\Model\None; use Appwrite\Utopia\Response\Model\Phone; use Appwrite\Utopia\Response\Model\Platform; +use Appwrite\Utopia\Response\Model\Presence; use Appwrite\Utopia\Response\Model\Preferences; use Appwrite\Utopia\Response\Model\Project; use Appwrite\Utopia\Response\Model\Provider; @@ -166,6 +167,7 @@ Response::setModel(new ErrorDev()); // Lists Response::setModel(new BaseList('Rows List', Response::MODEL_ROW_LIST, 'rows', Response::MODEL_ROW)); Response::setModel(new BaseList('Documents List', Response::MODEL_DOCUMENT_LIST, 'documents', Response::MODEL_DOCUMENT)); +Response::setModel(new BaseList('Presences List', Response::MODEL_PRESENCE_LIST, 'presences', Response::MODEL_PRESENCE)); Response::setModel(new BaseList('Tables List', Response::MODEL_TABLE_LIST, 'tables', Response::MODEL_TABLE)); Response::setModel(new BaseList('Collections List', Response::MODEL_COLLECTION_LIST, 'collections', Response::MODEL_COLLECTION)); Response::setModel(new BaseList('Databases List', Response::MODEL_DATABASE_LIST, 'databases', Response::MODEL_DATABASE)); @@ -284,6 +286,7 @@ Response::setModel(new Index()); Response::setModel(new ColumnIndex()); Response::setModel(new Row()); Response::setModel(new ModelDocument()); +Response::setModel(new Presence()); Response::setModel(new Log()); Response::setModel(new User()); Response::setModel(new AlgoMd5()); From 51fd96f4bf78fd008b57c92bd34c6a651e0929d1 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 20:28:40 +0530 Subject: [PATCH 008/192] added crud operation --- src/Appwrite/Platform/Appwrite.php | 2 + .../Modules/Presences/HTTP/Action.php | 64 +++++++++ .../Modules/Presences/HTTP/Delete.php | 66 +++++++++ .../Platform/Modules/Presences/HTTP/Get.php | 62 ++++++++ .../Modules/Presences/HTTP/Update.php | 126 ++++++++++++++++ .../Modules/Presences/HTTP/Upsert.php | 135 ++++++++++++++++++ .../Platform/Modules/Presences/HTTP/XList.php | 103 +++++++++++++ .../Platform/Modules/Presences/Module.php | 14 ++ .../Modules/Presences/Services/Http.php | 25 ++++ 9 files changed, 597 insertions(+) create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Action.php create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Get.php create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Update.php create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/XList.php create mode 100644 src/Appwrite/Platform/Modules/Presences/Module.php create mode 100644 src/Appwrite/Platform/Modules/Presences/Services/Http.php diff --git a/src/Appwrite/Platform/Appwrite.php b/src/Appwrite/Platform/Appwrite.php index 06312d9cb2..bab9aadcd3 100644 --- a/src/Appwrite/Platform/Appwrite.php +++ b/src/Appwrite/Platform/Appwrite.php @@ -9,6 +9,7 @@ use Appwrite\Platform\Modules\Core; use Appwrite\Platform\Modules\Databases; use Appwrite\Platform\Modules\Functions; use Appwrite\Platform\Modules\Health; +use Appwrite\Platform\Modules\Presences; use Appwrite\Platform\Modules\Project; use Appwrite\Platform\Modules\Projects; use Appwrite\Platform\Modules\Proxy; @@ -29,6 +30,7 @@ class Appwrite extends Platform $this->addModule(new Avatars\Module()); $this->addModule(new Databases\Module()); $this->addModule(new Projects\Module()); + $this->addModule(new Presences\Module()); $this->addModule(new Functions\Module()); $this->addModule(new Health\Module()); $this->addModule(new Sites\Module()); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php new file mode 100644 index 0000000000..c954e7463f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php @@ -0,0 +1,64 @@ +getRoles()); + $isPrivilegedUser = User::isPrivileged($authorization->getRoles()); + + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + Database::PERMISSION_WRITE, + ]; + + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + // Add permissions for current the user if none were provided. + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId()) && !$isPrivilegedUser) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } + } + } + + // Users can only manage their own roles, API keys and Admin users can manage any + if (!$isAPIKey && !$isPrivilegedUser) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!$authorization->hasRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $authorization->getRoles()) . ')'); + } + } + } + } + + $document->setAttribute('$permissions', $permissions ?? []); + + return $document; + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php new file mode 100644 index 0000000000..f6af01de58 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -0,0 +1,66 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/presences/:presenceId') + ->desc('Delete presence') + ->groups(['api', 'presences']) + ->label('scope', 'users.write') + ->label('sdk', new Method( + namespace: 'presences', + group: 'presences', + name: 'delete', + description: 'Delete a presence log by its unique ID.', + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ), + ], + contentType: ContentType::NONE, + )) + ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } + + public function action(string $presenceId, Response $response, Database $dbForProject): void + { + $presence = $dbForProject->getDocument('presenceLogs', $presenceId); + + if ($presence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND); + } + + $dbForProject->deleteDocument('presenceLogs', $presenceId); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php new file mode 100644 index 0000000000..240a2f7bf4 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -0,0 +1,62 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/presences/:presenceId') + ->desc('Get presence') + ->groups(['api', 'presences']) + ->label('scope', 'users.read') + ->label('sdk', new Method( + namespace: 'presences', + group: 'presences', + name: 'get', + description: 'Get a presence log by its unique ID.', + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + )) + ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } + + public function action(string $presenceId, Response $response, Database $dbForProject): void + { + $presence = $dbForProject->getDocument('presenceLogs', $presenceId); + + if ($presence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND); + } + + $response->dynamic($presence, Response::MODEL_PRESENCE); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php new file mode 100644 index 0000000000..a4f3169d1a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -0,0 +1,126 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/presences/:presenceId') + ->desc('Update presence') + ->groups(['api', 'presences']) + ->label('scope', 'users.write') + ->label('sdk', new Method( + namespace: 'presences', + group: 'presences', + name: 'update', + description: 'Update a presence log by its unique ID.', + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + )) + ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) + ->param('userId', null, new Nullable(new UID()), 'User ID.', true) + ->param('status', null, new Nullable(new Text(Database::LENGTH_KEY)), 'Presence status.', true) + ->param('expiry', null, new Nullable(new DatetimeValidator()), 'Presence expiry datetime.', true) + ->param('metadata', null, new Nullable(new JSON()), 'Presence metadata object.', true) + ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('response') + ->inject('dbForProject') + ->inject('user') + ->inject('authorization') + ->callback($this->action(...)); + } + + public function action( + string $presenceId, + ?string $userId, + ?string $status, + ?string $expiry, + ?array $metadata, + ?array $permissions, + Response $response, + Database $dbForProject, + Document $user, + Authorization $authorization + ): void { + $isAPIKey = User::isApp($authorization->getRoles()); + $isPrivilegedUser = User::isPrivileged($authorization->getRoles()); + + if ($userId && !$isAPIKey && !$isPrivilegedUser) { + throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, 'userId is not allowed for non-API key and non-privileged users'); + } + + if (($isAPIKey || $isPrivilegedUser) && !$userId) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'userId is required for API key and privileged users'); + } + + $presence = $dbForProject->getDocument('presenceLogs', $presenceId); + + if ($presence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId]); + } + + $updateData = []; + + if ($userId !== null) { + $updateData['userId'] = $userId; + } + + if ($status !== null) { + $updateData['status'] = $status; + } + + if ($expiry !== null) { + $updateData['expiry'] = $expiry; + } + + if ($metadata !== null) { + $updateData['metadata'] = $metadata; + } + + $updates = new Document($updateData); + + if ($permissions !== null) { + $this->setPermission($updates, $permissions, $user, $authorization); + } + + if (empty($updateData) && $permissions === null) { + $response->dynamic($presence, Response::MODEL_PRESENCE); + return; + } + + $presence = $dbForProject->updateDocument('presenceLogs', $presenceId, $updates); + + $response->dynamic($presence, Response::MODEL_PRESENCE); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php new file mode 100644 index 0000000000..7faba3688a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -0,0 +1,135 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/presences/:presenceId') + ->desc('Upsert presence') + ->groups(['api', 'presences']) + ->label('scope', 'users.write') + ->label('sdk', new Method( + namespace: 'presences', + group: 'presences', + name: 'upsert', + description: 'Create or update a presence log by its unique ID.', + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + )) + ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) + ->param('userId', '', new UID(), 'User ID.', false) + ->param('status', '', new Text(Database::LENGTH_KEY), 'Presence status.', false) + ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + // TODO: what shall be the min and max date here + ->param('expiry', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Presence expiry datetime.', true) + ->param('metadata', [], new JSON(), 'Presence metadata object.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('user') + ->inject('authorization') + ->callback($this->action(...)); + } + + public function action( + string $presenceId, + ?string $userId, + ?string $status, + ?array $permissions, + ?string $expiry, + array $metadata, + Response $response, + Database $dbForProject, + Document $user, + Authorization $authorization + ): void { + $isAPIKey = User::isApp($authorization->getRoles()); + $isPrivilegedUser = User::isPrivileged($authorization->getRoles()); + if ($userId && !$isAPIKey && !$isPrivilegedUser) { + throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, "userId is not allowed for non-API key and non-privileged users"); + } + + if (($isAPIKey || $isPrivilegedUser) && !$userId) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, "userId is required for API key and privileged users"); + } + $userInternalId = null; + $resolvedUserId = $userId; + if (!$isAPIKey && !$isPrivilegedUser) { + $userInternalId = $user->getId(); + $resolvedUserId = $user->getId(); + } else { + $user = $dbForProject->getDocument('users', $userId); + if ($user->isEmpty()) { + throw new Exception(Exception::USER_NOT_FOUND, params: [$userId]); + } + + $userInternalId = $user->getId(); + $resolvedUserId = $user->getId(); + } + + $presenceData = [ + 'userInternalId' => $userInternalId, + 'userId' => $resolvedUserId, + 'status' => $status, + 'source' => 'HTTP', + 'expiry' => $expiry ?? DateTime::addSeconds(new \DateTime(), 15 * 60), + // TODO: finding a way to find hostname + // 'hostname' => $hostname, + 'metadata' => $metadata, + ]; + + $presenceDocument = new Document($presenceData); + $this->setPermission($presenceDocument, $permissions, $user, $authorization); + + $existingPresence = $dbForProject->findOne('presenceLogs', [ + Query::equal('userId', [$resolvedUserId]), + ]); + + if ($existingPresence->isEmpty()) { + $presenceId = $presenceId === 'unique()' ? ID::unique() : $presenceId; + $presenceDocument->setAttribute('$id', $presenceId); + $presence = $dbForProject->createDocument('presenceLogs', $presenceDocument); + } else { + $presence = $dbForProject->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); + } + + $response->dynamic($presence, Response::MODEL_PRESENCE); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php new file mode 100644 index 0000000000..aab3958bdb --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -0,0 +1,103 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/presences') + ->desc('List presences') + ->groups(['api', 'presences']) + ->label('scope', 'users.read') + ->label('sdk', new Method( + namespace: 'presences', + group: 'presences', + name: 'list', + description: 'List presence logs.', + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE_LIST, + ), + ], + )) + ->param('queries', [], new QueryValidator('presenceLogs', $allowedAttributes), 'Array of query strings generated using the Query class provided by the SDK.', true) + ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } + + public function action(array $queries, bool $includeTotal, Response $response, Database $dbForProject): void + { + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + $cursor = Query::getCursorQueries($queries, false); + $cursor = \reset($cursor); + + if ($cursor !== false) { + $validator = new Cursor(); + + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $presenceId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('presenceLogs', $presenceId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Presence '{$presenceId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + try { + $documents = $dbForProject->find('presenceLogs', $queries); + $total = $includeTotal ? $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT) : 0; + } catch (OrderException $e) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } + + $response->dynamic(new Document([ + 'presences' => $documents, + 'total' => $total, + ]), Response::MODEL_PRESENCE_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/Module.php b/src/Appwrite/Platform/Modules/Presences/Module.php new file mode 100644 index 0000000000..26be38e58c --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/Module.php @@ -0,0 +1,14 @@ +addService('http', new Http()); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/Services/Http.php b/src/Appwrite/Platform/Modules/Presences/Services/Http.php new file mode 100644 index 0000000000..76fcfdee75 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/Services/Http.php @@ -0,0 +1,25 @@ +type = Service::TYPE_HTTP; + + $this + ->addAction(UpsertPresence::getName(), new UpsertPresence()) + ->addAction(GetPresence::getName(), new GetPresence()) + ->addAction(ListPresences::getName(), new ListPresences()) + ->addAction(UpdatePresence::getName(), new UpdatePresence()) + ->addAction(DeletePresence::getName(), new DeletePresence()); + } +} From eb76c31fdd38c5c53f29b93991d35284f89447eb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 20:46:30 +0530 Subject: [PATCH 009/192] updated aciton source --- src/Appwrite/Platform/Modules/Presences/HTTP/Action.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php index c954e7463f..21e08f065d 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php @@ -1,6 +1,6 @@ Date: Mon, 13 Apr 2026 20:47:13 +0530 Subject: [PATCH 010/192] tests --- tests/e2e/Services/Presence/PresenceBase.php | 225 ++++++++++++++++++ .../Presence/PresenceCustomClientTest.php | 14 ++ .../Presence/PresenceCustomServerTest.php | 14 ++ 3 files changed, 253 insertions(+) create mode 100644 tests/e2e/Services/Presence/PresenceBase.php create mode 100644 tests/e2e/Services/Presence/PresenceCustomClientTest.php create mode 100644 tests/e2e/Services/Presence/PresenceCustomServerTest.php diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php new file mode 100644 index 0000000000..692b4a21f5 --- /dev/null +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -0,0 +1,225 @@ +getProject()['$id']; + $cacheKey = $projectId . ':' . $this->getSide(); + + if (empty($overrides) && !empty(self::$presenceCache[$cacheKey])) { + return self::$presenceCache[$cacheKey]; + } + + $payload = \array_merge([ + 'status' => 'online', + 'metadata' => [ + 'device' => 'web', + 'side' => $this->getSide(), + ], + ], $overrides); + + if ($this->getSide() === 'server' && !isset($payload['userId'])) { + $payload['userId'] = $this->getUser()['$id']; + } + + $response = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), + $payload + ); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertNotEmpty($response['body']['$id']); + $this->assertArrayHasKey('userId', $response['body']); + $this->assertArrayHasKey('status', $response['body']); + $this->assertArrayHasKey('metadata', $response['body']); + + if ($this->getSide() === 'client') { + $this->assertEquals($this->getUser()['$id'], $response['body']['userId']); + } else { + $this->assertEquals($payload['userId'], $response['body']['userId']); + } + + if (empty($overrides)) { + self::$presenceCache[$cacheKey] = $response['body']; + } + + return $response['body']; + } + + public function testUpsertAndGetPresence(): void + { + $presence = $this->setupPresence(); + + $get = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()) + ); + + $this->assertEquals(200, $get['headers']['status-code']); + $this->assertEquals($presence['$id'], $get['body']['$id']); + $this->assertEquals($presence['userId'], $get['body']['userId']); + $this->assertArrayHasKey('expiry', $get['body']); + } + + public function testListPresences(): void + { + $presence = $this->setupPresence(); + + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'queries' => [ + Query::equal('userId', [$presence['userId']])->toString(), + ], + ] + ); + + $this->assertEquals(200, $list['headers']['status-code']); + $this->assertArrayHasKey('total', $list['body']); + $this->assertArrayHasKey('presences', $list['body']); + $this->assertIsArray($list['body']['presences']); + $this->assertGreaterThanOrEqual(1, $list['body']['total']); + } + + public function testUpdatePresenceSparseFields(): void + { + $presence = $this->setupPresence([ + 'status' => 'away', + 'metadata' => ['source' => 'setup'], + ]); + + $payload = [ + 'status' => 'busy', + 'metadata' => ['source' => 'update'], + ]; + + if ($this->getSide() === 'server') { + $payload['userId'] = $presence['userId']; + } + + $update = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + $payload + ); + + $this->assertEquals(200, $update['headers']['status-code']); + $this->assertEquals('busy', $update['body']['status']); + $this->assertEquals(['source' => 'update'], $update['body']['metadata']); + } + + public function testDeletePresence(): void + { + $presence = $this->setupPresence([ + 'status' => 'temp-delete', + 'metadata' => ['cleanup' => true], + ]); + + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()) + ); + + $this->assertEquals(204, $delete['headers']['status-code']); + } + + public function testUpdateNotFound(): void + { + $payload = [ + 'status' => 'ghost', + ]; + + if ($this->getSide() === 'server') { + $payload['userId'] = $this->getUser()['$id']; + } + + $response = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + $payload + ); + + $this->assertEquals(404, $response['headers']['status-code']); + } + + public function testClientCannotPassUserId(): void + { + if ($this->getSide() === 'server') { + $this->expectNotToPerformAssertions(); + return; + } + + $response = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'userId' => ID::unique(), + 'status' => 'online', + ] + ); + + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals('general_unauthorized_scope', $response['body']['type']); + } + + public function testServerRequiresUserId(): void + { + if ($this->getSide() === 'client') { + $this->expectNotToPerformAssertions(); + return; + } + + $response = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'status' => 'online', + ] + ); + + $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals('general_argument_invalid', $response['body']['type']); + } +} \ No newline at end of file diff --git a/tests/e2e/Services/Presence/PresenceCustomClientTest.php b/tests/e2e/Services/Presence/PresenceCustomClientTest.php new file mode 100644 index 0000000000..19260e7c6b --- /dev/null +++ b/tests/e2e/Services/Presence/PresenceCustomClientTest.php @@ -0,0 +1,14 @@ + Date: Mon, 13 Apr 2026 21:08:17 +0530 Subject: [PATCH 011/192] updated scopes --- app/init/models.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Action.php | 6 +++--- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Get.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 8 ++++---- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 8 ++++---- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/init/models.php b/app/init/models.php index 1aa8d8ef1f..74ff7573fb 100644 --- a/app/init/models.php +++ b/app/init/models.php @@ -112,8 +112,8 @@ use Appwrite\Utopia\Response\Model\PlatformLinux; use Appwrite\Utopia\Response\Model\PlatformList; use Appwrite\Utopia\Response\Model\PlatformWeb; use Appwrite\Utopia\Response\Model\PlatformWindows; -use Appwrite\Utopia\Response\Model\Presence; use Appwrite\Utopia\Response\Model\Preferences; +use Appwrite\Utopia\Response\Model\Presence; use Appwrite\Utopia\Response\Model\Project; use Appwrite\Utopia\Response\Model\Provider; use Appwrite\Utopia\Response\Model\ProviderRepository; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php index 21e08f065d..787d0f3081 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php @@ -13,10 +13,10 @@ use Utopia\Database\Validator\Authorization; class Action extends PlatformAction { - public function setPermission(Document $document, ?array $permissions, Document $user, Authorization $authorization): Document + public function setPermission(Document $document, ?array $permissions, User $user, Authorization $authorization): Document { - $isAPIKey = User::isApp($authorization->getRoles()); - $isPrivilegedUser = User::isPrivileged($authorization->getRoles()); + $isAPIKey = $user->isApp($authorization->getRoles()); + $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); $allowedPermissions = [ Database::PERMISSION_READ, diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index f6af01de58..e6ce848a5a 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -30,7 +30,7 @@ class Delete extends Base ->setHttpPath('/v1/presences/:presenceId') ->desc('Delete presence') ->groups(['api', 'presences']) - ->label('scope', 'users.write') + ->label('scope', 'documents.write') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 240a2f7bf4..25e0f1ec81 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -29,7 +29,7 @@ class Get extends Base ->setHttpPath('/v1/presences/:presenceId') ->desc('Get presence') ->groups(['api', 'presences']) - ->label('scope', 'users.read') + ->label('scope', 'documents.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index ac46e08cb9..304a62c8c7 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -34,7 +34,7 @@ class Update extends PresenceAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Update presence') ->groups(['api', 'presences']) - ->label('scope', 'users.write') + ->label('scope', 'documents.write') ->label('sdk', new Method( namespace: 'presences', group: 'presences', @@ -70,11 +70,11 @@ class Update extends PresenceAction ?array $permissions, Response $response, Database $dbForProject, - Document $user, + User $user, Authorization $authorization ): void { - $isAPIKey = User::isApp($authorization->getRoles()); - $isPrivilegedUser = User::isPrivileged($authorization->getRoles()); + $isAPIKey = $user->isApp($authorization->getRoles()); + $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); if ($userId && !$isAPIKey && !$isPrivilegedUser) { throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, 'userId is not allowed for non-API key and non-privileged users'); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index f8019e7004..894e4c6cb4 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -40,7 +40,7 @@ class Upsert extends PresenceAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Upsert presence') ->groups(['api', 'presences']) - ->label('scope', 'users.write') + ->label('scope', 'documents.write') ->label('sdk', new Method( namespace: 'presences', group: 'presences', @@ -77,11 +77,11 @@ class Upsert extends PresenceAction array $metadata, Response $response, Database $dbForProject, - Document $user, + User $user, Authorization $authorization ): void { - $isAPIKey = User::isApp($authorization->getRoles()); - $isPrivilegedUser = User::isPrivileged($authorization->getRoles()); + $isAPIKey = $user->isApp($authorization->getRoles()); + $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); if ($userId && !$isAPIKey && !$isPrivilegedUser) { throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, "userId is not allowed for non-API key and non-privileged users"); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index aab3958bdb..18de610844 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -37,7 +37,7 @@ class XList extends Base ->setHttpPath('/v1/presences') ->desc('List presences') ->groups(['api', 'presences']) - ->label('scope', 'users.read') + ->label('scope', 'documents.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', From f9d0cb7daffaa5044c1b131341811eb31def6fcd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 21:08:23 +0530 Subject: [PATCH 012/192] Refactor presence tests to handle unauthorized access for client side operations and simplify presence setup logic. --- tests/e2e/Services/Presence/PresenceBase.php | 106 ++++++++++++++++--- 1 file changed, 90 insertions(+), 16 deletions(-) diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index 692b4a21f5..dabd45a7ac 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -1,4 +1,5 @@ getProject()['$id']; - $cacheKey = $projectId . ':' . $this->getSide(); + $cacheKey = $projectId; if (empty($overrides) && !empty(self::$presenceCache[$cacheKey])) { return self::$presenceCache[$cacheKey]; } $payload = \array_merge([ + 'userId' => $this->getUser()['$id'], 'status' => 'online', 'metadata' => [ 'device' => 'web', - 'side' => $this->getSide(), + 'setup' => true, ], ], $overrides); - if ($this->getSide() === 'server' && !isset($payload['userId'])) { - $payload['userId'] = $this->getUser()['$id']; - } - $response = $this->client->call( Client::METHOD_PUT, '/presences/' . ID::unique(), - \array_merge([ + [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - ], $this->getHeaders()), + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $payload ); - $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertArrayHasKey('userId', $response['body']); $this->assertArrayHasKey('status', $response['body']); $this->assertArrayHasKey('metadata', $response['body']); - if ($this->getSide() === 'client') { - $this->assertEquals($this->getUser()['$id'], $response['body']['userId']); - } else { - $this->assertEquals($payload['userId'], $response['body']['userId']); - } + $this->assertEquals($payload['userId'], $response['body']['userId']); if (empty($overrides)) { self::$presenceCache[$cacheKey] = $response['body']; @@ -61,6 +55,24 @@ trait PresenceBase public function testUpsertAndGetPresence(): void { + if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'status' => 'online', + 'metadata' => ['device' => 'web'], + ] + ); + + $this->assertEquals(401, $upsert['headers']['status-code']); + return; + } + $presence = $this->setupPresence(); $get = $this->client->call( @@ -80,6 +92,20 @@ trait PresenceBase public function testListPresences(): void { + if ($this->getSide() === 'client') { + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()) + ); + + $this->assertEquals(401, $list['headers']['status-code']); + return; + } + $presence = $this->setupPresence(); $list = $this->client->call( @@ -105,6 +131,24 @@ trait PresenceBase public function testUpdatePresenceSparseFields(): void { + if ($this->getSide() === 'client') { + $update = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'status' => 'busy', + 'metadata' => ['source' => 'update'], + ] + ); + + $this->assertEquals(401, $update['headers']['status-code']); + return; + } + $presence = $this->setupPresence([ 'status' => 'away', 'metadata' => ['source' => 'setup'], @@ -136,6 +180,20 @@ trait PresenceBase public function testDeletePresence(): void { + if ($this->getSide() === 'client') { + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()) + ); + + $this->assertEquals(401, $delete['headers']['status-code']); + return; + } + $presence = $this->setupPresence([ 'status' => 'temp-delete', 'metadata' => ['cleanup' => true], @@ -155,6 +213,23 @@ trait PresenceBase public function testUpdateNotFound(): void { + if ($this->getSide() === 'client') { + $response = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'status' => 'ghost', + ] + ); + + $this->assertEquals(401, $response['headers']['status-code']); + return; + } + $payload = [ 'status' => 'ghost', ]; @@ -197,7 +272,6 @@ trait PresenceBase ); $this->assertEquals(401, $response['headers']['status-code']); - $this->assertEquals('general_unauthorized_scope', $response['body']['type']); } public function testServerRequiresUserId(): void @@ -222,4 +296,4 @@ trait PresenceBase $this->assertEquals(400, $response['headers']['status-code']); $this->assertEquals('general_argument_invalid', $response['body']['type']); } -} \ No newline at end of file +} From 54fa813bc6ee13b95f45a3702fa729da4ad11b9c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 22:31:46 +0530 Subject: [PATCH 013/192] Implement presence expiry management and enhance user ID handling in presence actions. Add automated tests for expired presence deletion during maintenance. --- .../Modules/Presences/HTTP/Update.php | 6 +- .../Modules/Presences/HTTP/Upsert.php | 12 +- src/Appwrite/Platform/Workers/Deletes.php | 13 ++ tests/e2e/Services/Presence/PresenceBase.php | 1 - .../Services/Presence/PresenceExpiryTest.php | 123 ++++++++++++++++++ 5 files changed, 144 insertions(+), 11 deletions(-) create mode 100644 tests/e2e/Services/Presence/PresenceExpiryTest.php diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 304a62c8c7..5c3cb4413f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -80,10 +80,6 @@ class Update extends PresenceAction throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, 'userId is not allowed for non-API key and non-privileged users'); } - if (($isAPIKey || $isPrivilegedUser) && !$userId) { - throw new Exception(Exception::GENERAL_BAD_REQUEST, 'userId is required for API key and privileged users'); - } - $presence = $dbForProject->getDocument('presenceLogs', $presenceId); if ($presence->isEmpty()) { @@ -94,6 +90,8 @@ class Update extends PresenceAction if ($userId !== null) { $updateData['userId'] = $userId; + $userDoc = $dbForProject->getDocument('users', $userId); + $updateData['userInternalId'] = $userDoc->getSequence(); } if ($status !== null) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 894e4c6cb4..03b702b2c2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -55,7 +55,7 @@ class Upsert extends PresenceAction ], )) ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) - ->param('userId', '', new UID(), 'User ID.', false) + ->param('userId', null, new Nullable(new UID()), 'User ID.', true) ->param('status', '', new Text(Database::LENGTH_KEY), 'Presence status.', false) ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) // TODO: what shall be the min and max date here @@ -92,16 +92,16 @@ class Upsert extends PresenceAction $userInternalId = null; $resolvedUserId = $userId; if (!$isAPIKey && !$isPrivilegedUser) { - $userInternalId = $user->getId(); + $userInternalId = $user->getSequence(); $resolvedUserId = $user->getId(); } else { - $user = $dbForProject->getDocument('users', $userId); - if ($user->isEmpty()) { + $fetchedUser = $dbForProject->getDocument('users', $userId); + if ($fetchedUser->isEmpty()) { throw new Exception(Exception::USER_NOT_FOUND, params: [$userId]); } - $userInternalId = $user->getId(); - $resolvedUserId = $user->getId(); + $userInternalId = $fetchedUser->getSequence(); + $resolvedUserId = $fetchedUser->getId(); } $presenceData = [ diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index c420444112..322afd02d6 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -214,6 +214,7 @@ class Deletes extends Action $this->deleteUsageStats($project, $getProjectDB, $getLogsDB, $hourlyUsageRetentionDatetime); $this->deleteExpiredSessions($project, $getProjectDB); $this->deleteExpiredTransactions($project, $getProjectDB); + $this->deleteExpiredPresences($project, $getProjectDB); $this->deleteOldDeployments($queueForDeletes, $project, $getProjectDB); break; default: @@ -1644,4 +1645,16 @@ class Deletes extends Action // Swallow errors to avoid breaking the cleanup process }); } + + private function deleteExpiredPresences(Document $project, callable $getProjectDB): void + { + $dbForProject = $getProjectDB($project); + + $dbForProject->deleteDocuments('presenceLogs', [ + Query::isNotNull('expiry'), + Query::lessThan('expiry', DateTime::format(new \DateTime())), + ], onError: function (Throwable $th) { + // Swallow errors to avoid breaking the cleanup process + }); + } } diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index dabd45a7ac..ff935707e8 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -294,6 +294,5 @@ trait PresenceBase ); $this->assertEquals(400, $response['headers']['status-code']); - $this->assertEquals('general_argument_invalid', $response['body']['type']); } } diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php new file mode 100644 index 0000000000..818d391325 --- /dev/null +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -0,0 +1,123 @@ +getProject()['$id']; + $userId = $this->getUser()['$id']; + $expiredAt = \gmdate('Y-m-d\TH:i:s.v\Z', \time() - 120); + + $createServer = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], + [ + 'userId' => $userId, + 'status' => 'online', + 'metadata' => ['test' => 'presence-expiry'], + ] + ); + + $this->assertEquals(200, $createServer['headers']['status-code']); + $presenceIdServer = $createServer['body']['$id']; + + $expireServer = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presenceIdServer, + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], + [ + 'userId' => $userId, + 'expiry' => $expiredAt, + ] + ); + + $this->assertEquals(200, $expireServer['headers']['status-code']); + $this->assertEquals($expiredAt, $expireServer['body']['expiry']); + + $createClient = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->getUser()['session'], + ], + [ + 'status' => 'online', + 'metadata' => ['test' => 'presence-expiry-client'], + ] + ); + + $this->assertEquals(200, $createClient['headers']['status-code']); + $presenceIdClient = $createClient['body']['$id']; + + $expireClient = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presenceIdClient, + [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->getUser()['session'], + ], + [ + 'expiry' => $expiredAt, + ] + ); + + $this->assertEquals(200, $expireClient['headers']['status-code']); + $this->assertEquals($expiredAt, $expireClient['body']['expiry']); + + $stdout = ''; + $stderr = ''; + $code = Console::execute('docker exec appwrite maintenance --type=trigger', '', $stdout, $stderr); + $this->assertSame(0, $code, "Maintenance command failed with code $code: $stderr ($stdout)"); + + $this->assertEventually(function () use ($presenceIdServer, $presenceIdClient, $projectId) { + $getServer = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presenceIdServer, + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ] + ); + + $getClient = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presenceIdClient, + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ] + ); + + $this->assertEquals(404, $getServer['headers']['status-code']); + $this->assertEquals(404, $getClient['headers']['status-code']); + }); + } +} From 0935c60f3c280189c160a086e400a78731d298f7 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 22:37:17 +0530 Subject: [PATCH 014/192] added users.read, users.write currently for the scoping --- .../Modules/Presences/HTTP/Delete.php | 2 +- .../Platform/Modules/Presences/HTTP/Get.php | 2 +- .../Modules/Presences/HTTP/Update.php | 2 +- .../Modules/Presences/HTTP/Upsert.php | 2 +- .../Platform/Modules/Presences/HTTP/XList.php | 2 +- tests/e2e/Services/Presence/PresenceBase.php | 43 +++++++++++++------ .../Services/Presence/PresenceExpiryTest.php | 36 +++++++++++++--- 7 files changed, 65 insertions(+), 24 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index e6ce848a5a..f6af01de58 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -30,7 +30,7 @@ class Delete extends Base ->setHttpPath('/v1/presences/:presenceId') ->desc('Delete presence') ->groups(['api', 'presences']) - ->label('scope', 'documents.write') + ->label('scope', 'users.write') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 25e0f1ec81..240a2f7bf4 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -29,7 +29,7 @@ class Get extends Base ->setHttpPath('/v1/presences/:presenceId') ->desc('Get presence') ->groups(['api', 'presences']) - ->label('scope', 'documents.read') + ->label('scope', 'users.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 5c3cb4413f..71cd654068 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -34,7 +34,7 @@ class Update extends PresenceAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Update presence') ->groups(['api', 'presences']) - ->label('scope', 'documents.write') + ->label('scope', 'users.write') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 03b702b2c2..ddfb6285fe 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -40,7 +40,7 @@ class Upsert extends PresenceAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Upsert presence') ->groups(['api', 'presences']) - ->label('scope', 'documents.write') + ->label('scope', 'users.write') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 18de610844..aab3958bdb 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -37,7 +37,7 @@ class XList extends Base ->setHttpPath('/v1/presences') ->desc('List presences') ->groups(['api', 'presences']) - ->label('scope', 'documents.read') + ->label('scope', 'users.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index ff935707e8..88360e8acc 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -9,6 +9,23 @@ use Utopia\Database\Query; trait PresenceBase { private static array $presenceCache = []; + private static array $presenceApiKeyCache = []; + + protected function getPresenceApiKey(): string + { + $projectId = $this->getProject()['$id']; + + if (!empty(self::$presenceApiKeyCache[$projectId])) { + return self::$presenceApiKeyCache[$projectId]; + } + + self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ + 'users.read', + 'users.write', + ]); + + return self::$presenceApiKeyCache[$projectId]; + } protected function setupPresence(array $overrides = []): array { @@ -34,7 +51,7 @@ trait PresenceBase [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'x-appwrite-key' => $this->getPresenceApiKey(), ], $payload ); @@ -62,7 +79,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), [ 'status' => 'online', 'metadata' => ['device' => 'web'], @@ -81,7 +98,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()) + ], $this->getHeaders(false)) ); $this->assertEquals(200, $get['headers']['status-code']); @@ -99,7 +116,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()) + ], $this->getHeaders(false)) ); $this->assertEquals(401, $list['headers']['status-code']); @@ -114,7 +131,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), [ 'queries' => [ Query::equal('userId', [$presence['userId']])->toString(), @@ -138,7 +155,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), [ 'status' => 'busy', 'metadata' => ['source' => 'update'], @@ -169,7 +186,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), $payload ); @@ -187,7 +204,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()) + ], $this->getHeaders(false)) ); $this->assertEquals(401, $delete['headers']['status-code']); @@ -205,7 +222,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()) + ], $this->getHeaders(false)) ); $this->assertEquals(204, $delete['headers']['status-code']); @@ -220,7 +237,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), [ 'status' => 'ghost', ] @@ -244,7 +261,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), $payload ); @@ -264,7 +281,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), [ 'userId' => ID::unique(), 'status' => 'online', @@ -287,7 +304,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), + ], $this->getHeaders(false)), [ 'status' => 'online', ] diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php index 818d391325..ab6da1711a 100644 --- a/tests/e2e/Services/Presence/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -14,6 +14,24 @@ class PresenceExpiryTest extends Scope use ProjectCustom; use SideServer; + private static array $presenceApiKeyCache = []; + + private function getPresenceApiKey(): string + { + $projectId = $this->getProject()['$id']; + + if (!empty(self::$presenceApiKeyCache[$projectId])) { + return self::$presenceApiKeyCache[$projectId]; + } + + self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ + 'users.read', + 'users.write', + ]); + + return self::$presenceApiKeyCache[$projectId]; + } + public function testExpiredPresenceDeletedByMaintenance(): void { $projectId = $this->getProject()['$id']; @@ -26,7 +44,7 @@ class PresenceExpiryTest extends Scope [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'x-appwrite-key' => $this->getPresenceApiKey(), ], [ 'userId' => $userId, @@ -44,7 +62,7 @@ class PresenceExpiryTest extends Scope [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'x-appwrite-key' => $this->getPresenceApiKey(), ], [ 'userId' => $userId, @@ -53,7 +71,10 @@ class PresenceExpiryTest extends Scope ); $this->assertEquals(200, $expireServer['headers']['status-code']); - $this->assertEquals($expiredAt, $expireServer['body']['expiry']); + $this->assertEquals( + (new \DateTime($expiredAt))->getTimestamp(), + (new \DateTime($expireServer['body']['expiry']))->getTimestamp() + ); $createClient = $this->client->call( Client::METHOD_PUT, @@ -88,7 +109,10 @@ class PresenceExpiryTest extends Scope ); $this->assertEquals(200, $expireClient['headers']['status-code']); - $this->assertEquals($expiredAt, $expireClient['body']['expiry']); + $this->assertEquals( + (new \DateTime($expiredAt))->getTimestamp(), + (new \DateTime($expireClient['body']['expiry']))->getTimestamp() + ); $stdout = ''; $stderr = ''; @@ -102,7 +126,7 @@ class PresenceExpiryTest extends Scope [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'x-appwrite-key' => $this->getPresenceApiKey(), ] ); @@ -112,7 +136,7 @@ class PresenceExpiryTest extends Scope [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'x-appwrite-key' => $this->getPresenceApiKey(), ] ); From 26ff78d98a9f3d035c2980d7665da173d2f89637 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 13 Apr 2026 22:39:56 +0530 Subject: [PATCH 015/192] updated expiry tests --- .../Services/Presence/PresenceExpiryTest.php | 51 +------------------ 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php index ab6da1711a..3d86045a41 100644 --- a/tests/e2e/Services/Presence/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -76,50 +76,12 @@ class PresenceExpiryTest extends Scope (new \DateTime($expireServer['body']['expiry']))->getTimestamp() ); - $createClient = $this->client->call( - Client::METHOD_PUT, - '/presences/' . ID::unique(), - [ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_' . $projectId . '=' . $this->getUser()['session'], - ], - [ - 'status' => 'online', - 'metadata' => ['test' => 'presence-expiry-client'], - ] - ); - - $this->assertEquals(200, $createClient['headers']['status-code']); - $presenceIdClient = $createClient['body']['$id']; - - $expireClient = $this->client->call( - Client::METHOD_PATCH, - '/presences/' . $presenceIdClient, - [ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - 'cookie' => 'a_session_' . $projectId . '=' . $this->getUser()['session'], - ], - [ - 'expiry' => $expiredAt, - ] - ); - - $this->assertEquals(200, $expireClient['headers']['status-code']); - $this->assertEquals( - (new \DateTime($expiredAt))->getTimestamp(), - (new \DateTime($expireClient['body']['expiry']))->getTimestamp() - ); - $stdout = ''; $stderr = ''; $code = Console::execute('docker exec appwrite maintenance --type=trigger', '', $stdout, $stderr); $this->assertSame(0, $code, "Maintenance command failed with code $code: $stderr ($stdout)"); - $this->assertEventually(function () use ($presenceIdServer, $presenceIdClient, $projectId) { + $this->assertEventually(function () use ($presenceIdServer, $projectId) { $getServer = $this->client->call( Client::METHOD_GET, '/presences/' . $presenceIdServer, @@ -130,18 +92,7 @@ class PresenceExpiryTest extends Scope ] ); - $getClient = $this->client->call( - Client::METHOD_GET, - '/presences/' . $presenceIdClient, - [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getPresenceApiKey(), - ] - ); - $this->assertEquals(404, $getServer['headers']['status-code']); - $this->assertEquals(404, $getClient['headers']['status-code']); }); } } From 69bc935517e3eab5ef837a81296a1839b5764b4a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 15 Apr 2026 13:21:26 +0530 Subject: [PATCH 016/192] Add permission handling for presence updates and enhance error validation in realtime messages --- app/config/collections/projects.php | 2 +- app/realtime.php | 105 ++++++++++++++++++ .../Modules/Presences/HTTP/Upsert.php | 25 +++-- .../Platform/Modules/Presences/HTTP/XList.php | 1 + 4 files changed, 121 insertions(+), 12 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 7002113b36..02b286767b 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2791,7 +2791,7 @@ return [ 'size' => 0, 'signed' => false, 'required' => false, - 'default' => null, // TODO: needed a default value + 'default' => null, 'array' => false, 'filters' => ['datetime'], ], diff --git a/app/realtime.php b/app/realtime.php index 955832e93a..28581b5e53 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -4,6 +4,7 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; +use Appwrite\Platform\Permission; use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; @@ -242,6 +243,36 @@ if (!function_exists('triggerStats')) { } } +if (!function_exists('setPermission')) { + function setPermission(Document $document, ?array $permissions, Authorization $authorization): void + { + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + Database::PERMISSION_WRITE, + ]; + $permissions = Permission::aggregate($permissions, $allowedPermissions); + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!$authorization->hasRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $authorization->getRoles()) . ')'); + } + } + } + $document->setAttribute('$permissions', $permissions ?? []); + } +} + global $container; $container->set('pools', function ($register) { return $register->get('pools'); @@ -1083,6 +1114,80 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re break; + case 'presence': + $userId = $realtime->connections[$connection]['userId']; + if (!isset($userId)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); + } + /** @var User $user */ + $user = $database->getDocument('users', $userId); + + if (!is_array($message['data'])) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); + } + + if (!array_key_exists('status', $message['data'])) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid. status must be provided'); + } + + if (array_key_exists('permissions', $message['data']) && !\is_array($message['data']['permissions'])) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid. permissions must be an array.'); + } + + $presenceData = [ + 'userInternalId' => $user->getSequence(), + 'userId' => $user->getId(), + 'source' => 'realtime', + 'status' => $message['data']['status'] + ]; + + // TODO: add the created presence id to the connections connection id array for deletion at the end(bulk delete) + + if (array_key_exists('metadata', $message['data'])) { + $presenceData['metadata'] = $message['data']['metadata']; + } + // for an user if presence is present and expiry is null and service is realtime is the indicator that connection cleanup for the user failed + // in later case of multi-presence per user these must be cleaned up first + // currently in case of single presence per user we can directly upsert + $presenceDocument = new Document($presenceData); + setPermission($presenceDocument, $message['data']['permissions'] ?? null, $authorization); + + $presence = $database->withTransaction(function () use ($database, $userId, $presenceDocument, $message) { + $existingPresence = $database->findOne('presenceLogs', [ + Query::equal('userId', [$userId]), + ]); + if ($existingPresence->isEmpty()) { + $presenceId = $message['data']['presenceId'] ?? 'unique()'; + $presenceDocument->setAttribute('$id', $presenceId === 'unique()' ? ID::unique() : $presenceId); + return $database->createDocument('presenceLogs', $presenceDocument); + } + return $database->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); + }); + + $presence->removeAttribute('hostname'); + + $responsePayload = json_encode([ + 'type' => 'response', + 'data' => [ + 'to' => 'presence', + 'presence' => $presence->getArrayCopy() + ] + ]); + + $server->send([$connection], $responsePayload); + + if ($project !== null && !$project->isEmpty()) { + $subscribeOutboundBytes = \strlen($responsePayload); + + if ($subscribeOutboundBytes > 0) { + triggerStats([ + METRIC_REALTIME_OUTBOUND => $subscribeOutboundBytes, + ], $project->getId()); + } + } + + break; + default: throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Message type is not valid.'); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index ddfb6285fe..5c8e639359 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -108,7 +108,7 @@ class Upsert extends PresenceAction 'userInternalId' => $userInternalId, 'userId' => $resolvedUserId, 'status' => $status, - 'source' => 'HTTP', + 'source' => 'rest', 'expiry' => $expiry ?? DateTime::addSeconds(new \DateTime(), 15 * 60), // TODO: finding a way to find hostname // 'hostname' => $hostname, @@ -118,17 +118,20 @@ class Upsert extends PresenceAction $presenceDocument = new Document($presenceData); $this->setPermission($presenceDocument, $permissions, $user, $authorization); - $existingPresence = $dbForProject->findOne('presenceLogs', [ - Query::equal('userId', [$resolvedUserId]), - ]); + // inside transaction as realtime also do get -> update/create + $presence = $dbForProject->withTransaction(function () use ($dbForProject, $resolvedUserId, $presenceId, $presenceDocument) { + $existingPresence = $dbForProject->findOne('presenceLogs', [ + Query::equal('userId', [$resolvedUserId]), + ]); - if ($existingPresence->isEmpty()) { - $presenceId = $presenceId === 'unique()' ? ID::unique() : $presenceId; - $presenceDocument->setAttribute('$id', $presenceId); - $presence = $dbForProject->createDocument('presenceLogs', $presenceDocument); - } else { - $presence = $dbForProject->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); - } + if ($existingPresence->isEmpty()) { + $presenceId = $presenceId === 'unique()' ? ID::unique() : $presenceId; + $presenceDocument->setAttribute('$id', $presenceId); + return $dbForProject->createDocument('presenceLogs', $presenceDocument); + } + + return $dbForProject->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); + }); $response->dynamic($presence, Response::MODEL_PRESENCE); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index aab3958bdb..64b8a80d31 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -61,6 +61,7 @@ class XList extends Base public function action(array $queries, bool $includeTotal, Response $response, Database $dbForProject): void { try { + // TODO: make sure to add one more query here if not given -> send only not-expired presence -> presence will be cleared by the maintainance workers $queries = Query::parseQueries($queries); } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); From 2ce39768c3f913633beda3be450dbc250a4462bf Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 15 Apr 2026 13:38:34 +0530 Subject: [PATCH 017/192] added delete of presence on disconnect --- app/realtime.php | 25 +++++++++++++++++++++ src/Appwrite/Messaging/Adapter/Realtime.php | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index 28581b5e53..9b1de14a2f 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1166,6 +1166,8 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $presence->removeAttribute('hostname'); + $realtime->connections[$connection]['presences'] = array_merge($realtime->connections[$connection]['presences'] ?? [], [$presence->getId()]); + $responsePayload = json_encode([ 'type' => 'response', 'data' => [ @@ -1228,6 +1230,29 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { $register->get('telemetry.connectionCounter')->add(-1); $projectId = $realtime->connections[$connection]['projectId']; + $presenceIds = $realtime->connections[$connection]['presences'] ?? []; + + if ( + !empty($presenceIds) + && $projectId !== 'console' + ) { + /** @var string[] $presenceIds */ + $presenceIds = \array_values(\array_unique(\array_filter($presenceIds, fn (mixed $id): bool => \is_string($id) && $id !== ''))); + + if (!empty($presenceIds)) { + $consoleDB = getConsoleDB(); + $project = $consoleDB->getAuthorization()->skip(fn () => $consoleDB->getDocument('projects', $projectId)); + + if (!$project->isEmpty()) { + $dbForProject = getProjectDB($project); + $dbForProject->deleteDocuments('presenceLogs', [ + Query::equal('$id', $presenceIds), + ], onError: function (Throwable $th) { + // Swallow errors to avoid breaking disconnect cleanup + }); + } + } + } triggerStats([ METRIC_REALTIME_CONNECTIONS => -1, diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index f1d806bcc5..d5ac905fd1 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -22,6 +22,7 @@ class Realtime extends MessagingAdapter * 'roles' -> [ROLE_x, ROLE_Y] * 'userId' -> [USER_ID] * 'channels' -> [CHANNEL_NAME_X, CHANNEL_NAME_Y, CHANNEL_NAME_Z] + * 'presences' -> [PRESENCE_ID_1, PRESENCE_ID_2, ...] */ public array $connections = []; @@ -120,7 +121,8 @@ class Realtime extends MessagingAdapter 'projectId' => $projectId, 'roles' => $roles, 'userId' => $userId ?? ($this->connections[$identifier]['userId'] ?? ''), - 'channels' => $channels + 'channels' => $channels, + 'presences' => $this->connections[$identifier]['presences'] ?? [] ]; } From 968b1c0861276ea2621d69fe78cd4b19264dbb88 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 15 Apr 2026 16:11:05 +0530 Subject: [PATCH 018/192] updated configs --- app/config/collections/projects.php | 10 ++-- app/realtime.php | 20 ++----- .../Modules/Presences/HTTP/Upsert.php | 19 ++---- tests/e2e/Services/Presence/PresenceBase.php | 59 +++++++++++++++++++ 4 files changed, 74 insertions(+), 34 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 02b286767b..d5e8952896 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2764,7 +2764,7 @@ return [ 'attributes' => [ [ '$id' => ID::custom('userInternalId'), - 'type' => Database::VAR_ID, + 'type' => Database::VAR_STRING, 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, @@ -2775,7 +2775,7 @@ return [ ], [ '$id' => ID::custom('userId'), - 'type' => Database::VAR_ID, + 'type' => Database::VAR_STRING, 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, @@ -2844,15 +2844,15 @@ return [ // permissions must be sorted before md5 conversion to have deterministic hashes 'indexes' => [ [ - '$id' => ID::custom('_key_userId'), - 'type' => Database::INDEX_KEY, + '$id' => ID::custom('_unique_userId'), + 'type' => Database::INDEX_UNIQUE, 'attributes' => ['userId'], 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC] ], [ '$id' => ID::custom('_key_userInternal'), - 'type' => Database::INDEX_KEY, + 'type' => Database::INDEX_UNIQUE, 'attributes' => ['userInternalId'], 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC] diff --git a/app/realtime.php b/app/realtime.php index 9b1de14a2f..b0e3cac66e 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1146,23 +1146,15 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re if (array_key_exists('metadata', $message['data'])) { $presenceData['metadata'] = $message['data']['metadata']; } - // for an user if presence is present and expiry is null and service is realtime is the indicator that connection cleanup for the user failed - // in later case of multi-presence per user these must be cleaned up first - // currently in case of single presence per user we can directly upsert $presenceDocument = new Document($presenceData); setPermission($presenceDocument, $message['data']['permissions'] ?? null, $authorization); - $presence = $database->withTransaction(function () use ($database, $userId, $presenceDocument, $message) { - $existingPresence = $database->findOne('presenceLogs', [ - Query::equal('userId', [$userId]), - ]); - if ($existingPresence->isEmpty()) { - $presenceId = $message['data']['presenceId'] ?? 'unique()'; - $presenceDocument->setAttribute('$id', $presenceId === 'unique()' ? ID::unique() : $presenceId); - return $database->createDocument('presenceLogs', $presenceDocument); - } - return $database->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); - }); + $presenceId = $message['data']['presenceId'] ?? 'unique()'; + if ($presenceId !== 'unique()') { + $presenceDocument->setAttribute('$id', $presenceId); + } + + $presence = $database->upsertDocument('presenceLogs', $presenceDocument); $presence->removeAttribute('hostname'); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 5c8e639359..feb17b10f9 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; use Appwrite\Extend\Exception; -use Appwrite\ID; use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -13,7 +12,6 @@ use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; -use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Permissions; @@ -118,20 +116,11 @@ class Upsert extends PresenceAction $presenceDocument = new Document($presenceData); $this->setPermission($presenceDocument, $permissions, $user, $authorization); - // inside transaction as realtime also do get -> update/create - $presence = $dbForProject->withTransaction(function () use ($dbForProject, $resolvedUserId, $presenceId, $presenceDocument) { - $existingPresence = $dbForProject->findOne('presenceLogs', [ - Query::equal('userId', [$resolvedUserId]), - ]); + if ($presenceId !== 'unique()') { + $presenceDocument->setAttribute('$id', $presenceId); + } - if ($existingPresence->isEmpty()) { - $presenceId = $presenceId === 'unique()' ? ID::unique() : $presenceId; - $presenceDocument->setAttribute('$id', $presenceId); - return $dbForProject->createDocument('presenceLogs', $presenceDocument); - } - - return $dbForProject->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); - }); + $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); $response->dynamic($presence, Response::MODEL_PRESENCE); } diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index 88360e8acc..1a8958ddce 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -312,4 +312,63 @@ trait PresenceBase $this->assertEquals(400, $response['headers']['status-code']); } + + public function testUpsertSameUserMaintainsSinglePresence(): void + { + if ($this->getSide() === 'client') { + $this->expectNotToPerformAssertions(); + return; + } + + $projectId = $this->getProject()['$id']; + $userId = $this->getUser()['$id']; + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders(false)); + + $firstUpsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + $headers, + [ + 'userId' => $userId, + 'status' => 'online', + 'metadata' => ['source' => 'first-upsert'], + ] + ); + $this->assertEquals(200, $firstUpsert['headers']['status-code']); + + $secondUpsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + $headers, + [ + 'userId' => $userId, + 'status' => 'away', + 'metadata' => ['source' => 'second-upsert'], + ] + ); + $this->assertEquals(200, $secondUpsert['headers']['status-code']); + + $this->assertEquals('away', $secondUpsert['body']['status']); + $this->assertEquals(['source' => 'second-upsert'], $secondUpsert['body']['metadata']); + + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + $headers, + [ + 'queries' => [ + Query::equal('userId', [$userId])->toString(), + ], + ] + ); + + $this->assertEquals(200, $list['headers']['status-code']); + $this->assertEquals(1, $list['body']['total']); + $this->assertCount(1, $list['body']['presences']); + $this->assertEquals($userId, $list['body']['presences'][0]['userId']); + $this->assertEquals('away', $list['body']['presences'][0]['status']); + } } From 7e18e6f8c533cff0a634cb0b9afd24f7cdbb4fc1 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 15 Apr 2026 16:30:17 +0530 Subject: [PATCH 019/192] updated realtime and tests --- app/realtime.php | 4 +- .../Presence/PresenceRealtimeClientTest.php | 211 ++++++++++++++++++ 2 files changed, 213 insertions(+), 2 deletions(-) create mode 100644 tests/e2e/Services/Presence/PresenceRealtimeClientTest.php diff --git a/app/realtime.php b/app/realtime.php index b0e3cac66e..96ee315776 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -4,7 +4,6 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; -use Appwrite\Platform\Permission; use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; @@ -31,6 +30,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; @@ -1116,7 +1116,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re case 'presence': $userId = $realtime->connections[$connection]['userId']; - if (!isset($userId)) { + if (empty($userId)) { throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); } /** @var User $user */ diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php new file mode 100644 index 0000000000..e99350e7fb --- /dev/null +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -0,0 +1,211 @@ + 'http://localhost', + ]; + + if ($authenticated) { + $headers['cookie'] = 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session']; + } + + $client = $this->getWebsocket(['presences'], $headers, timeout: $timeout); + $response = \json_decode($client->receive(), true); + + $this->assertSame('connected', $response['type'] ?? null); + + return $client; + } + + private function getServerHeaders(): array + { + return [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + } + + private function getPresencePermissions(string $userId): array + { + $this->assertNotEmpty($userId); + + return [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ]; + } + + public function testPresenceMessageCreatesPresenceAndPersists(): void + { + $presenceId = ID::unique(); + $userId = $this->getUser()['$id']; + $client = $this->connectPresenceSocket(); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'online', + 'metadata' => [ + 'device' => 'web', + ], + 'permissions' => $this->getPresencePermissions($userId), + ], + ])); + + $response = \json_decode($client->receive(), true); + $this->assertSame('response', $response['type'] ?? null); + $this->assertSame('presence', $response['data']['to'] ?? null); + $this->assertSame($presenceId, $response['data']['presence']['$id'] ?? null); + $this->assertSame($userId, $response['data']['presence']['userId'] ?? null); + $this->assertSame('online', $response['data']['presence']['status'] ?? null); + $this->assertSame(['device' => 'web'], $response['data']['presence']['metadata'] ?? null); + + $read = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presenceId, + $this->getServerHeaders() + ); + + $this->assertSame(200, $read['headers']['status-code']); + $this->assertSame($presenceId, $read['body']['$id']); + $this->assertSame($userId, $read['body']['userId']); + $this->assertSame('online', $read['body']['status']); + $this->assertSame(['device' => 'web'], $read['body']['metadata']); + + $client->close(); + } + + public function testPresenceMessageUpsertWithSamePresenceIdPersistsSingleUpdatedRecord(): void + { + $presenceId = ID::unique(); + $userId = $this->getUser()['$id']; + $client = $this->connectPresenceSocket(); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'away', + 'metadata' => [ + 'source' => 'first', + ], + 'permissions' => $this->getPresencePermissions($userId), + ], + ])); + $first = \json_decode($client->receive(), true); + $this->assertSame('response', $first['type'] ?? null); + $this->assertSame($presenceId, $first['data']['presence']['$id'] ?? null); + $this->assertSame('away', $first['data']['presence']['status'] ?? null); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'busy', + 'metadata' => [ + 'source' => 'second', + ], + 'permissions' => $this->getPresencePermissions($userId), + ], + ])); + $second = \json_decode($client->receive(), true); + $this->assertSame('response', $second['type'] ?? null); + $this->assertSame($presenceId, $second['data']['presence']['$id'] ?? null); + $this->assertSame('busy', $second['data']['presence']['status'] ?? null); + $this->assertSame(['source' => 'second'], $second['data']['presence']['metadata'] ?? null); + + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + $this->getServerHeaders(), + [ + 'queries' => [ + Query::equal('$id', [$presenceId])->toString(), + Query::equal('userId', [$userId])->toString(), + ], + ] + ); + + $this->assertSame(200, $list['headers']['status-code']); + $this->assertSame(1, $list['body']['total']); + $this->assertCount(1, $list['body']['presences']); + $this->assertSame($presenceId, $list['body']['presences'][0]['$id']); + $this->assertSame($userId, $list['body']['presences'][0]['userId']); + $this->assertSame('busy', $list['body']['presences'][0]['status']); + $this->assertSame(['source' => 'second'], $list['body']['presences'][0]['metadata']); + + $client->close(); + } + + public function testPresenceMessageValidationErrors(): void + { + $client = $this->connectPresenceSocket(); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'metadata' => [ + 'device' => 'web', + ], + ], + ])); + $missingStatus = \json_decode($client->receive(), true); + $this->assertSame('error', $missingStatus['type'] ?? null); + $this->assertStringContainsString('status must be provided', $missingStatus['data']['message'] ?? ''); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'status' => 'online', + 'permissions' => 'invalid', + ], + ])); + $invalidPermissions = \json_decode($client->receive(), true); + $this->assertSame('error', $invalidPermissions['type'] ?? null); + $this->assertStringContainsString('permissions must be an array', $invalidPermissions['data']['message'] ?? ''); + + $client->close(); + } + + public function testPresenceMessageRequiresAuthenticatedUser(): void + { + $client = $this->connectPresenceSocket(false); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'status' => 'online', + ], + ])); + + $response = \json_decode($client->receive(), true); + $this->assertSame('error', $response['type'] ?? null); + $this->assertSame(401, $response['data']['code'] ?? null); + $this->assertSame('User must be authorized', $response['data']['message'] ?? null); + + $client->close(); + } +} From cd6a6956d6392fe258b68d21b3eebaf7547fc30c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 15 Apr 2026 18:16:51 +0530 Subject: [PATCH 020/192] added channels and events generation --- src/Appwrite/Messaging/Adapter/Realtime.php | 5 ++ .../Modules/Presences/HTTP/Delete.php | 8 ++- .../Modules/Presences/HTTP/Update.php | 9 ++- .../Modules/Presences/HTTP/Upsert.php | 9 ++- .../Presence/PresenceRealtimeClientTest.php | 69 +++++++++++++++++++ tests/unit/Messaging/MessagingTest.php | 21 ++++++ 6 files changed, 118 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index d5ac905fd1..202f8246ff 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -589,6 +589,11 @@ class Realtime extends MessagingAdapter $roles = [Role::team($project->getAttribute('teamId'))->toString()]; } break; + case 'presences': + $channels[] = 'presences'; + $channels[] = 'presences.' . $parts[1]; + $roles = $payload->getRead(); + break; } return [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index f6af01de58..7853abe905 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; @@ -31,6 +32,9 @@ class Delete extends Base ->desc('Delete presence') ->groups(['api', 'presences']) ->label('scope', 'users.write') + ->label('event', 'presences.[presenceId].delete') + ->label('audits.event', 'presence.delete') + ->label('audits.resource', 'presence/{request.presenceId}') ->label('sdk', new Method( namespace: 'presences', group: 'presences', @@ -48,10 +52,11 @@ class Delete extends Base ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) ->inject('response') ->inject('dbForProject') + ->inject('queueForEvents') ->callback($this->action(...)); } - public function action(string $presenceId, Response $response, Database $dbForProject): void + public function action(string $presenceId, Response $response, Database $dbForProject, Event $queueForEvents): void { $presence = $dbForProject->getDocument('presenceLogs', $presenceId); @@ -60,6 +65,7 @@ class Delete extends Base } $dbForProject->deleteDocument('presenceLogs', $presenceId); + $queueForEvents->setParam('presenceId', $presence->getId()); $response->noContent(); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 71cd654068..3298108b04 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; use Appwrite\SDK\AuthType; @@ -35,6 +36,9 @@ class Update extends PresenceAction ->desc('Update presence') ->groups(['api', 'presences']) ->label('scope', 'users.write') + ->label('event', 'presences.[presenceId].update') + ->label('audits.event', 'presence.update') + ->label('audits.resource', 'presence/{response.$id}') ->label('sdk', new Method( namespace: 'presences', group: 'presences', @@ -58,6 +62,7 @@ class Update extends PresenceAction ->inject('dbForProject') ->inject('user') ->inject('authorization') + ->inject('queueForEvents') ->callback($this->action(...)); } @@ -71,7 +76,8 @@ class Update extends PresenceAction Response $response, Database $dbForProject, User $user, - Authorization $authorization + Authorization $authorization, + Event $queueForEvents ): void { $isAPIKey = $user->isApp($authorization->getRoles()); $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); @@ -118,6 +124,7 @@ class Update extends PresenceAction } $presence = $dbForProject->updateDocument('presenceLogs', $presenceId, $updates); + $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index feb17b10f9..8b7b3c8a47 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; use Appwrite\SDK\AuthType; @@ -39,6 +40,9 @@ class Upsert extends PresenceAction ->desc('Upsert presence') ->groups(['api', 'presences']) ->label('scope', 'users.write') + ->label('event', 'presences.[presenceId].upsert') + ->label('audits.event', 'presence.upsert') + ->label('audits.resource', 'presence/{response.$id}') ->label('sdk', new Method( namespace: 'presences', group: 'presences', @@ -63,6 +67,7 @@ class Upsert extends PresenceAction ->inject('dbForProject') ->inject('user') ->inject('authorization') + ->inject('queueForEvents') ->callback($this->action(...)); } @@ -76,7 +81,8 @@ class Upsert extends PresenceAction Response $response, Database $dbForProject, User $user, - Authorization $authorization + Authorization $authorization, + Event $queueForEvents ): void { $isAPIKey = $user->isApp($authorization->getRoles()); $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); @@ -121,6 +127,7 @@ class Upsert extends PresenceAction } $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); } diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index e99350e7fb..fcd54c6abb 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -208,4 +208,73 @@ class PresenceRealtimeClientTest extends Scope $client->close(); } + + public function testChannelParsing(): void + { + $presenceId = ID::unique(); + $userId = $this->getUser()['$id']; + $headers = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session'], + ]; + + $client = $this->getWebsocket(['presences', 'presences.' . $presenceId], $headers, timeout: 5); + $connected = \json_decode($client->receive(), true); + + $this->assertSame('connected', $connected['type'] ?? null); + $this->assertCount(2, $connected['data']['channels'] ?? []); + $this->assertContains('presences', $connected['data']['channels']); + $this->assertContains('presences.' . $presenceId, $connected['data']['channels']); + + $create = $this->client->call( + Client::METHOD_PUT, + '/presences/' . $presenceId, + $this->getServerHeaders(), + [ + 'userId' => $userId, + 'status' => 'online', + 'metadata' => ['source' => 'channel-parsing-create'], + 'permissions' => $this->getPresencePermissions($userId), + ] + ); + $this->assertSame(200, $create['headers']['status-code']); + + $createEvent = \json_decode($client->receive(), true); + $this->assertSame('event', $createEvent['type'] ?? null); + $this->assertContains('presences', $createEvent['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId, $createEvent['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId . '.upsert', $createEvent['data']['events'] ?? []); + + $update = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presenceId, + $this->getServerHeaders(), + [ + 'status' => 'away', + 'metadata' => ['source' => 'channel-parsing-update'], + ] + ); + $this->assertSame(200, $update['headers']['status-code']); + + $updateEvent = \json_decode($client->receive(), true); + $this->assertSame('event', $updateEvent['type'] ?? null); + $this->assertContains('presences', $updateEvent['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId, $updateEvent['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId . '.update', $updateEvent['data']['events'] ?? []); + + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presenceId, + $this->getServerHeaders() + ); + $this->assertSame(204, $delete['headers']['status-code']); + + $deleteEvent = \json_decode($client->receive(), true); + $this->assertSame('event', $deleteEvent['type'] ?? null); + $this->assertContains('presences', $deleteEvent['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId, $deleteEvent['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId . '.delete', $deleteEvent['data']['events'] ?? []); + + $client->close(); + } } diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index 4b2474c760..ba2ad3ac75 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -330,4 +330,25 @@ class MessagingTest extends TestCase $this->assertContains(Role::any()->toString(), $result['roles']); $this->assertContains(Role::team('123abc')->toString(), $result['roles']); } + + public function testFromPayloadPresenceChannels(): void + { + $presenceId = ID::custom('presence123'); + + $result = Realtime::fromPayload( + event: 'presences.' . $presenceId . '.upsert', + payload: new Document([ + '$id' => $presenceId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]), + ); + + $this->assertContains('presences', $result['channels']); + $this->assertContains('presences.' . $presenceId, $result['channels']); + $this->assertContains(Role::any()->toString(), $result['roles']); + } } From 3f06b5cd1a262aec82eaddbbfe59b7cc85af5d37 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 11:13:37 +0530 Subject: [PATCH 021/192] Enhance presence deletion by adding payload to event queue after document removal --- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 7853abe905..e3baaf9c3d 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -65,7 +65,10 @@ class Delete extends Base } $dbForProject->deleteDocument('presenceLogs', $presenceId); - $queueForEvents->setParam('presenceId', $presence->getId()); + + $queueForEvents + ->setParam('presenceId', $presence->getId()) + ->setPayload($response->output($presence, Response::MODEL_PRESENCE)); $response->noContent(); } From 1785a78fa1a038fae07324478d1f6876504115c8 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 11:15:04 +0530 Subject: [PATCH 022/192] added event validation tests --- .../e2e/Services/Presence/PresenceRealtimeClientTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index fcd54c6abb..299a12cadb 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -243,7 +243,10 @@ class PresenceRealtimeClientTest extends Scope $this->assertSame('event', $createEvent['type'] ?? null); $this->assertContains('presences', $createEvent['data']['channels'] ?? []); $this->assertContains('presences.' . $presenceId, $createEvent['data']['channels'] ?? []); + $this->assertNotEmpty($createEvent['data']['events'] ?? []); $this->assertContains('presences.' . $presenceId . '.upsert', $createEvent['data']['events'] ?? []); + $this->assertSame($presenceId, $createEvent['data']['payload']['$id'] ?? null); + $this->assertSame('online', $createEvent['data']['payload']['status'] ?? null); $update = $this->client->call( Client::METHOD_PATCH, @@ -260,7 +263,10 @@ class PresenceRealtimeClientTest extends Scope $this->assertSame('event', $updateEvent['type'] ?? null); $this->assertContains('presences', $updateEvent['data']['channels'] ?? []); $this->assertContains('presences.' . $presenceId, $updateEvent['data']['channels'] ?? []); + $this->assertNotEmpty($updateEvent['data']['events'] ?? []); $this->assertContains('presences.' . $presenceId . '.update', $updateEvent['data']['events'] ?? []); + $this->assertSame($presenceId, $updateEvent['data']['payload']['$id'] ?? null); + $this->assertSame('away', $updateEvent['data']['payload']['status'] ?? null); $delete = $this->client->call( Client::METHOD_DELETE, @@ -273,7 +279,9 @@ class PresenceRealtimeClientTest extends Scope $this->assertSame('event', $deleteEvent['type'] ?? null); $this->assertContains('presences', $deleteEvent['data']['channels'] ?? []); $this->assertContains('presences.' . $presenceId, $deleteEvent['data']['channels'] ?? []); + $this->assertNotEmpty($deleteEvent['data']['events'] ?? []); $this->assertContains('presences.' . $presenceId . '.delete', $deleteEvent['data']['events'] ?? []); + $this->assertSame($presenceId, $deleteEvent['data']['payload']['$id'] ?? null); $client->close(); } From abb96f650b3b711cad9bf46ec66120ff04aa0229 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 11:18:39 +0530 Subject: [PATCH 023/192] fix analyze --- src/Appwrite/Platform/Modules/Presences/HTTP/Action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php index 787d0f3081..8da53b34ee 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php @@ -57,7 +57,7 @@ class Action extends PlatformAction } } - $document->setAttribute('$permissions', $permissions ?? []); + $document->setAttribute('$permissions', $permissions); return $document; } From d28cce761d8090345ff2aa039d9fd02cccce1a2a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 11:20:52 +0530 Subject: [PATCH 024/192] updated to have permissions order deterministic --- app/realtime.php | 3 ++- src/Appwrite/Platform/Modules/Presences/HTTP/Action.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index 96ee315776..adf5294e9b 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -269,7 +269,8 @@ if (!function_exists('setPermission')) { } } } - $document->setAttribute('$permissions', $permissions ?? []); + sort($permissions, SORT_STRING); + $document->setAttribute('$permissions', $permissions); } } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php index 8da53b34ee..45bfa1a35c 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php @@ -57,6 +57,7 @@ class Action extends PlatformAction } } + sort($permissions, SORT_STRING); $document->setAttribute('$permissions', $permissions); return $document; From 0e3a017d5008b28cf61c229bf84f021db8ec16f2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 12:35:50 +0530 Subject: [PATCH 025/192] added realtime trigger --- app/realtime.php | 75 +++++++++++++++++-- .../Presence/PresenceRealtimeClientTest.php | 48 ++++++++++++ 2 files changed, 118 insertions(+), 5 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index adf5294e9b..acd15e7540 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -2,6 +2,8 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; +use Appwrite\Event\Event as QueueEvent; +use Appwrite\Event\Realtime as QueueRealtime; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; use Appwrite\PubSub\Adapter\Pool as PubSubPool; @@ -38,6 +40,7 @@ use Utopia\DI\Container; use Utopia\DSN\DSN; use Utopia\Logger\Log; use Utopia\Pools\Group; +use Utopia\Queue\Broker\Pool as BrokerPool; use Utopia\Registry\Registry; use Utopia\System\System; use Utopia\Telemetry\Adapter\None as NoTelemetry; @@ -224,6 +227,7 @@ if (!function_exists('getRealtime')) { } } + if (!function_exists('getTelemetry')) { function getTelemetry(int $workerId): Utopia\Telemetry\Adapter { @@ -243,6 +247,57 @@ if (!function_exists('triggerStats')) { } } +if (!function_exists('triggerPresenceEvent')) { + function getQueueForEventsForProject(Document $project, User $user): QueueEvent + { + global $register; + + /** @var Group $pools */ + $pools = $register->get('pools'); + + $queueForEvents = new QueueEvent(new BrokerPool( + publisher: $pools->get('publisher') + )); + + $queueForEvents->setProject($project); + $queueForEvents->setUser($user); + + return $queueForEvents; + } + + function triggerPresenceEvent( + Server $server, + Realtime $realtime, + Document $project, + User $user, + string $eventName, + Document $presence + ): void { + if ($project->isEmpty() || $presence->isEmpty()) { + return; + } + + try { + $queueForEvents = getQueueForEventsForProject($project, $user); + $queueForEvents + ->setEvent($eventName) + ->setParam('presenceId', $presence->getId()) + ->setPayload($presence->getArrayCopy()); + + (new QueueRealtime()) + ->setProject($project) + ->setUser($user) + ->from($queueForEvents) + ->trigger(); + } catch (Throwable $th) { + logError($th, 'realtimePresenceEvent', tags: [ + 'projectId' => $project->getId(), + 'event' => $eventName, + ]); + } + } +} + if (!function_exists('setPermission')) { function setPermission(Document $document, ?array $permissions, Authorization $authorization): void { @@ -1181,6 +1236,8 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } } + triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); + break; default: @@ -1216,7 +1273,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } }); -$server->onClose(function (int $connection) use ($realtime, $stats, $register) { +$server->onClose(function (int $connection) use ($server, $realtime, $stats, $register) { try { if (array_key_exists($connection, $realtime->connections)) { $stats->decr($realtime->connections[$connection]['projectId'], 'connectionsTotal'); @@ -1236,13 +1293,21 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { $consoleDB = getConsoleDB(); $project = $consoleDB->getAuthorization()->skip(fn () => $consoleDB->getDocument('projects', $projectId)); + // todo: have a bulk delete if (!$project->isEmpty()) { $dbForProject = getProjectDB($project); - $dbForProject->deleteDocuments('presenceLogs', [ + $presences = $dbForProject->find('presenceLogs', [ Query::equal('$id', $presenceIds), - ], onError: function (Throwable $th) { - // Swallow errors to avoid breaking disconnect cleanup - }); + ]); + + foreach ($presences as $presence) { + try { + $dbForProject->deleteDocument('presenceLogs', $presence->getId()); + triggerPresenceEvent($server, $realtime, $project, new User([]), 'presences.[presenceId].delete', $presence); + } catch (Throwable) { + // Swallow errors to avoid breaking disconnect cleanup + } + } } } } diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index 299a12cadb..9889e84105 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -285,4 +285,52 @@ class PresenceRealtimeClientTest extends Scope $client->close(); } + + public function testPresenceMessageEmitsCreateAndDeleteEvents(): void + { + $presenceId = ID::unique(); + $userId = $this->getUser()['$id']; + $headers = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session'], + ]; + + $listener = $this->getWebsocket(['presences', 'presences.' . $presenceId], $headers, timeout: 8); + $connected = \json_decode($listener->receive(), true); + $this->assertSame('connected', $connected['type'] ?? null); + + $publisher = $this->connectPresenceSocket(true, timeout: 8); + + $publisher->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'online', + 'metadata' => [ + 'source' => 'realtime-create-delete-events', + ], + 'permissions' => $this->getPresencePermissions($userId), + ], + ])); + + $createResponse = \json_decode($publisher->receive(), true); + $this->assertSame('response', $createResponse['type'] ?? null); + $this->assertSame('presence', $createResponse['data']['to'] ?? null); + $this->assertSame($presenceId, $createResponse['data']['presence']['$id'] ?? null); + + $createEvent = \json_decode($listener->receive(), true); + $this->assertSame('event', $createEvent['type'] ?? null); + $this->assertContains('presences.' . $presenceId . '.upsert', $createEvent['data']['events'] ?? []); + $this->assertSame($presenceId, $createEvent['data']['payload']['$id'] ?? null); + $this->assertSame('online', $createEvent['data']['payload']['status'] ?? null); + + $publisher->close(); + + $deleteEvent = \json_decode($listener->receive(), true); + $this->assertSame('event', $deleteEvent['type'] ?? null); + $this->assertContains('presences.' . $presenceId . '.delete', $deleteEvent['data']['events'] ?? []); + $this->assertSame($presenceId, $deleteEvent['data']['payload']['$id'] ?? null); + + $listener->close(); + } } From 4fea92c9cbcb54316e0209a33142ddd6ceecd3c1 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 17:47:34 +0530 Subject: [PATCH 026/192] Refactor realtime authorization handling and enhance presence event tests. Updated authorization roles synchronization in the realtime connection and added exception handling for user retrieval. Improved connection pool size logic for PubSub workers and added comprehensive tests for presence events to ensure correct message ordering and validation. --- app/init/registers.php | 8 +- app/realtime.php | 19 +- .../Presence/PresenceRealtimeClientTest.php | 482 ++++++++++++++++-- 3 files changed, 457 insertions(+), 52 deletions(-) diff --git a/app/init/registers.php b/app/init/registers.php index c07bc9da8b..ceb46c5f56 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -333,7 +333,13 @@ $register->set('pools', function () { $poolAdapter = System::getEnv('_APP_POOL_ADAPTER', default: 'stack') === 'swoole' ? new SwoolePool() : new StackPool(); - $pool = new Pool($poolAdapter, $name, $poolSize, function () use ($type, $resource, $dsn) { + // PubSub workers hold one long-lived subscribed connection and also need + // spare capacity for publishes from the same process. + $connectionPoolSize = $type === 'pubsub' + ? max(2, $poolSize) + : $poolSize; + + $pool = new Pool($poolAdapter, $name, $connectionPoolSize, function () use ($type, $resource, $dsn) { // Get Adapter switch ($type) { case 'database': diff --git a/app/realtime.php b/app/realtime.php index acd15e7540..aae66036d7 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1,9 +1,9 @@ onMessage(function (int $connection, string $message) use ($server, $re $authorization = new Authorization(); } + // Ensure `$authorization` contains the same roles as the realtime connection. + // `setPermission()` validates against `$authorization->getRoles()`, but roles are + // computed/stored separately in the realtime adapter connection tree. + $connectionRoles = $realtime->connections[$connection]['roles'] ?? []; + foreach ($connectionRoles as $role) { + if ($authorization->hasRole($role)) { + continue; + } + $authorization->addRole($role); + } + $database = getConsoleDB(); $database->setAuthorization($authorization); @@ -1178,6 +1189,10 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re /** @var User $user */ $user = $database->getDocument('users', $userId); + if ($user->isEmpty()) { + throw new Exception(Exception::USER_NOT_FOUND, params:[$userId]); + } + if (!is_array($message['data'])) { throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); } diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index 9889e84105..7ff586b491 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -12,6 +12,7 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use WebSocket\Client as WebSocketClient; +use WebSocket\TimeoutException; class PresenceRealtimeClientTest extends Scope { @@ -19,6 +20,130 @@ class PresenceRealtimeClientTest extends Scope use RealtimeBase; use SideClient; + private function assertPresenceRealtimeEvent( + array $event, + string $presenceId, + string $action, + string $status, + array $metadata = [], + ?string $expectedUserId = null + ): void { + $expectedUserId ??= $this->getUser()['$id']; + $this->assertSame('event', $event['type'] ?? null); + $this->assertContains('presences', $event['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId, $event['data']['channels'] ?? []); + $this->assertNotEmpty($event['data']['events'] ?? []); + $this->assertContains('presences.' . $presenceId . '.' . $action, $event['data']['events'] ?? []); + $this->assertNotEmpty($event['data']['timestamp'] ?? null); + $this->assertArrayHasKey('subscriptions', $event['data'] ?? []); + $this->assertNotEmpty($event['data']['subscriptions'] ?? []); + $this->assertSame($presenceId, $event['data']['payload']['$id'] ?? null); + $this->assertSame($status, $event['data']['payload']['status'] ?? null); + $this->assertSame($metadata, $event['data']['payload']['metadata'] ?? []); + $this->assertSame($expectedUserId, $event['data']['payload']['userId'] ?? null); + } + + private function assertNoRealtimeEvent(WebSocketClient $client): void + { + try { + $client->receive(); + $this->fail('Expected TimeoutException - event should not be received'); + } catch (TimeoutException $e) { + $this->assertTrue(true); + } + } + + /** + * Presence websocket contract: after sending a `type: presence` message, + * the sender socket should receive: + * 1) `type: response` (for the persistence write) + * 2) `type: event` (for the realtime upsert) + * + * This keeps the tests strict about ordering and avoids leaving unread + * realtime events in the socket buffer for later assertions. + */ + private function assertPresenceResponseThenUpsertEvent( + WebSocketClient $client, + string $expectedStatus, + array $expectedMetadata, + ?string $expectedUserId = null + ): string { + $expectedUserId ??= $this->getUser()['$id']; + + $presenceId = null; + $response = null; + $event = null; + + // Ordering is not guaranteed because: + // - response is sent directly via $server->send(...) + // - event is emitted via pub/sub and may arrive earlier + for ($attempts = 0; $attempts < 5; $attempts++) { + $message = \json_decode($client->receive(), true); + $type = $message['type'] ?? null; + + if ($type === 'response') { + $response ??= $message; + + $this->assertSame('presence', $response['data']['to'] ?? null); + $presenceId ??= $response['data']['presence']['$id'] ?? null; + $this->assertNotEmpty($presenceId); + $this->assertSame($expectedStatus, $response['data']['presence']['status'] ?? null); + $this->assertSame($expectedMetadata, $response['data']['presence']['metadata'] ?? null); + } elseif ($type === 'event') { + $event ??= $message; + $presenceId ??= $event['data']['payload']['$id'] ?? null; + $this->assertNotEmpty($presenceId); + + $this->assertPresenceRealtimeEvent( + $event, + $presenceId, + 'upsert', + $expectedStatus, + $expectedMetadata, + $expectedUserId + ); + } + + if ($response !== null && $event !== null) { + return $presenceId; + } + } + + $this->fail('Expected both realtime presence `response` and `event` messages'); + return ''; + } + + /** + * After getting a `response` for a presence message, the next interesting + * realtime message should be the corresponding `event` for the same presence id. + */ + private function receivePresenceEvent( + WebSocketClient $client, + string $presenceId, + string $action, + string $status, + array $expectedMetadata, + ?string $expectedUserId = null + ): array { + do { + $message = \json_decode($client->receive(), true); + } while ( + ($message['type'] ?? null) !== 'event' + || ($message['data']['payload']['$id'] ?? null) !== $presenceId + ); + + $this->assertPresenceRealtimeEvent( + $message, + $presenceId, + $action, + $status, + $expectedMetadata, + $expectedUserId + ); + + return $message; + } + private function connectPresenceSocket(bool $authenticated = true, int $timeout = 2): WebSocketClient { $headers = [ @@ -61,7 +186,7 @@ class PresenceRealtimeClientTest extends Scope { $presenceId = ID::unique(); $userId = $this->getUser()['$id']; - $client = $this->connectPresenceSocket(); + $client = $this->connectPresenceSocket(true, 5); $client->send(\json_encode([ 'type' => 'presence', @@ -75,13 +200,12 @@ class PresenceRealtimeClientTest extends Scope ], ])); - $response = \json_decode($client->receive(), true); - $this->assertSame('response', $response['type'] ?? null); - $this->assertSame('presence', $response['data']['to'] ?? null); - $this->assertSame($presenceId, $response['data']['presence']['$id'] ?? null); - $this->assertSame($userId, $response['data']['presence']['userId'] ?? null); - $this->assertSame('online', $response['data']['presence']['status'] ?? null); - $this->assertSame(['device' => 'web'], $response['data']['presence']['metadata'] ?? null); + $this->assertPresenceResponseThenUpsertEvent( + $client, + 'online', + ['device' => 'web'], + $userId + ); $read = $this->client->call( Client::METHOD_GET, @@ -102,7 +226,7 @@ class PresenceRealtimeClientTest extends Scope { $presenceId = ID::unique(); $userId = $this->getUser()['$id']; - $client = $this->connectPresenceSocket(); + $client = $this->connectPresenceSocket(true, 5); $client->send(\json_encode([ 'type' => 'presence', @@ -115,10 +239,12 @@ class PresenceRealtimeClientTest extends Scope 'permissions' => $this->getPresencePermissions($userId), ], ])); - $first = \json_decode($client->receive(), true); - $this->assertSame('response', $first['type'] ?? null); - $this->assertSame($presenceId, $first['data']['presence']['$id'] ?? null); - $this->assertSame('away', $first['data']['presence']['status'] ?? null); + $this->assertPresenceResponseThenUpsertEvent( + $client, + 'away', + ['source' => 'first'], + $userId + ); $client->send(\json_encode([ 'type' => 'presence', @@ -131,11 +257,12 @@ class PresenceRealtimeClientTest extends Scope 'permissions' => $this->getPresencePermissions($userId), ], ])); - $second = \json_decode($client->receive(), true); - $this->assertSame('response', $second['type'] ?? null); - $this->assertSame($presenceId, $second['data']['presence']['$id'] ?? null); - $this->assertSame('busy', $second['data']['presence']['status'] ?? null); - $this->assertSame(['source' => 'second'], $second['data']['presence']['metadata'] ?? null); + $this->assertPresenceResponseThenUpsertEvent( + $client, + 'busy', + ['source' => 'second'], + $userId + ); $list = $this->client->call( Client::METHOD_GET, @@ -160,6 +287,70 @@ class PresenceRealtimeClientTest extends Scope $client->close(); } + public function testPresenceMessageUpsertWithSameUserPersistsSingleRecord(): void + { + $firstPresenceId = ID::unique(); + $secondPresenceId = ID::unique(); + $userId = $this->getUser()['$id']; + $client = $this->connectPresenceSocket(true, 5); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $firstPresenceId, + 'status' => 'away', + 'metadata' => [ + 'source' => 'first-user-upsert', + ], + 'permissions' => $this->getPresencePermissions($userId), + ], + ])); + $this->assertPresenceResponseThenUpsertEvent( + $client, + 'away', + ['source' => 'first-user-upsert'], + $userId + ); + + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $secondPresenceId, + 'status' => 'busy', + 'metadata' => [ + 'source' => 'second-user-upsert', + ], + 'permissions' => $this->getPresencePermissions($userId), + ], + ])); + $this->assertPresenceResponseThenUpsertEvent( + $client, + 'busy', + ['source' => 'second-user-upsert'], + $userId + ); + + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + $this->getServerHeaders(), + [ + 'queries' => [ + Query::equal('userId', [$userId])->toString(), + ], + ] + ); + + $this->assertSame(200, $list['headers']['status-code']); + $this->assertSame(1, $list['body']['total']); + $this->assertCount(1, $list['body']['presences']); + $this->assertSame($userId, $list['body']['presences'][0]['userId']); + $this->assertSame('busy', $list['body']['presences'][0]['status']); + $this->assertSame(['source' => 'second-user-upsert'], $list['body']['presences'][0]['metadata']); + + $client->close(); + } + public function testPresenceMessageValidationErrors(): void { $client = $this->connectPresenceSocket(); @@ -240,13 +431,13 @@ class PresenceRealtimeClientTest extends Scope $this->assertSame(200, $create['headers']['status-code']); $createEvent = \json_decode($client->receive(), true); - $this->assertSame('event', $createEvent['type'] ?? null); - $this->assertContains('presences', $createEvent['data']['channels'] ?? []); - $this->assertContains('presences.' . $presenceId, $createEvent['data']['channels'] ?? []); - $this->assertNotEmpty($createEvent['data']['events'] ?? []); - $this->assertContains('presences.' . $presenceId . '.upsert', $createEvent['data']['events'] ?? []); - $this->assertSame($presenceId, $createEvent['data']['payload']['$id'] ?? null); - $this->assertSame('online', $createEvent['data']['payload']['status'] ?? null); + $this->assertPresenceRealtimeEvent( + $createEvent, + $presenceId, + 'upsert', + 'online', + ['source' => 'channel-parsing-create'] + ); $update = $this->client->call( Client::METHOD_PATCH, @@ -260,13 +451,13 @@ class PresenceRealtimeClientTest extends Scope $this->assertSame(200, $update['headers']['status-code']); $updateEvent = \json_decode($client->receive(), true); - $this->assertSame('event', $updateEvent['type'] ?? null); - $this->assertContains('presences', $updateEvent['data']['channels'] ?? []); - $this->assertContains('presences.' . $presenceId, $updateEvent['data']['channels'] ?? []); - $this->assertNotEmpty($updateEvent['data']['events'] ?? []); - $this->assertContains('presences.' . $presenceId . '.update', $updateEvent['data']['events'] ?? []); - $this->assertSame($presenceId, $updateEvent['data']['payload']['$id'] ?? null); - $this->assertSame('away', $updateEvent['data']['payload']['status'] ?? null); + $this->assertPresenceRealtimeEvent( + $updateEvent, + $presenceId, + 'update', + 'away', + ['source' => 'channel-parsing-update'] + ); $delete = $this->client->call( Client::METHOD_DELETE, @@ -276,12 +467,13 @@ class PresenceRealtimeClientTest extends Scope $this->assertSame(204, $delete['headers']['status-code']); $deleteEvent = \json_decode($client->receive(), true); - $this->assertSame('event', $deleteEvent['type'] ?? null); - $this->assertContains('presences', $deleteEvent['data']['channels'] ?? []); - $this->assertContains('presences.' . $presenceId, $deleteEvent['data']['channels'] ?? []); - $this->assertNotEmpty($deleteEvent['data']['events'] ?? []); - $this->assertContains('presences.' . $presenceId . '.delete', $deleteEvent['data']['events'] ?? []); - $this->assertSame($presenceId, $deleteEvent['data']['payload']['$id'] ?? null); + $this->assertPresenceRealtimeEvent( + $deleteEvent, + $presenceId, + 'delete', + 'away', + ['source' => 'channel-parsing-update'] + ); $client->close(); } @@ -298,6 +490,11 @@ class PresenceRealtimeClientTest extends Scope $listener = $this->getWebsocket(['presences', 'presences.' . $presenceId], $headers, timeout: 8); $connected = \json_decode($listener->receive(), true); $this->assertSame('connected', $connected['type'] ?? null); + $this->assertCount(2, $connected['data']['channels'] ?? []); + $this->assertContains('presences', $connected['data']['channels'] ?? []); + $this->assertContains('presences.' . $presenceId, $connected['data']['channels'] ?? []); + $this->assertCount(1, $connected['data']['subscriptions'] ?? []); + $this->assertNotEmpty(array_values($connected['data']['subscriptions'] ?? [])); $publisher = $this->connectPresenceSocket(true, timeout: 8); @@ -313,24 +510,211 @@ class PresenceRealtimeClientTest extends Scope ], ])); - $createResponse = \json_decode($publisher->receive(), true); - $this->assertSame('response', $createResponse['type'] ?? null); - $this->assertSame('presence', $createResponse['data']['to'] ?? null); - $this->assertSame($presenceId, $createResponse['data']['presence']['$id'] ?? null); + $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( + $publisher, + 'online', + ['source' => 'realtime-create-delete-events'], + $userId + ); + $this->assertSame($presenceId, $receivedPresenceId); $createEvent = \json_decode($listener->receive(), true); - $this->assertSame('event', $createEvent['type'] ?? null); - $this->assertContains('presences.' . $presenceId . '.upsert', $createEvent['data']['events'] ?? []); - $this->assertSame($presenceId, $createEvent['data']['payload']['$id'] ?? null); - $this->assertSame('online', $createEvent['data']['payload']['status'] ?? null); + $this->assertPresenceRealtimeEvent( + $createEvent, + $presenceId, + 'upsert', + 'online', + ['source' => 'realtime-create-delete-events'] + ); $publisher->close(); $deleteEvent = \json_decode($listener->receive(), true); - $this->assertSame('event', $deleteEvent['type'] ?? null); - $this->assertContains('presences.' . $presenceId . '.delete', $deleteEvent['data']['events'] ?? []); - $this->assertSame($presenceId, $deleteEvent['data']['payload']['$id'] ?? null); + $this->assertPresenceRealtimeEvent( + $deleteEvent, + $presenceId, + 'delete', + 'online', + ['source' => 'realtime-create-delete-events'] + ); $listener->close(); } + + public function testPresencePermission(): void + { + $presenceIdAny = ID::unique(); + $presenceIdUsers = ID::unique(); + $presenceIdOwner = ID::unique(); + + $user1 = $this->getUser(); + $user1Id = $user1['$id']; + $user2 = $this->getUser(true); + $user3 = $this->getUser(true); + $projectId = $this->getProject()['$id']; + + $user1Headers = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user1['session'], + ]; + + $user2Headers = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user2['session'], + ]; + + $user3Headers = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user3['session'], + ]; + + $user1Listener = $this->getWebsocket(['presences', 'presences.' . $presenceIdAny, 'presences.' . $presenceIdUsers, 'presences.' . $presenceIdOwner], $user1Headers, timeout: 3); + $user2Listener = $this->getWebsocket(['presences', 'presences.' . $presenceIdAny, 'presences.' . $presenceIdUsers, 'presences.' . $presenceIdOwner], $user2Headers, timeout: 3); + $user3Listener = $this->getWebsocket(['presences', 'presences.' . $presenceIdAny, 'presences.' . $presenceIdUsers, 'presences.' . $presenceIdOwner], $user3Headers, timeout: 3); + + $this->assertSame('connected', (\json_decode($user1Listener->receive(), true))['type'] ?? null); + $this->assertSame('connected', (\json_decode($user2Listener->receive(), true))['type'] ?? null); + $this->assertSame('connected', (\json_decode($user3Listener->receive(), true))['type'] ?? null); + + $publisher = $this->getWebsocket(['presences'], $user1Headers, timeout: 5); + $this->assertSame('connected', (\json_decode($publisher->receive(), true))['type'] ?? null); + + $publisher->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceIdAny, + 'status' => 'online', + 'metadata' => [ + 'visibility' => 'any', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ], + ])); + + $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( + $publisher, + 'online', + ['visibility' => 'any'], + $user1Id + ); + $this->assertSame($presenceIdAny, $receivedPresenceId); + + $this->assertPresenceRealtimeEvent( + \json_decode($user1Listener->receive(), true), + $presenceIdAny, + 'upsert', + 'online', + ['visibility' => 'any'], + $user1Id + ); + $this->assertPresenceRealtimeEvent( + \json_decode($user2Listener->receive(), true), + $presenceIdAny, + 'upsert', + 'online', + ['visibility' => 'any'], + $user1Id + ); + $this->assertPresenceRealtimeEvent( + \json_decode($user3Listener->receive(), true), + $presenceIdAny, + 'upsert', + 'online', + ['visibility' => 'any'], + $user1Id + ); + + $publisher->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceIdUsers, + 'status' => 'away', + 'metadata' => [ + 'visibility' => 'users', + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ], + ])); + + $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( + $publisher, + 'away', + ['visibility' => 'users'], + $user1Id + ); + $this->assertSame($presenceIdUsers, $receivedPresenceId); + + $this->assertPresenceRealtimeEvent( + \json_decode($user1Listener->receive(), true), + $presenceIdUsers, + 'upsert', + 'away', + ['visibility' => 'users'], + $user1Id + ); + $this->assertPresenceRealtimeEvent( + \json_decode($user3Listener->receive(), true), + $presenceIdUsers, + 'upsert', + 'away', + ['visibility' => 'users'], + $user1Id + ); + $this->assertPresenceRealtimeEvent( + \json_decode($user2Listener->receive(), true), + $presenceIdUsers, + 'upsert', + 'away', + ['visibility' => 'users'], + $user1Id + ); + + $publisher->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceIdOwner, + 'status' => 'busy', + 'metadata' => [ + 'visibility' => 'owner', + ], + 'permissions' => [ + Permission::read(Role::user($user1Id)), + Permission::update(Role::user($user1Id)), + Permission::delete(Role::user($user1Id)), + ], + ], + ])); + + $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( + $publisher, + 'busy', + ['visibility' => 'owner'], + $user1Id + ); + $this->assertSame($presenceIdOwner, $receivedPresenceId); + + $this->assertPresenceRealtimeEvent( + \json_decode($user1Listener->receive(), true), + $presenceIdOwner, + 'upsert', + 'busy', + ['visibility' => 'owner'], + $user1Id + ); + $this->assertNoRealtimeEvent($user2Listener); + $this->assertNoRealtimeEvent($user3Listener); + + $publisher->close(); + $user1Listener->close(); + $user2Listener->close(); + $user3Listener->close(); + } } From a480d8ed733ce74c861aa18ca35616f1b5861ad8 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 18:11:01 +0530 Subject: [PATCH 027/192] updated realtime --- app/realtime.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index aae66036d7..9c8ad2d0ab 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -30,6 +30,7 @@ use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Exception\Duplicate; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -1224,8 +1225,19 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re if ($presenceId !== 'unique()') { $presenceDocument->setAttribute('$id', $presenceId); } - - $presence = $database->upsertDocument('presenceLogs', $presenceDocument); + /** @var Document|null $presence */ + $presence = null; + try { + $presence = $database->upsertDocument('presenceLogs', $presenceDocument); + } catch (Duplicate $th) { + // will be triggerd in case of mongodb adapter everytime as $id needs to be same as well here + // in mongodb , upsert works on basis of set and unset by comparing the document with the existing one + // if presenceId differs then it will create a new document and not update the existing one + // TODO: send better error message telling about the presenceId mismatch + $existingPresence = $database->findOne('presenceLogs', [Query::equal('userId', [$userId])]); + $presenceDocument->setAttribute('$id', $existingPresence->getId()); + $presence = $database->upsertDocument('presenceLogs', $presenceDocument); + } $presence->removeAttribute('hostname'); From 2ef62b309eaa747dccbd6c64d2293104d718da26 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 18:14:13 +0530 Subject: [PATCH 028/192] Refactor presence upsert logic to handle duplicate entries. Added exception handling for MongoDB adapter to update existing documents instead of creating new ones when presenceId mismatches occur. --- app/realtime.php | 3 +-- .../Platform/Modules/Presences/HTTP/Upsert.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 9c8ad2d0ab..6dbee667e3 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1235,8 +1235,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re // if presenceId differs then it will create a new document and not update the existing one // TODO: send better error message telling about the presenceId mismatch $existingPresence = $database->findOne('presenceLogs', [Query::equal('userId', [$userId])]); - $presenceDocument->setAttribute('$id', $existingPresence->getId()); - $presence = $database->upsertDocument('presenceLogs', $presenceDocument); + $presence = $database->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); } $presence->removeAttribute('hostname'); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 8b7b3c8a47..5b6d6051a2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -13,6 +13,7 @@ use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Exception\Duplicate; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Permissions; @@ -125,8 +126,16 @@ class Upsert extends PresenceAction if ($presenceId !== 'unique()') { $presenceDocument->setAttribute('$id', $presenceId); } - - $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + try { + $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + } catch (Duplicate $th) { + // will be triggerd in case of mongodb adapter everytime as $id needs to be same as well here + // in mongodb , upsert works on basis of set and unset by comparing the document with the existing one + // if presenceId differs then it will create a new document and not update the existing one + // TODO: send better error message telling about the presenceId mismatch + $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); + $presence = $dbForProject->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); + } $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); From 70f42a0dff50a59d75bf0e81b8dab7bf640608f2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 16 Apr 2026 18:16:09 +0530 Subject: [PATCH 029/192] added presences to the tests --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8256ddc7a..679e62f407 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -424,7 +424,8 @@ jobs: VCS, Messaging, Migrations, - Project + Project, + Presences ] include: - service: Databases From 52dbf14d791a62457d5df3e5da31cd6f7a1f99b2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:01:04 +0530 Subject: [PATCH 030/192] updated ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 679e62f407..342228a44e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -425,7 +425,7 @@ jobs: Messaging, Migrations, Project, - Presences + Presence ] include: - service: Databases From ee34e2b5873b5c31f04511ccc072fe3f126b6284 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:01:34 +0530 Subject: [PATCH 031/192] created a helper for the duplicated logic between realtime and http api --- src/Appwrite/Databases/PresenceState.php | 131 +++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 src/Appwrite/Databases/PresenceState.php diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php new file mode 100644 index 0000000000..a29ad46bb3 --- /dev/null +++ b/src/Appwrite/Databases/PresenceState.php @@ -0,0 +1,131 @@ +isApp($authorization->getRoles()); + $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); + + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + Database::PERMISSION_WRITE, + ]; + + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId()) && !$isPrivilegedUser) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } + } + } + + if (!$isAPIKey && !$isPrivilegedUser) { + $this->assertPermissionsAgainstAuthorization($permissions, $authorization); + } + + sort($permissions, SORT_STRING); + $document->setAttribute('$permissions', $permissions); + + return $document; + } + + public function upsertForUser(Database $dbForProject, Document $presenceDocument, string $presenceId, string $userId): Document + { + if ($presenceId !== 'unique()') { + $presenceDocument->setAttribute('$id', $presenceId); + } + + try { + return $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + } catch (DuplicateException $e) { + return $this->upsertFallback($dbForProject, $presenceDocument, $presenceId, $userId, $e); + } catch (NotFoundException $e) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId], previous: $e); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); + } catch (ConflictException $e) { + throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT, $e->getMessage(), previous: $e); + } + } + + private function upsertFallback( + Database $dbForProject, + Document $presenceDocument, + string $presenceId, + string $userId, + DuplicateException $previous + ): Document { + try { + return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId, $previous) { + $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); + + if ($existingPresence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $previous); + } + + // Lock the current state before update to avoid races on duplicate fallback. + $currentPresence = $dbForProject->getDocument('presenceLogs', $existingPresence->getId(), forUpdate: true); + + if ($currentPresence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); + } + + return $dbForProject->updateDocument('presenceLogs', $currentPresence->getId(), $presenceDocument); + }); + } catch (DuplicateException $e) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); + } catch (NotFoundException $e) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId], previous: $e); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage(), previous: $e); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); + } catch (ConflictException $e) { + throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT, $e->getMessage(), previous: $e); + } + } + + private function assertPermissionsAgainstAuthorization(array $permissions, Authorization $authorization): void + { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + + if (!$authorization->hasRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $authorization->getRoles()) . ')'); + } + } + } + } +} From 0d2a4da3470fdd025ee4edfbc0ffce659bbe4fbb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:01:56 +0530 Subject: [PATCH 032/192] updated the presence helper --- app/realtime.php | 23 ++++--------------- .../Modules/Presences/HTTP/Upsert.php | 20 ++++------------ 2 files changed, 9 insertions(+), 34 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 6dbee667e3..7fea934567 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1,5 +1,6 @@ set('pools', function ($register) { }, ['register']); $realtime = getRealtime(); +$presenceState = new PresenceState(); /** * Table for statistics across all workers. @@ -915,7 +916,7 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, } }); -$server->onMessage(function (int $connection, string $message) use ($server, $realtime, $containerId) { +$server->onMessage(function (int $connection, string $message) use ($server, $realtime, $containerId, $presenceState) { $project = null; $authorization = null; try { @@ -1219,24 +1220,10 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $presenceData['metadata'] = $message['data']['metadata']; } $presenceDocument = new Document($presenceData); - setPermission($presenceDocument, $message['data']['permissions'] ?? null, $authorization); + $presenceState->setPermissions($presenceDocument, $message['data']['permissions'] ?? null, $user, $authorization); $presenceId = $message['data']['presenceId'] ?? 'unique()'; - if ($presenceId !== 'unique()') { - $presenceDocument->setAttribute('$id', $presenceId); - } - /** @var Document|null $presence */ - $presence = null; - try { - $presence = $database->upsertDocument('presenceLogs', $presenceDocument); - } catch (Duplicate $th) { - // will be triggerd in case of mongodb adapter everytime as $id needs to be same as well here - // in mongodb , upsert works on basis of set and unset by comparing the document with the existing one - // if presenceId differs then it will create a new document and not update the existing one - // TODO: send better error message telling about the presenceId mismatch - $existingPresence = $database->findOne('presenceLogs', [Query::equal('userId', [$userId])]); - $presence = $database->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); - } + $presence = $presenceState->upsertForUser($database, $presenceDocument, $presenceId, $userId); $presence->removeAttribute('hostname'); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 5b6d6051a2..eece989311 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Databases\PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; @@ -13,7 +14,6 @@ use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; -use Utopia\Database\Exception\Duplicate; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Permissions; @@ -120,22 +120,10 @@ class Upsert extends PresenceAction 'metadata' => $metadata, ]; + $presenceState = new PresenceState(); $presenceDocument = new Document($presenceData); - $this->setPermission($presenceDocument, $permissions, $user, $authorization); - - if ($presenceId !== 'unique()') { - $presenceDocument->setAttribute('$id', $presenceId); - } - try { - $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); - } catch (Duplicate $th) { - // will be triggerd in case of mongodb adapter everytime as $id needs to be same as well here - // in mongodb , upsert works on basis of set and unset by comparing the document with the existing one - // if presenceId differs then it will create a new document and not update the existing one - // TODO: send better error message telling about the presenceId mismatch - $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); - $presence = $dbForProject->updateDocument('presenceLogs', $existingPresence->getId(), $presenceDocument); - } + $presenceState->setPermissions($presenceDocument, $permissions, $user, $authorization); + $presence = $presenceState->upsertForUser($dbForProject, $presenceDocument, $presenceId, $resolvedUserId); $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); From 1f27769cc9b776893598d536dccaf87d40a29008 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:02:07 +0530 Subject: [PATCH 033/192] added catching of the exceptions --- .../Platform/Modules/Presences/HTTP/Delete.php | 10 +++++++++- .../Platform/Modules/Presences/HTTP/Get.php | 1 - .../Platform/Modules/Presences/HTTP/Update.php | 16 +++++++++++++++- .../Platform/Modules/Presences/HTTP/XList.php | 6 ++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index e3baaf9c3d..32a497ed64 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -11,6 +11,8 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; use Utopia\Database\Database; +use Utopia\Database\Exception\Conflict as ConflictException; +use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; @@ -64,7 +66,13 @@ class Delete extends Base throw new Exception(Exception::DOCUMENT_NOT_FOUND); } - $dbForProject->deleteDocument('presenceLogs', $presenceId); + try { + $dbForProject->deleteDocument('presenceLogs', $presenceId); + } catch (ConflictException) { + throw new Exception(Exception::DOCUMENT_DELETE_RESTRICTED); + } catch (RestrictedException) { + throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT); + } $queueForEvents ->setParam('presenceId', $presence->getId()) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 240a2f7bf4..75323d500e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -52,7 +52,6 @@ class Get extends Base public function action(string $presenceId, Response $response, Database $dbForProject): void { $presence = $dbForProject->getDocument('presenceLogs', $presenceId); - if ($presence->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 3298108b04..e932a2b42a 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -12,6 +12,9 @@ use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Document; +use Utopia\Database\Exception\Conflict as ConflictException; +use Utopia\Database\Exception\Duplicate; +use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Permissions; @@ -97,6 +100,9 @@ class Update extends PresenceAction if ($userId !== null) { $updateData['userId'] = $userId; $userDoc = $dbForProject->getDocument('users', $userId); + if ($userDoc->isEmpty()) { + throw new Exception(Exception::USER_NOT_FOUND, params: [$userId]); + } $updateData['userInternalId'] = $userDoc->getSequence(); } @@ -123,7 +129,15 @@ class Update extends PresenceAction return; } - $presence = $dbForProject->updateDocument('presenceLogs', $presenceId, $updates); + try { + $presence = $dbForProject->updateDocument('presenceLogs', $presenceId, $updates); + } catch (Duplicate $e) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); + } catch (ConflictException $e) { + throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT, $e->getMessage(), previous: $e); + } $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 64b8a80d31..fb8203c7e2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -13,6 +13,8 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; +use Utopia\Database\Exception\Relationship as RelationshipException; +use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Query; use Utopia\Database\Validator\Query\Cursor; use Utopia\Platform\Action; @@ -94,6 +96,10 @@ class XList extends Base $total = $includeTotal ? $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT) : 0; } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage(), previous: $e); } $response->dynamic(new Document([ From a4b6d9a63563bbda7c40c8b1e7e398b896cf96f4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:02:17 +0530 Subject: [PATCH 034/192] updated tests and reduce the timeouts --- tests/e2e/Services/Presence/PresenceBase.php | 24 +- .../Presence/PresenceRealtimeClientTest.php | 1091 +++++++---------- 2 files changed, 498 insertions(+), 617 deletions(-) diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index 1a8958ddce..b63e1e1b3a 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -63,11 +63,31 @@ trait PresenceBase $this->assertEquals($payload['userId'], $response['body']['userId']); + $canonicalPresence = $this->client->call( + Client::METHOD_GET, + '/presences', + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getPresenceApiKey(), + ], + [ + 'queries' => [ + Query::equal('userId', [$payload['userId']])->toString(), + ], + ] + ); + $this->assertEquals(200, $canonicalPresence['headers']['status-code']); + $this->assertGreaterThanOrEqual(1, $canonicalPresence['body']['total'] ?? 0); + $this->assertNotEmpty($canonicalPresence['body']['presences'][0] ?? []); + + $presence = $canonicalPresence['body']['presences'][0]; + if (empty($overrides)) { - self::$presenceCache[$cacheKey] = $response['body']; + self::$presenceCache[$cacheKey] = $presence; } - return $response['body']; + return $presence; } public function testUpsertAndGetPresence(): void diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index 7ff586b491..fa22854d13 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -6,7 +6,6 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideClient; -use Tests\E2E\Services\Realtime\RealtimeBase; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -17,704 +16,566 @@ use WebSocket\TimeoutException; class PresenceRealtimeClientTest extends Scope { use ProjectCustom; - use RealtimeBase; use SideClient; + private function bootstrapIsolatedProject(): array + { + $project = $this->getProject(true); + self::$project = $project; + + $user = $this->getUser(true); + $headers = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $project['$id'] . '=' . $user['session'], + ]; + + return [$project, $user, $headers]; + } + + private function getServerHeaders(array $project): array + { + return [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $project['$id'], + 'x-appwrite-key' => $project['apiKey'], + ]; + } + + private function connectRealtimeAndSubscribe( + array $project, + array $headers, + array $channels = [], + int $timeout = 1 + ): WebSocketClient { + $queryString = \http_build_query([ + 'project' => $project['$id'], + ]); + + $client = new WebSocketClient( + 'ws://appwrite.test/v1/realtime?' . $queryString, + [ + 'headers' => $headers, + 'timeout' => $timeout, + ] + ); + + $connected = \json_decode($client->receive(), true); + $this->assertSame('connected', $connected['type'] ?? null); + + if (empty($channels)) { + return $client; + } + + $client->send(\json_encode([ + 'type' => 'subscribe', + 'data' => [[ + 'channels' => $channels, + ]], + ])); + + $subscribeResponse = \json_decode($client->receive(), true); + $this->assertSame('response', $subscribeResponse['type'] ?? null); + $this->assertSame('subscribe', $subscribeResponse['data']['to'] ?? null); + $this->assertTrue($subscribeResponse['data']['success'] ?? false); + $this->assertNotEmpty($subscribeResponse['data']['subscriptions'] ?? []); + + return $client; + } + + private function receiveUntil( + WebSocketClient $client, + callable $match, + int $timeoutMs = 800, + int $pollMs = 50 + ): array { + $deadline = \microtime(true) + ($timeoutMs / 1000); + $lastMessage = []; + + while (\microtime(true) < $deadline) { + try { + $message = \json_decode($client->receive(), true); + } catch (TimeoutException) { + \usleep($pollMs * 1000); + continue; + } + + if (!\is_array($message)) { + continue; + } + + $lastMessage = $message; + if ($match($message)) { + return $message; + } + } + + $this->fail('Timed out waiting for expected websocket frame. Last frame: ' . \json_encode($lastMessage)); + return []; + } + + private function drainSocketFor(WebSocketClient $client, int $timeoutMs = 500): void + { + $deadline = \microtime(true) + ($timeoutMs / 1000); + while (\microtime(true) < $deadline) { + try { + $client->receive(); + } catch (TimeoutException) { + return; + } + } + } + + private function assertQuietFor(WebSocketClient $client, callable $forbidden, int $timeoutMs = 150): void + { + $deadline = \microtime(true) + ($timeoutMs / 1000); + while (\microtime(true) < $deadline) { + try { + $message = \json_decode($client->receive(), true); + } catch (TimeoutException) { + continue; + } + + if (!\is_array($message)) { + continue; + } + + if ($forbidden($message)) { + $this->fail('Received forbidden websocket frame: ' . \json_encode($message)); + } + } + } + private function assertPresenceRealtimeEvent( array $event, string $presenceId, string $action, string $status, - array $metadata = [], - ?string $expectedUserId = null + array $metadata, + string $expectedUserId ): void { - $expectedUserId ??= $this->getUser()['$id']; $this->assertSame('event', $event['type'] ?? null); $this->assertContains('presences', $event['data']['channels'] ?? []); $this->assertContains('presences.' . $presenceId, $event['data']['channels'] ?? []); - $this->assertNotEmpty($event['data']['events'] ?? []); $this->assertContains('presences.' . $presenceId . '.' . $action, $event['data']['events'] ?? []); - $this->assertNotEmpty($event['data']['timestamp'] ?? null); - $this->assertArrayHasKey('subscriptions', $event['data'] ?? []); - $this->assertNotEmpty($event['data']['subscriptions'] ?? []); $this->assertSame($presenceId, $event['data']['payload']['$id'] ?? null); $this->assertSame($status, $event['data']['payload']['status'] ?? null); $this->assertSame($metadata, $event['data']['payload']['metadata'] ?? []); $this->assertSame($expectedUserId, $event['data']['payload']['userId'] ?? null); } - private function assertNoRealtimeEvent(WebSocketClient $client): void - { - try { - $client->receive(); - $this->fail('Expected TimeoutException - event should not be received'); - } catch (TimeoutException $e) { - $this->assertTrue(true); - } - } - - /** - * Presence websocket contract: after sending a `type: presence` message, - * the sender socket should receive: - * 1) `type: response` (for the persistence write) - * 2) `type: event` (for the realtime upsert) - * - * This keeps the tests strict about ordering and avoids leaving unread - * realtime events in the socket buffer for later assertions. - */ - private function assertPresenceResponseThenUpsertEvent( - WebSocketClient $client, - string $expectedStatus, - array $expectedMetadata, - ?string $expectedUserId = null - ): string { - $expectedUserId ??= $this->getUser()['$id']; - - $presenceId = null; - $response = null; - $event = null; - - // Ordering is not guaranteed because: - // - response is sent directly via $server->send(...) - // - event is emitted via pub/sub and may arrive earlier - for ($attempts = 0; $attempts < 5; $attempts++) { - $message = \json_decode($client->receive(), true); - $type = $message['type'] ?? null; - - if ($type === 'response') { - $response ??= $message; - - $this->assertSame('presence', $response['data']['to'] ?? null); - $presenceId ??= $response['data']['presence']['$id'] ?? null; - $this->assertNotEmpty($presenceId); - $this->assertSame($expectedStatus, $response['data']['presence']['status'] ?? null); - $this->assertSame($expectedMetadata, $response['data']['presence']['metadata'] ?? null); - } elseif ($type === 'event') { - $event ??= $message; - $presenceId ??= $event['data']['payload']['$id'] ?? null; - $this->assertNotEmpty($presenceId); - - $this->assertPresenceRealtimeEvent( - $event, - $presenceId, - 'upsert', - $expectedStatus, - $expectedMetadata, - $expectedUserId - ); - } - - if ($response !== null && $event !== null) { - return $presenceId; - } - } - - $this->fail('Expected both realtime presence `response` and `event` messages'); - return ''; - } - - /** - * After getting a `response` for a presence message, the next interesting - * realtime message should be the corresponding `event` for the same presence id. - */ private function receivePresenceEvent( WebSocketClient $client, string $presenceId, string $action, string $status, - array $expectedMetadata, - ?string $expectedUserId = null + array $metadata, + string $expectedUserId, + int $timeoutMs = 2500 ): array { - do { - $message = \json_decode($client->receive(), true); - } while ( - ($message['type'] ?? null) !== 'event' - || ($message['data']['payload']['$id'] ?? null) !== $presenceId + $event = $this->receiveUntil( + $client, + fn (array $message): bool => ($message['type'] ?? null) === 'event' + && ($message['data']['payload']['$id'] ?? null) === $presenceId + && \in_array('presences.' . $presenceId . '.' . $action, $message['data']['events'] ?? [], true), + $timeoutMs ); - $this->assertPresenceRealtimeEvent( - $message, + $this->assertPresenceRealtimeEvent($event, $presenceId, $action, $status, $metadata, $expectedUserId); + return $event; + } + + private function collectPresenceOutcome( + WebSocketClient $client, + string $presenceId, + string $expectedStatus, + array $expectedMetadata, + string $expectedUserId + ): void { + $response = null; + $event = null; + + $this->receiveUntil($client, function (array $message) use ( + &$response, + &$event, $presenceId, - $action, - $status, + $expectedStatus, $expectedMetadata, $expectedUserId + ): bool { + $type = $message['type'] ?? null; + if ($type === 'response' && ($message['data']['to'] ?? null) === 'presence') { + if (($message['data']['presence']['$id'] ?? null) !== $presenceId) { + return false; + } + $this->assertSame($expectedStatus, $message['data']['presence']['status'] ?? null); + $this->assertSame($expectedMetadata, $message['data']['presence']['metadata'] ?? null); + $response = $message; + } + + if ($type === 'event' && ($message['data']['payload']['$id'] ?? null) === $presenceId) { + if (!\in_array('presences.' . $presenceId . '.upsert', $message['data']['events'] ?? [], true)) { + return false; + } + $this->assertPresenceRealtimeEvent($message, $presenceId, 'upsert', $expectedStatus, $expectedMetadata, $expectedUserId); + $event = $message; + } + + return $response !== null && $event !== null; + }, 2500); + } + + private function receiveErrorMessage(WebSocketClient $client): array + { + $error = $this->receiveUntil( + $client, + fn (array $message): bool => ($message['type'] ?? null) === 'error', + 3000 ); - - return $message; + $this->assertSame('error', $error['type'] ?? null); + return $error; } - private function connectPresenceSocket(bool $authenticated = true, int $timeout = 2): WebSocketClient - { - $headers = [ - 'origin' => 'http://localhost', - ]; - - if ($authenticated) { - $headers['cookie'] = 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session']; - } - - $client = $this->getWebsocket(['presences'], $headers, timeout: $timeout); - $response = \json_decode($client->receive(), true); - - $this->assertSame('connected', $response['type'] ?? null); - - return $client; + private function sendPresenceMessage( + WebSocketClient $client, + string $presenceId, + string $status, + array $metadata, + array $permissions + ): void { + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => $status, + 'metadata' => $metadata, + 'permissions' => $permissions, + ], + ])); } - private function getServerHeaders(): array + private function getPresencePermissions(string|Role $readRole): array { return [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'], - ]; - } - - private function getPresencePermissions(string $userId): array - { - $this->assertNotEmpty($userId); - - return [ - Permission::read(Role::any()), + Permission::read($readRole), Permission::update(Role::any()), Permission::delete(Role::any()), ]; } - public function testPresenceMessageCreatesPresenceAndPersists(): void + public function testPresenceUpsertSenderGetsResponseAndEvent(): void { + [$project, $user, $headers] = $this->bootstrapIsolatedProject(); $presenceId = ID::unique(); - $userId = $this->getUser()['$id']; - $client = $this->connectPresenceSocket(true, 5); + $metadata = ['testRunId' => ID::unique(), 'case' => 'upsert-basic']; - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceId, - 'status' => 'online', - 'metadata' => [ - 'device' => 'web', - ], - 'permissions' => $this->getPresencePermissions($userId), - ], - ])); - - $this->assertPresenceResponseThenUpsertEvent( - $client, - 'online', - ['device' => 'web'], - $userId + $publisher = $this->connectRealtimeAndSubscribe( + $project, + $headers, + ['presences', 'presences.' . $presenceId], + timeout: 2 ); - $read = $this->client->call( - Client::METHOD_GET, - '/presences/' . $presenceId, - $this->getServerHeaders() - ); + try { + $this->sendPresenceMessage( + $publisher, + $presenceId, + 'online', + $metadata, + $this->getPresencePermissions(Role::any()) + ); - $this->assertSame(200, $read['headers']['status-code']); - $this->assertSame($presenceId, $read['body']['$id']); - $this->assertSame($userId, $read['body']['userId']); - $this->assertSame('online', $read['body']['status']); - $this->assertSame(['device' => 'web'], $read['body']['metadata']); + $this->collectPresenceOutcome($publisher, $presenceId, 'online', $metadata, $user['$id']); - $client->close(); + $read = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presenceId, + $this->getServerHeaders($project) + ); + + $this->assertSame(200, $read['headers']['status-code']); + $this->assertSame($presenceId, $read['body']['$id']); + $this->assertSame($user['$id'], $read['body']['userId']); + $this->assertSame('online', $read['body']['status']); + $this->assertSame($metadata, $read['body']['metadata']); + } finally { + $publisher->close(); + } } - public function testPresenceMessageUpsertWithSamePresenceIdPersistsSingleUpdatedRecord(): void - { - $presenceId = ID::unique(); - $userId = $this->getUser()['$id']; - $client = $this->connectPresenceSocket(true, 5); - - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceId, - 'status' => 'away', - 'metadata' => [ - 'source' => 'first', - ], - 'permissions' => $this->getPresencePermissions($userId), - ], - ])); - $this->assertPresenceResponseThenUpsertEvent( - $client, - 'away', - ['source' => 'first'], - $userId - ); - - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceId, - 'status' => 'busy', - 'metadata' => [ - 'source' => 'second', - ], - 'permissions' => $this->getPresencePermissions($userId), - ], - ])); - $this->assertPresenceResponseThenUpsertEvent( - $client, - 'busy', - ['source' => 'second'], - $userId - ); - - $list = $this->client->call( - Client::METHOD_GET, - '/presences', - $this->getServerHeaders(), - [ - 'queries' => [ - Query::equal('$id', [$presenceId])->toString(), - Query::equal('userId', [$userId])->toString(), - ], - ] - ); - - $this->assertSame(200, $list['headers']['status-code']); - $this->assertSame(1, $list['body']['total']); - $this->assertCount(1, $list['body']['presences']); - $this->assertSame($presenceId, $list['body']['presences'][0]['$id']); - $this->assertSame($userId, $list['body']['presences'][0]['userId']); - $this->assertSame('busy', $list['body']['presences'][0]['status']); - $this->assertSame(['source' => 'second'], $list['body']['presences'][0]['metadata']); - - $client->close(); - } - - public function testPresenceMessageUpsertWithSameUserPersistsSingleRecord(): void + public function testPresenceUpsertSameUserUpdatesSingleRecord(): void { + [$project, $user, $headers] = $this->bootstrapIsolatedProject(); $firstPresenceId = ID::unique(); $secondPresenceId = ID::unique(); - $userId = $this->getUser()['$id']; - $client = $this->connectPresenceSocket(true, 5); + $marker = ID::unique(); - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $firstPresenceId, - 'status' => 'away', - 'metadata' => [ - 'source' => 'first-user-upsert', - ], - 'permissions' => $this->getPresencePermissions($userId), - ], - ])); - $this->assertPresenceResponseThenUpsertEvent( - $client, - 'away', - ['source' => 'first-user-upsert'], - $userId + $publisher = $this->connectRealtimeAndSubscribe( + $project, + $headers, + ['presences', 'presences.' . $firstPresenceId, 'presences.' . $secondPresenceId], + timeout: 2 ); - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $secondPresenceId, - 'status' => 'busy', - 'metadata' => [ - 'source' => 'second-user-upsert', - ], - 'permissions' => $this->getPresencePermissions($userId), - ], - ])); - $this->assertPresenceResponseThenUpsertEvent( - $client, - 'busy', - ['source' => 'second-user-upsert'], - $userId - ); + try { + $firstMetadata = ['testRunId' => $marker, 'step' => 'first']; + $secondMetadata = ['testRunId' => $marker, 'step' => 'second']; - $list = $this->client->call( - Client::METHOD_GET, - '/presences', - $this->getServerHeaders(), - [ - 'queries' => [ - Query::equal('userId', [$userId])->toString(), - ], - ] - ); + $this->sendPresenceMessage( + $publisher, + $firstPresenceId, + 'away', + $firstMetadata, + $this->getPresencePermissions(Role::any()) + ); + $this->collectPresenceOutcome($publisher, $firstPresenceId, 'away', $firstMetadata, $user['$id']); - $this->assertSame(200, $list['headers']['status-code']); - $this->assertSame(1, $list['body']['total']); - $this->assertCount(1, $list['body']['presences']); - $this->assertSame($userId, $list['body']['presences'][0]['userId']); - $this->assertSame('busy', $list['body']['presences'][0]['status']); - $this->assertSame(['source' => 'second-user-upsert'], $list['body']['presences'][0]['metadata']); + $this->sendPresenceMessage( + $publisher, + $secondPresenceId, + 'busy', + $secondMetadata, + $this->getPresencePermissions(Role::any()) + ); + $this->collectPresenceOutcome($publisher, $secondPresenceId, 'busy', $secondMetadata, $user['$id']); - $client->close(); + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + $this->getServerHeaders($project), + [ + 'queries' => [ + Query::equal('userId', [$user['$id']])->toString(), + ], + ] + ); + + $this->assertSame(200, $list['headers']['status-code']); + $this->assertSame(1, $list['body']['total']); + $this->assertSame($user['$id'], $list['body']['presences'][0]['userId']); + $this->assertSame('busy', $list['body']['presences'][0]['status']); + $this->assertSame($secondMetadata, $list['body']['presences'][0]['metadata']); + } finally { + $publisher->close(); + } } - public function testPresenceMessageValidationErrors(): void - { - $client = $this->connectPresenceSocket(); - - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'metadata' => [ - 'device' => 'web', - ], - ], - ])); - $missingStatus = \json_decode($client->receive(), true); - $this->assertSame('error', $missingStatus['type'] ?? null); - $this->assertStringContainsString('status must be provided', $missingStatus['data']['message'] ?? ''); - - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'status' => 'online', - 'permissions' => 'invalid', - ], - ])); - $invalidPermissions = \json_decode($client->receive(), true); - $this->assertSame('error', $invalidPermissions['type'] ?? null); - $this->assertStringContainsString('permissions must be an array', $invalidPermissions['data']['message'] ?? ''); - - $client->close(); - } - - public function testPresenceMessageRequiresAuthenticatedUser(): void - { - $client = $this->connectPresenceSocket(false); - - $client->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'status' => 'online', - ], - ])); - - $response = \json_decode($client->receive(), true); - $this->assertSame('error', $response['type'] ?? null); - $this->assertSame(401, $response['data']['code'] ?? null); - $this->assertSame('User must be authorized', $response['data']['message'] ?? null); - - $client->close(); - } - - public function testChannelParsing(): void + public function testPresenceValidationErrorsReturnErrorOnly(): void { + [$project, , $headers] = $this->bootstrapIsolatedProject(); $presenceId = ID::unique(); - $userId = $this->getUser()['$id']; - $headers = [ - 'origin' => 'http://localhost', - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session'], - ]; + $client = $this->connectRealtimeAndSubscribe($project, $headers, ['presences', 'presences.' . $presenceId], timeout: 2); - $client = $this->getWebsocket(['presences', 'presences.' . $presenceId], $headers, timeout: 5); - $connected = \json_decode($client->receive(), true); - - $this->assertSame('connected', $connected['type'] ?? null); - $this->assertCount(2, $connected['data']['channels'] ?? []); - $this->assertContains('presences', $connected['data']['channels']); - $this->assertContains('presences.' . $presenceId, $connected['data']['channels']); - - $create = $this->client->call( - Client::METHOD_PUT, - '/presences/' . $presenceId, - $this->getServerHeaders(), - [ - 'userId' => $userId, - 'status' => 'online', - 'metadata' => ['source' => 'channel-parsing-create'], - 'permissions' => $this->getPresencePermissions($userId), - ] - ); - $this->assertSame(200, $create['headers']['status-code']); - - $createEvent = \json_decode($client->receive(), true); - $this->assertPresenceRealtimeEvent( - $createEvent, - $presenceId, - 'upsert', - 'online', - ['source' => 'channel-parsing-create'] - ); - - $update = $this->client->call( - Client::METHOD_PATCH, - '/presences/' . $presenceId, - $this->getServerHeaders(), - [ - 'status' => 'away', - 'metadata' => ['source' => 'channel-parsing-update'], - ] - ); - $this->assertSame(200, $update['headers']['status-code']); - - $updateEvent = \json_decode($client->receive(), true); - $this->assertPresenceRealtimeEvent( - $updateEvent, - $presenceId, - 'update', - 'away', - ['source' => 'channel-parsing-update'] - ); - - $delete = $this->client->call( - Client::METHOD_DELETE, - '/presences/' . $presenceId, - $this->getServerHeaders() - ); - $this->assertSame(204, $delete['headers']['status-code']); - - $deleteEvent = \json_decode($client->receive(), true); - $this->assertPresenceRealtimeEvent( - $deleteEvent, - $presenceId, - 'delete', - 'away', - ['source' => 'channel-parsing-update'] - ); - - $client->close(); - } - - public function testPresenceMessageEmitsCreateAndDeleteEvents(): void - { - $presenceId = ID::unique(); - $userId = $this->getUser()['$id']; - $headers = [ - 'origin' => 'http://localhost', - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session'], - ]; - - $listener = $this->getWebsocket(['presences', 'presences.' . $presenceId], $headers, timeout: 8); - $connected = \json_decode($listener->receive(), true); - $this->assertSame('connected', $connected['type'] ?? null); - $this->assertCount(2, $connected['data']['channels'] ?? []); - $this->assertContains('presences', $connected['data']['channels'] ?? []); - $this->assertContains('presences.' . $presenceId, $connected['data']['channels'] ?? []); - $this->assertCount(1, $connected['data']['subscriptions'] ?? []); - $this->assertNotEmpty(array_values($connected['data']['subscriptions'] ?? [])); - - $publisher = $this->connectPresenceSocket(true, timeout: 8); - - $publisher->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceId, - 'status' => 'online', - 'metadata' => [ - 'source' => 'realtime-create-delete-events', + try { + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'metadata' => [ + 'testRunId' => ID::unique(), + ], ], - 'permissions' => $this->getPresencePermissions($userId), - ], - ])); + ])); + $missingStatus = $this->receiveErrorMessage($client); + $this->assertStringContainsString('status must be provided', $missingStatus['data']['message'] ?? ''); + $this->assertQuietFor( + $client, + fn (array $frame): bool => ($frame['type'] ?? null) === 'event' + && ($frame['data']['payload']['$id'] ?? null) === $presenceId + ); - $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( - $publisher, - 'online', - ['source' => 'realtime-create-delete-events'], - $userId - ); - $this->assertSame($presenceId, $receivedPresenceId); - - $createEvent = \json_decode($listener->receive(), true); - $this->assertPresenceRealtimeEvent( - $createEvent, - $presenceId, - 'upsert', - 'online', - ['source' => 'realtime-create-delete-events'] - ); - - $publisher->close(); - - $deleteEvent = \json_decode($listener->receive(), true); - $this->assertPresenceRealtimeEvent( - $deleteEvent, - $presenceId, - 'delete', - 'online', - ['source' => 'realtime-create-delete-events'] - ); - - $listener->close(); + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'online', + 'permissions' => 'invalid', + ], + ])); + $invalidPermissions = $this->receiveErrorMessage($client); + $this->assertStringContainsString('permissions must be an array', $invalidPermissions['data']['message'] ?? ''); + $this->assertQuietFor( + $client, + fn (array $frame): bool => ($frame['type'] ?? null) === 'event' + && ($frame['data']['payload']['$id'] ?? null) === $presenceId + ); + } finally { + $client->close(); + } } - public function testPresencePermission(): void + public function testPresenceUnauthenticatedUserGetsAuthorizationError(): void { - $presenceIdAny = ID::unique(); - $presenceIdUsers = ID::unique(); - $presenceIdOwner = ID::unique(); + $project = $this->getProject(true); + self::$project = $project; - $user1 = $this->getUser(); - $user1Id = $user1['$id']; + $presenceId = ID::unique(); + $client = $this->connectRealtimeAndSubscribe( + $project, + ['origin' => 'http://localhost'], + ['presences', 'presences.' . $presenceId], + timeout: 2 + ); + + try { + $client->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'online', + 'metadata' => ['testRunId' => ID::unique()], + ], + ])); + + $error = $this->receiveErrorMessage($client); + $this->assertSame(401, $error['data']['code'] ?? null); + $this->assertSame('User must be authorized', $error['data']['message'] ?? null); + + $this->assertQuietFor( + $client, + fn (array $frame): bool => ($frame['type'] ?? null) === 'event' + && ($frame['data']['payload']['$id'] ?? null) === $presenceId + ); + } finally { + $client->close(); + } + } + + public function testChannelParsingChannelsAndEvents(): void + { + [$project, $user, $headers] = $this->bootstrapIsolatedProject(); + $presenceId = ID::unique(); + $listener = $this->connectRealtimeAndSubscribe( + $project, + $headers, + ['presences', 'presences.' . $presenceId], + timeout: 2 + ); + + try { + $createMetadata = ['testRunId' => ID::unique(), 'source' => 'channel-create']; + $updateMetadata = ['testRunId' => $createMetadata['testRunId'], 'source' => 'channel-update']; + + $create = $this->client->call( + Client::METHOD_PUT, + '/presences/' . $presenceId, + $this->getServerHeaders($project), + [ + 'userId' => $user['$id'], + 'status' => 'online', + 'metadata' => $createMetadata, + 'permissions' => $this->getPresencePermissions(Role::any()), + ] + ); + $this->assertSame(200, $create['headers']['status-code']); + $this->receivePresenceEvent($listener, $presenceId, 'upsert', 'online', $createMetadata, $user['$id']); + + $update = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presenceId, + $this->getServerHeaders($project), + [ + 'status' => 'away', + 'metadata' => $updateMetadata, + ] + ); + $this->assertSame(200, $update['headers']['status-code']); + $this->receivePresenceEvent($listener, $presenceId, 'update', 'away', $updateMetadata, $user['$id']); + + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presenceId, + $this->getServerHeaders($project) + ); + $this->assertSame(204, $delete['headers']['status-code']); + $this->receivePresenceEvent($listener, $presenceId, 'delete', 'away', $updateMetadata, $user['$id']); + } finally { + $listener->close(); + } + } + + public function testPresencePermissionsReceiverRouting(): void + { + [$project, $user1, $user1Headers] = $this->bootstrapIsolatedProject(); $user2 = $this->getUser(true); - $user3 = $this->getUser(true); - $projectId = $this->getProject()['$id']; - - $user1Headers = [ - 'origin' => 'http://localhost', - 'cookie' => 'a_session_' . $projectId . '=' . $user1['session'], - ]; $user2Headers = [ 'origin' => 'http://localhost', - 'cookie' => 'a_session_' . $projectId . '=' . $user2['session'], + 'cookie' => 'a_session_' . $project['$id'] . '=' . $user2['session'], ]; - $user3Headers = [ - 'origin' => 'http://localhost', - 'cookie' => 'a_session_' . $projectId . '=' . $user3['session'], + $presenceIdAny = ID::unique(); + $presenceIdOwner = ID::unique(); + + $channels = [ + 'presences', + 'presences.' . $presenceIdAny, + 'presences.' . $presenceIdOwner, ]; - $user1Listener = $this->getWebsocket(['presences', 'presences.' . $presenceIdAny, 'presences.' . $presenceIdUsers, 'presences.' . $presenceIdOwner], $user1Headers, timeout: 3); - $user2Listener = $this->getWebsocket(['presences', 'presences.' . $presenceIdAny, 'presences.' . $presenceIdUsers, 'presences.' . $presenceIdOwner], $user2Headers, timeout: 3); - $user3Listener = $this->getWebsocket(['presences', 'presences.' . $presenceIdAny, 'presences.' . $presenceIdUsers, 'presences.' . $presenceIdOwner], $user3Headers, timeout: 3); + $publisher = $this->connectRealtimeAndSubscribe($project, $user1Headers, ['presences'], timeout: 1); + $listener1 = $this->connectRealtimeAndSubscribe($project, $user1Headers, $channels, timeout: 1); + $listener2 = $this->connectRealtimeAndSubscribe($project, $user2Headers, $channels, timeout: 1); - $this->assertSame('connected', (\json_decode($user1Listener->receive(), true))['type'] ?? null); - $this->assertSame('connected', (\json_decode($user2Listener->receive(), true))['type'] ?? null); - $this->assertSame('connected', (\json_decode($user3Listener->receive(), true))['type'] ?? null); + try { + $metadataAny = ['testRunId' => ID::unique(), 'visibility' => 'any']; + $this->sendPresenceMessage( + $publisher, + $presenceIdAny, + 'online', + $metadataAny, + $this->getPresencePermissions(Role::any()) + ); + $this->collectPresenceOutcome($publisher, $presenceIdAny, 'online', $metadataAny, $user1['$id']); + $this->receivePresenceEvent($listener1, $presenceIdAny, 'upsert', 'online', $metadataAny, $user1['$id']); + $this->receivePresenceEvent($listener2, $presenceIdAny, 'upsert', 'online', $metadataAny, $user1['$id']); - $publisher = $this->getWebsocket(['presences'], $user1Headers, timeout: 5); - $this->assertSame('connected', (\json_decode($publisher->receive(), true))['type'] ?? null); + $metadataOwner = ['testRunId' => ID::unique(), 'visibility' => 'owner']; + $this->sendPresenceMessage( + $publisher, + $presenceIdOwner, + 'busy', + $metadataOwner, + $this->getPresencePermissions(Role::user($user1['$id'])) + ); + $this->collectPresenceOutcome($publisher, $presenceIdOwner, 'busy', $metadataOwner, $user1['$id']); + $this->receivePresenceEvent($listener1, $presenceIdOwner, 'upsert', 'busy', $metadataOwner, $user1['$id']); + $this->assertQuietFor( + $listener2, + fn (array $frame): bool => ($frame['type'] ?? null) === 'event' + && ($frame['data']['payload']['$id'] ?? null) === $presenceIdOwner + ); + } finally { + $publisher->close(); + $listener1->close(); + $listener2->close(); + } + } - $publisher->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceIdAny, - 'status' => 'online', - 'metadata' => [ - 'visibility' => 'any', - ], - 'permissions' => [ - Permission::read(Role::any()), - Permission::update(Role::any()), - Permission::delete(Role::any()), - ], - ], - ])); + public function testPresenceCloseEmitsDeleteEvent(): void + { + [$project, $user, $headers] = $this->bootstrapIsolatedProject(); + $presenceId = ID::unique(); + $metadata = ['testRunId' => ID::unique(), 'source' => 'close-delete']; - $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( - $publisher, - 'online', - ['visibility' => 'any'], - $user1Id - ); - $this->assertSame($presenceIdAny, $receivedPresenceId); + $publisher = $this->connectRealtimeAndSubscribe($project, $headers, ['presences', 'presences.' . $presenceId], timeout: 1); + $listener = $this->connectRealtimeAndSubscribe($project, $headers, ['presences', 'presences.' . $presenceId], timeout: 1); - $this->assertPresenceRealtimeEvent( - \json_decode($user1Listener->receive(), true), - $presenceIdAny, - 'upsert', - 'online', - ['visibility' => 'any'], - $user1Id - ); - $this->assertPresenceRealtimeEvent( - \json_decode($user2Listener->receive(), true), - $presenceIdAny, - 'upsert', - 'online', - ['visibility' => 'any'], - $user1Id - ); - $this->assertPresenceRealtimeEvent( - \json_decode($user3Listener->receive(), true), - $presenceIdAny, - 'upsert', - 'online', - ['visibility' => 'any'], - $user1Id - ); + try { + $this->sendPresenceMessage( + $publisher, + $presenceId, + 'online', + $metadata, + $this->getPresencePermissions(Role::any()) + ); + $this->collectPresenceOutcome($publisher, $presenceId, 'online', $metadata, $user['$id']); + $this->receivePresenceEvent($listener, $presenceId, 'upsert', 'online', $metadata, $user['$id']); - $publisher->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceIdUsers, - 'status' => 'away', - 'metadata' => [ - 'visibility' => 'users', - ], - 'permissions' => [ - Permission::read(Role::users()), - Permission::update(Role::users()), - Permission::delete(Role::users()), - ], - ], - ])); + $publisher->close(); - $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( - $publisher, - 'away', - ['visibility' => 'users'], - $user1Id - ); - $this->assertSame($presenceIdUsers, $receivedPresenceId); - - $this->assertPresenceRealtimeEvent( - \json_decode($user1Listener->receive(), true), - $presenceIdUsers, - 'upsert', - 'away', - ['visibility' => 'users'], - $user1Id - ); - $this->assertPresenceRealtimeEvent( - \json_decode($user3Listener->receive(), true), - $presenceIdUsers, - 'upsert', - 'away', - ['visibility' => 'users'], - $user1Id - ); - $this->assertPresenceRealtimeEvent( - \json_decode($user2Listener->receive(), true), - $presenceIdUsers, - 'upsert', - 'away', - ['visibility' => 'users'], - $user1Id - ); - - $publisher->send(\json_encode([ - 'type' => 'presence', - 'data' => [ - 'presenceId' => $presenceIdOwner, - 'status' => 'busy', - 'metadata' => [ - 'visibility' => 'owner', - ], - 'permissions' => [ - Permission::read(Role::user($user1Id)), - Permission::update(Role::user($user1Id)), - Permission::delete(Role::user($user1Id)), - ], - ], - ])); - - $receivedPresenceId = $this->assertPresenceResponseThenUpsertEvent( - $publisher, - 'busy', - ['visibility' => 'owner'], - $user1Id - ); - $this->assertSame($presenceIdOwner, $receivedPresenceId); - - $this->assertPresenceRealtimeEvent( - \json_decode($user1Listener->receive(), true), - $presenceIdOwner, - 'upsert', - 'busy', - ['visibility' => 'owner'], - $user1Id - ); - $this->assertNoRealtimeEvent($user2Listener); - $this->assertNoRealtimeEvent($user3Listener); - - $publisher->close(); - $user1Listener->close(); - $user2Listener->close(); - $user3Listener->close(); + $this->receivePresenceEvent($listener, $presenceId, 'delete', 'online', $metadata, $user['$id'], timeoutMs: 3000); + } finally { + $listener->close(); + } } } From e67016584f99f2499f61893be0a5b0ee0d5a823e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:02:26 +0530 Subject: [PATCH 035/192] updated the schema --- app/config/collections/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index d5e8952896..7841b08f6a 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2852,7 +2852,7 @@ return [ ], [ '$id' => ID::custom('_key_userInternal'), - 'type' => Database::INDEX_UNIQUE, + 'type' => Database::INDEX_KEY, 'attributes' => ['userInternalId'], 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC] From 1d32faff4fe5088d2a66c3e0e9af723d70277b29 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:04:55 +0530 Subject: [PATCH 036/192] updated realtime --- app/realtime.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 7fea934567..c2f23eb9c5 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1300,7 +1300,7 @@ $server->onClose(function (int $connection) use ($server, $realtime, $stats, $re && $projectId !== 'console' ) { /** @var string[] $presenceIds */ - $presenceIds = \array_values(\array_unique(\array_filter($presenceIds, fn (mixed $id): bool => \is_string($id) && $id !== ''))); + $presenceIds = \array_values(\array_unique($presenceIds)); if (!empty($presenceIds)) { $consoleDB = getConsoleDB(); @@ -1312,10 +1312,14 @@ $server->onClose(function (int $connection) use ($server, $realtime, $stats, $re $presences = $dbForProject->find('presenceLogs', [ Query::equal('$id', $presenceIds), ]); + try { + $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); + } catch (Throwable $th) { + // swallow errors to avoid breaking disconnect cleanup + } foreach ($presences as $presence) { try { - $dbForProject->deleteDocument('presenceLogs', $presence->getId()); triggerPresenceEvent($server, $realtime, $project, new User([]), 'presences.[presenceId].delete', $presence); } catch (Throwable) { // Swallow errors to avoid breaking disconnect cleanup From d1c3ee0290177ab9b577f55a871d421ee27dbbe0 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 17 Apr 2026 12:17:57 +0530 Subject: [PATCH 037/192] updated upsert logic --- src/Appwrite/Databases/PresenceState.php | 61 +++++++++++++----------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index a29ad46bb3..317c23a23c 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -9,12 +9,12 @@ use Utopia\Database\Document; use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\NotFound as NotFoundException; -use Utopia\Database\Exception\Relationship as RelationshipException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; +use Utopia\System\System; class PresenceState { @@ -57,10 +57,14 @@ class PresenceState $presenceDocument->setAttribute('$id', $presenceId); } + try { + if ($this->getSupportForUniqueIndexBasedUpsert()) { + return $this->transactionalUpsertForUser($dbForProject, $presenceDocument, $presenceId, $userId); + } return $dbForProject->upsertDocument('presenceLogs', $presenceDocument); } catch (DuplicateException $e) { - return $this->upsertFallback($dbForProject, $presenceDocument, $presenceId, $userId, $e); + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); } catch (NotFoundException $e) { throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId], previous: $e); } catch (StructureException $e) { @@ -70,41 +74,40 @@ class PresenceState } } - private function upsertFallback( + private function transactionalUpsertForUser( Database $dbForProject, Document $presenceDocument, string $presenceId, - string $userId, - DuplicateException $previous + string $userId ): Document { - try { - return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId, $previous) { - $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); + return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId) { + $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); - if ($existingPresence->isEmpty()) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $previous); - } + if ($existingPresence->isEmpty()) { + return $dbForProject->createDocument('presenceLogs', $presenceDocument); + } - // Lock the current state before update to avoid races on duplicate fallback. - $currentPresence = $dbForProject->getDocument('presenceLogs', $existingPresence->getId(), forUpdate: true); + // Lock current state to avoid races while resolving upsert by userId. + $currentPresence = $dbForProject->getDocument('presenceLogs', $existingPresence->getId(), forUpdate: true); - if ($currentPresence->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); - } + if ($currentPresence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); + } - return $dbForProject->updateDocument('presenceLogs', $currentPresence->getId(), $presenceDocument); - }); - } catch (DuplicateException $e) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); - } catch (NotFoundException $e) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId], previous: $e); - } catch (RelationshipException $e) { - throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage(), previous: $e); - } catch (StructureException $e) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); - } catch (ConflictException $e) { - throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT, $e->getMessage(), previous: $e); - } + if ($presenceId !== 'unique()' && $currentPresence->getId() !== $presenceId) { + $presenceDocument->setAttribute('$id', $presenceId); + $dbForProject->deleteDocument('presenceLogs', $currentPresence->getId()); + return $dbForProject->createDocument('presenceLogs', $presenceDocument); + } + + return $dbForProject->updateDocument('presenceLogs', $currentPresence->getId(), $presenceDocument); + }); + } + + private function getSupportForUniqueIndexBasedUpsert(): bool + { + $adapter = \strtolower(System::getEnv('_APP_DB_ADAPTER', 'mariadb')); + return \in_array($adapter, ['mongodb', 'postgres', 'postgresql'], true); } private function assertPermissionsAgainstAuthorization(array $permissions, Authorization $authorization): void From 4da9873b838d15cefd5c6285ce3bddbd21aa10cb Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 17 Apr 2026 22:27:28 +1200 Subject: [PATCH 038/192] (fix): purge cached user document before Realtime session verification Cross-process read-after-write race: the HTTP worker writes a new session into the user document on /account login endpoints, then the client sends an authentication frame over a different Swoole process (Realtime). Cache propagation between processes is not guaranteed to be observed on the very next read, so sessionVerify() occasionally fails with a stale user document whose sessions array does not yet contain the just-created one. Purge the cached user locally before the read so sessionVerify sees the freshly-written session deterministically. Overhead is bounded: one DEL on cache + one extra primary-key read, executed once per WebSocket authentication frame (not per message). Surfaces on PR appwrite-labs/cloud#3214 as an intermittent 'Session is not valid.' failure in RealtimeConsoleClientTest + RealtimeCustomClientTest manual-authentication cases in dedicated mode. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/realtime.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index 955832e93a..9e5486e638 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -916,8 +916,19 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $store->decode($message['data']['session']); + $userId = $store->getProperty('id', ''); + + // Read-after-write across processes: the HTTP worker writes the session + // to the user document on /account endpoints, then the client sends an + // authentication frame here over a different Swoole process. Cache-layer + // propagation isn't guaranteed to be observed on the next read — purge + // locally so sessionVerify sees the freshly-written session. + if (!empty($userId)) { + $database->purgeCachedDocument('users', $userId); + } + /** @var User $user */ - $user = $database->getDocument('users', $store->getProperty('id', '')); + $user = $database->getDocument('users', $userId); /** * TODO: From 4e928ee08b0b4cd55f734a5a710dcc7ad591cb59 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 17 Apr 2026 23:08:44 +1200 Subject: [PATCH 039/192] (diag): log Realtime session-verify failure context Temporary instrumentation to diagnose the 'Session is not valid.' failure on appwrite-labs/cloud#3214's Realtime (dedicated) E2E. Emits: - project ID in scope - user ID from the session payload - whether the user document was found in the project DB - session count on the returned user document - session-secret prefix being verified - sessionVerify result This will reveal whether the race is (a) user doc missing in project DB (routing/provisioning issue) or (b) user doc found but sessions array empty or mismatched (session write path issue). Revert once the root cause is identified. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/realtime.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 9e5486e638..ce2db4450a 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -939,11 +939,21 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $proofForToken = new Token(); $proofForToken->setHash(new Sha()); - if ( - empty($user->getId()) // Check a document has been found in the DB - || !$user->sessionVerify($store->getProperty('secret', ''), $proofForToken) // Validate user has valid login token - ) { - // cookie not valid + $sessionSecret = $store->getProperty('secret', ''); + $userFound = !empty($user->getId()); + $sessionsInDoc = $userFound ? \count($user->getAttribute('sessions', [])) : 0; + $sessionVerified = $userFound && $user->sessionVerify($sessionSecret, $proofForToken); + + if (!$userFound || !$sessionVerified) { + Console::warning(sprintf( + '[realtime-auth-diag] project=%s userId=%s userFound=%s sessions=%d secretPrefix=%s verified=%s', + $projectId ?? '(null)', + $userId, + $userFound ? 'yes' : 'no', + $sessionsInDoc, + \substr($sessionSecret, 0, 8), + $sessionVerified ? 'yes' : 'no' + )); throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); } From 894d771a7ce9e12797cf2755e3a8e1afc68a863e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 00:17:13 +1200 Subject: [PATCH 040/192] (diag): include db/namespace/tenant/host in realtime-auth-diag --- app/realtime.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index ce2db4450a..da59197184 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -945,14 +945,20 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $sessionVerified = $userFound && $user->sessionVerify($sessionSecret, $proofForToken); if (!$userFound || !$sessionVerified) { + $dbAdapter = $database->getAdapter(); Console::warning(sprintf( - '[realtime-auth-diag] project=%s userId=%s userFound=%s sessions=%d secretPrefix=%s verified=%s', + '[realtime-auth-diag] project=%s userId=%s userFound=%s sessions=%d secretPrefix=%s verified=%s db=%s ns=%s tenant=%s shared=%s host=%s', $projectId ?? '(null)', $userId, $userFound ? 'yes' : 'no', $sessionsInDoc, \substr($sessionSecret, 0, 8), - $sessionVerified ? 'yes' : 'no' + $sessionVerified ? 'yes' : 'no', + $database->getDatabase(), + $database->getNamespace(), + $database->getTenant() ?? 'null', + $database->getSharedTables() ? 'yes' : 'no', + \method_exists($dbAdapter, 'getHostname') ? $dbAdapter->getHostname() : '?' )); throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); } From e8006dce6ebafb1b9d71bc09be0ec3afa01cb22e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 00:37:38 +1200 Subject: [PATCH 041/192] (diag): remove realtime-auth-diag logging (root cause fixed in cloud) --- app/realtime.php | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index da59197184..9e5486e638 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -939,27 +939,11 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $proofForToken = new Token(); $proofForToken->setHash(new Sha()); - $sessionSecret = $store->getProperty('secret', ''); - $userFound = !empty($user->getId()); - $sessionsInDoc = $userFound ? \count($user->getAttribute('sessions', [])) : 0; - $sessionVerified = $userFound && $user->sessionVerify($sessionSecret, $proofForToken); - - if (!$userFound || !$sessionVerified) { - $dbAdapter = $database->getAdapter(); - Console::warning(sprintf( - '[realtime-auth-diag] project=%s userId=%s userFound=%s sessions=%d secretPrefix=%s verified=%s db=%s ns=%s tenant=%s shared=%s host=%s', - $projectId ?? '(null)', - $userId, - $userFound ? 'yes' : 'no', - $sessionsInDoc, - \substr($sessionSecret, 0, 8), - $sessionVerified ? 'yes' : 'no', - $database->getDatabase(), - $database->getNamespace(), - $database->getTenant() ?? 'null', - $database->getSharedTables() ? 'yes' : 'no', - \method_exists($dbAdapter, 'getHostname') ? $dbAdapter->getHostname() : '?' - )); + if ( + empty($user->getId()) // Check a document has been found in the DB + || !$user->sessionVerify($store->getProperty('secret', ''), $proofForToken) // Validate user has valid login token + ) { + // cookie not valid throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); } From 1225aa4861cbe1ba65dc167b79c33cf6cebe93d7 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 00:47:33 +1200 Subject: [PATCH 042/192] (fix): translate NotFound from find() into 404 on listDocuments When a DocumentsDB collection's metadata document exists but the backing store (e.g. a freshly restored dedicated shard) has no table, Utopia\Database\Database::find() throws NotFound. Previously this bubbled to the HTTP layer as a generic 500. Catch it in the same try/catch that already handles OrderException, QueryException, and Timeout, and translate into COLLECTION_NOT_FOUND/TABLE_NOT_FOUND via getParentNotFoundException() so the caller sees the correct 404. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Http/Databases/Collections/Documents/XList.php | 6 ++++++ 1 file changed, 6 insertions(+) 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 aeee280615..96af0491e7 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 @@ -14,6 +14,7 @@ use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; +use Utopia\Database\Exception\NotFound as NotFoundException; use Utopia\Database\Exception\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Exception\Timeout; @@ -195,6 +196,11 @@ class XList extends Action $documents = $find(); $total = $includeTotal ? $dbForDatabases->count($collectionTableId, $queries, APP_LIMIT_COUNT) : 0; } + } catch (NotFoundException) { + // The collection metadata document exists but the backing store (e.g. a + // dedicated DocumentsDB shard) has no table for it. Treat this as a + // not-found on the collection so the caller sees a 404 instead of a 500. + throw new Exception($this->getParentNotFoundException(), params: [$collectionId]); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; From d8486612debcc432a2519b856fc4de6cb5b5f6c4 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 04:10:44 +1200 Subject: [PATCH 043/192] (diag): re-add realtime-auth-diag with session ids + shared-env --- app/realtime.php | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 9e5486e638..68629dba03 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -939,11 +939,37 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $proofForToken = new Token(); $proofForToken->setHash(new Sha()); - if ( - empty($user->getId()) // Check a document has been found in the DB - || !$user->sessionVerify($store->getProperty('secret', ''), $proofForToken) // Validate user has valid login token - ) { - // cookie not valid + $sessionSecret = $store->getProperty('secret', ''); + $userFound = !empty($user->getId()); + $sessionsInDoc = $userFound ? \count($user->getAttribute('sessions', [])) : 0; + $sessionVerified = $userFound && $user->sessionVerify($sessionSecret, $proofForToken); + + if (!$userFound || !$sessionVerified) { + $dbAdapter = $database->getAdapter(); + $sessionIds = []; + if ($userFound) { + foreach ($user->getAttribute('sessions', []) as $s) { + $sessionIds[] = \is_object($s) && \method_exists($s, 'getId') + ? $s->getId() + : (\is_array($s) ? ($s['$id'] ?? '?') : '?'); + } + } + Console::warning(sprintf( + '[realtime-auth-diag] project=%s userId=%s userFound=%s sessions=%d sessionIds=%s secretPrefix=%s verified=%s db=%s ns=%s tenant=%s shared=%s host=%s sharedEnv=%s', + $projectId ?? '(null)', + $userId, + $userFound ? 'yes' : 'no', + $sessionsInDoc, + \implode(',', $sessionIds) ?: '(none)', + \substr($sessionSecret, 0, 8), + $sessionVerified ? 'yes' : 'no', + $database->getDatabase(), + $database->getNamespace(), + (string) ($database->getTenant() ?? 'null'), + $database->getSharedTables() ? 'yes' : 'no', + \method_exists($dbAdapter, 'getHostname') ? $dbAdapter->getHostname() : '?', + System::getEnv('_APP_DATABASE_SHARED_TABLES', '(empty)') + )); throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); } From 8716497d1f339e6e366b7b47c52265b4a8a4fde7 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 05:42:49 +1200 Subject: [PATCH 044/192] (diag): log project lookup result before getProjectDB fallback --- app/realtime.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/realtime.php b/app/realtime.php index 68629dba03..822dd8eba8 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -847,6 +847,17 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re if (!empty($projectId) && $projectId !== 'console') { $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); + if ($project->isEmpty()) { + Console::warning(sprintf( + '[realtime-project-diag] projectId=%s consoleDb=%s consoleNs=%s consoleTenant=%s consoleShared=%s — project lookup returned empty, will fall back to console', + $projectId, + $database->getDatabase(), + $database->getNamespace(), + (string) ($database->getTenant() ?? 'null'), + $database->getSharedTables() ? 'yes' : 'no' + )); + } + $database = getProjectDB($project); $database->setAuthorization($authorization); } else { From 92e8334169756eb4b26d26034754b9cd805d295c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 06:13:44 +1200 Subject: [PATCH 045/192] (fix): purge cached project document before Realtime auth lookup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-process negative-cache race in Realtime's onMessage handler: when the WebSocket opens against a just-created project, an earlier router probe or subscription lookup may have cached projects:\$projectId as empty before the project actually existed. Although the HTTP worker purges on createDocument, a narrow window lets Realtime re-populate the stale empty entry in its own process cache, after which getProjectDB() sees an empty Document and falls back to getConsoleDB(), which looks for users in the console namespace and returns nothing — sessionVerify then fails with 'Session is not valid.' Surfaces on cloud#3214 as a recurring Realtime (dedicated) E2E failure. Diagnosed via [realtime-project-diag] + [realtime-auth-diag] instrumentation — the logs show consoleDb=appwrite consoleNs=console15x (correct), project lookup empty, and subsequent user lookup landing in the console namespace. Purge is bounded: one cache DEL per WS message (not per read), runs only when a projectId is present, and only forces the single projects:\$projectId key to be re-read from adapter. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/realtime.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 822dd8eba8..a12cf875f2 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -845,18 +845,15 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $database->setAuthorization($authorization); if (!empty($projectId) && $projectId !== 'console') { - $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); + // Negative-cache race: if any prior code path queried projects:$projectId + // before this project existed (e.g. a router probe during connection + // setup), the Database's shared cache may hold an empty result. HTTP + // worker creates the project via dbForPlatform which purges on write, + // but there's a window during which Realtime can re-populate a stale + // cache entry. Purge before reading to force a fresh adapter hit. + $database->purgeCachedDocument('projects', $projectId); - if ($project->isEmpty()) { - Console::warning(sprintf( - '[realtime-project-diag] projectId=%s consoleDb=%s consoleNs=%s consoleTenant=%s consoleShared=%s — project lookup returned empty, will fall back to console', - $projectId, - $database->getDatabase(), - $database->getNamespace(), - (string) ($database->getTenant() ?? 'null'), - $database->getSharedTables() ? 'yes' : 'no' - )); - } + $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); $database = getProjectDB($project); $database->setAuthorization($authorization); From fc714de11decab14a528b3630fea2f9f6dde682b Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 18 Apr 2026 07:00:39 +1200 Subject: [PATCH 046/192] (diag): remove realtime-auth-diag / realtime-project-diag logging Root causes are fixed: Realtime now purges both projects:$projectId and users:$userId from the shared cache before the respective reads, eliminating the cross-process negative-cache races that surfaced as intermittent 'Session is not valid.' failures on appwrite-labs/cloud#3214's Realtime (dedicated) E2E. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/realtime.php | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index a12cf875f2..ddab36aa46 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -947,37 +947,11 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $proofForToken = new Token(); $proofForToken->setHash(new Sha()); - $sessionSecret = $store->getProperty('secret', ''); - $userFound = !empty($user->getId()); - $sessionsInDoc = $userFound ? \count($user->getAttribute('sessions', [])) : 0; - $sessionVerified = $userFound && $user->sessionVerify($sessionSecret, $proofForToken); - - if (!$userFound || !$sessionVerified) { - $dbAdapter = $database->getAdapter(); - $sessionIds = []; - if ($userFound) { - foreach ($user->getAttribute('sessions', []) as $s) { - $sessionIds[] = \is_object($s) && \method_exists($s, 'getId') - ? $s->getId() - : (\is_array($s) ? ($s['$id'] ?? '?') : '?'); - } - } - Console::warning(sprintf( - '[realtime-auth-diag] project=%s userId=%s userFound=%s sessions=%d sessionIds=%s secretPrefix=%s verified=%s db=%s ns=%s tenant=%s shared=%s host=%s sharedEnv=%s', - $projectId ?? '(null)', - $userId, - $userFound ? 'yes' : 'no', - $sessionsInDoc, - \implode(',', $sessionIds) ?: '(none)', - \substr($sessionSecret, 0, 8), - $sessionVerified ? 'yes' : 'no', - $database->getDatabase(), - $database->getNamespace(), - (string) ($database->getTenant() ?? 'null'), - $database->getSharedTables() ? 'yes' : 'no', - \method_exists($dbAdapter, 'getHostname') ? $dbAdapter->getHostname() : '?', - System::getEnv('_APP_DATABASE_SHARED_TABLES', '(empty)') - )); + if ( + empty($user->getId()) // Check a document has been found in the DB + || !$user->sessionVerify($store->getProperty('secret', ''), $proofForToken) // Validate user has valid login token + ) { + // cookie not valid throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); } From db720fbb22422b2e870b9e1cd84ea14fe6b4a160 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 20 Apr 2026 17:58:06 +1200 Subject: [PATCH 047/192] (chore): update lock --- composer.lock | 133 +++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 67 deletions(-) diff --git a/composer.lock b/composer.lock index 56b838a0fe..d0d69bd0c5 100644 --- a/composer.lock +++ b/composer.lock @@ -2887,7 +2887,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -2948,7 +2948,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.36.0" }, "funding": [ { @@ -2972,7 +2972,7 @@ }, { "name": "symfony/polyfill-php82", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php82.git", @@ -3028,7 +3028,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php82/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-php82/tree/v1.36.0" }, "funding": [ { @@ -3052,7 +3052,7 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", @@ -3108,7 +3108,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.36.0" }, "funding": [ { @@ -3132,7 +3132,7 @@ }, { "name": "symfony/polyfill-php85", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php85.git", @@ -3188,7 +3188,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php85/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-php85/tree/v1.36.0" }, "funding": [ { @@ -4271,16 +4271,16 @@ }, { "name": "utopia-php/http", - "version": "0.34.20", + "version": "0.34.21", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "d6b360d555022d16c16d40be51f86180364819f8" + "reference": "49a6bd3ea0d2966aa19cf707255d442675288a24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/d6b360d555022d16c16d40be51f86180364819f8", - "reference": "d6b360d555022d16c16d40be51f86180364819f8", + "url": "https://api.github.com/repos/utopia-php/http/zipball/49a6bd3ea0d2966aa19cf707255d442675288a24", + "reference": "49a6bd3ea0d2966aa19cf707255d442675288a24", "shasum": "" }, "require": { @@ -4319,22 +4319,22 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.34.20" + "source": "https://github.com/utopia-php/http/tree/0.34.21" }, - "time": "2026-04-12T14:25:22+00:00" + "time": "2026-04-19T19:44:04+00:00" }, { "name": "utopia-php/image", - "version": "0.8.5", + "version": "0.8.6", "source": { "type": "git", "url": "https://github.com/utopia-php/image.git", - "reference": "9af2fcff028a42550465e2ccad88e3b31c3584f3" + "reference": "85ab7027873e11bc901110d8f7830252247ba724" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/image/zipball/9af2fcff028a42550465e2ccad88e3b31c3584f3", - "reference": "9af2fcff028a42550465e2ccad88e3b31c3584f3", + "url": "https://api.github.com/repos/utopia-php/image/zipball/85ab7027873e11bc901110d8f7830252247ba724", + "reference": "85ab7027873e11bc901110d8f7830252247ba724", "shasum": "" }, "require": { @@ -4370,9 +4370,9 @@ ], "support": { "issues": "https://github.com/utopia-php/image/issues", - "source": "https://github.com/utopia-php/image/tree/0.8.5" + "source": "https://github.com/utopia-php/image/tree/0.8.6" }, - "time": "2026-04-17T15:02:49+00:00" + "time": "2026-04-19T12:52:59+00:00" }, { "name": "utopia-php/locale", @@ -5464,16 +5464,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.17.11", + "version": "1.20", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "c714ee52659ef5968b3372ff4da0e407140a6250" + "reference": "525f0630520c95100fcdfb63c9dac859c1d02588" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/c714ee52659ef5968b3372ff4da0e407140a6250", - "reference": "c714ee52659ef5968b3372ff4da0e407140a6250", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/525f0630520c95100fcdfb63c9dac859c1d02588", + "reference": "525f0630520c95100fcdfb63c9dac859c1d02588", "shasum": "" }, "require": { @@ -5509,9 +5509,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.17.11" + "source": "https://github.com/appwrite/sdk-generator/tree/1.20" }, - "time": "2026-04-11T02:42:32+00:00" + "time": "2026-04-20T05:45:00+00:00" }, { "name": "brianium/paratest", @@ -6220,11 +6220,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.46", + "version": "2.1.50", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", - "reference": "a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d452086fb4cf648c6b2d8cf3b639351f79e4f3e2", + "reference": "d452086fb4cf648c6b2d8cf3b639351f79e4f3e2", "shasum": "" }, "require": { @@ -6269,20 +6269,20 @@ "type": "github" } ], - "time": "2026-04-01T09:25:14+00:00" + "time": "2026-04-17T13:10:32+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "12.5.3", + "version": "12.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b015312f28dd75b75d3422ca37dff2cd1a565e8d" + "reference": "876099a072646c7745f673d7aeab5382c4439691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b015312f28dd75b75d3422ca37dff2cd1a565e8d", - "reference": "b015312f28dd75b75d3422ca37dff2cd1a565e8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/876099a072646c7745f673d7aeab5382c4439691", + "reference": "876099a072646c7745f673d7aeab5382c4439691", "shasum": "" }, "require": { @@ -6291,7 +6291,6 @@ "ext-xmlwriter": "*", "nikic/php-parser": "^5.7.0", "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0", "phpunit/php-text-template": "^5.0", "sebastian/complexity": "^5.0", "sebastian/environment": "^8.0.3", @@ -6338,7 +6337,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.5.3" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.5.6" }, "funding": [ { @@ -6358,7 +6357,7 @@ "type": "tidelift" } ], - "time": "2026-02-06T06:01:44+00:00" + "time": "2026-04-15T08:23:17+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6619,16 +6618,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.5.17", + "version": "12.5.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "85b62adab1a340982df64e66daa4a4435eb5723b" + "reference": "c54fcf3d6bcb6e96ac2f7e40097dc37b5f139969" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/85b62adab1a340982df64e66daa4a4435eb5723b", - "reference": "85b62adab1a340982df64e66daa4a4435eb5723b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c54fcf3d6bcb6e96ac2f7e40097dc37b5f139969", + "reference": "c54fcf3d6bcb6e96ac2f7e40097dc37b5f139969", "shasum": "" }, "require": { @@ -6642,15 +6641,15 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.3", - "phpunit/php-code-coverage": "^12.5.3", + "phpunit/php-code-coverage": "^12.5.6", "phpunit/php-file-iterator": "^6.0.1", "phpunit/php-invoker": "^6.0.0", "phpunit/php-text-template": "^5.0.0", "phpunit/php-timer": "^8.0.0", "sebastian/cli-parser": "^4.2.0", - "sebastian/comparator": "^7.1.4", + "sebastian/comparator": "^7.1.6", "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.0.4", + "sebastian/environment": "^8.1.0", "sebastian/exporter": "^7.0.2", "sebastian/global-state": "^8.0.2", "sebastian/object-enumerator": "^7.0.0", @@ -6697,7 +6696,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.17" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.23" }, "funding": [ { @@ -6705,7 +6704,7 @@ "type": "other" } ], - "time": "2026-04-08T03:04:19+00:00" + "time": "2026-04-18T06:12:49+00:00" }, { "name": "sebastian/cli-parser", @@ -6778,16 +6777,16 @@ }, { "name": "sebastian/comparator", - "version": "7.1.5", + "version": "7.1.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "c284f55811f43d555e51e8e5c166ac40d3e33c63" + "reference": "c769009dee98f494e0edc3fd4f4087501688f11e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c284f55811f43d555e51e8e5c166ac40d3e33c63", - "reference": "c284f55811f43d555e51e8e5c166ac40d3e33c63", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c769009dee98f494e0edc3fd4f4087501688f11e", + "reference": "c769009dee98f494e0edc3fd4f4087501688f11e", "shasum": "" }, "require": { @@ -6846,7 +6845,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.5" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.6" }, "funding": [ { @@ -6866,7 +6865,7 @@ "type": "tidelift" } ], - "time": "2026-04-08T04:43:00+00:00" + "time": "2026-04-14T08:23:15+00:00" }, { "name": "sebastian/complexity", @@ -6995,16 +6994,16 @@ }, { "name": "sebastian/environment", - "version": "8.0.4", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "7b8842c2d8e85d0c3a5831236bf5869af6ab2a11" + "reference": "b121608b28a13f721e76ffbbd386d08eff58f3f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7b8842c2d8e85d0c3a5831236bf5869af6ab2a11", - "reference": "7b8842c2d8e85d0c3a5831236bf5869af6ab2a11", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b121608b28a13f721e76ffbbd386d08eff58f3f6", + "reference": "b121608b28a13f721e76ffbbd386d08eff58f3f6", "shasum": "" }, "require": { @@ -7019,7 +7018,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -7047,7 +7046,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.0.4" + "source": "https://github.com/sebastianbergmann/environment/tree/8.1.0" }, "funding": [ { @@ -7067,7 +7066,7 @@ "type": "tidelift" } ], - "time": "2026-03-15T07:05:40+00:00" + "time": "2026-04-15T12:13:01+00:00" }, { "name": "sebastian/exporter", @@ -7780,7 +7779,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -7839,7 +7838,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.36.0" }, "funding": [ { @@ -7863,7 +7862,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -7921,7 +7920,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.36.0" }, "funding": [ { @@ -7945,7 +7944,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -8006,7 +8005,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.36.0" }, "funding": [ { @@ -8030,7 +8029,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.34.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -8086,7 +8085,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.36.0" }, "funding": [ { From a17f9ce9892f0df9b6ba2611581ee565a45d9da9 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 24 Apr 2026 17:30:19 +0530 Subject: [PATCH 048/192] removed comments --- app/realtime.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index e9258cf068..d8f1bdeb2d 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1547,7 +1547,6 @@ $server->onClose(function (int $connection) use ($server, $realtime, $stats, $re $consoleDB = getConsoleDB(); $project = $consoleDB->getAuthorization()->skip(fn () => $consoleDB->getDocument('projects', $projectId)); - // todo: have a bulk delete if (!$project->isEmpty()) { $dbForProject = getProjectDB($project); $presences = $dbForProject->find('presenceLogs', [ From 5157da870f66e57e3cfd736214e89f38b53c3598 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 12:19:03 +0530 Subject: [PATCH 049/192] add presence specific read and write scope instead of depending on the users read and write scope --- app/config/scopes/project.php | 6 ++++++ src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 8 ++++++-- src/Appwrite/Platform/Modules/Presences/HTTP/Get.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 7 +++++-- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/config/scopes/project.php b/app/config/scopes/project.php index 592e032ba1..fb0bd39ce7 100644 --- a/app/config/scopes/project.php +++ b/app/config/scopes/project.php @@ -10,6 +10,12 @@ return [ // List of publicly visible scopes 'users.write' => [ 'description' => 'Access to create, update, and delete your project\'s users', ], + 'presence.read' => [ + 'description' => 'Access to read your project\'s presences', + ], + 'presence.write' => [ + 'description' => 'Access to create, update, and delete your project\'s presences', + ], 'teams.read' => [ 'description' => 'Access to read your project\'s teams', ], diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 32a497ed64..ea232c9457 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -9,6 +9,7 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; +use Appwrite\Usage\Context; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Exception\Conflict as ConflictException; @@ -33,7 +34,7 @@ class Delete extends Base ->setHttpPath('/v1/presences/:presenceId') ->desc('Delete presence') ->groups(['api', 'presences']) - ->label('scope', 'users.write') + ->label('scope', 'presence.write') ->label('event', 'presences.[presenceId].delete') ->label('audits.event', 'presence.delete') ->label('audits.resource', 'presence/{request.presenceId}') @@ -55,10 +56,11 @@ class Delete extends Base ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') + ->inject('usage') ->callback($this->action(...)); } - public function action(string $presenceId, Response $response, Database $dbForProject, Event $queueForEvents): void + public function action(string $presenceId, Response $response, Database $dbForProject, Event $queueForEvents, Context $usage): void { $presence = $dbForProject->getDocument('presenceLogs', $presenceId); @@ -74,6 +76,8 @@ class Delete extends Base throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT); } + $usage->addMetric(METRIC_PRESENCE_DELETED, 1); + $queueForEvents ->setParam('presenceId', $presence->getId()) ->setPayload($response->output($presence, Response::MODEL_PRESENCE)); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 75323d500e..88316bd3ce 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -29,7 +29,7 @@ class Get extends Base ->setHttpPath('/v1/presences/:presenceId') ->desc('Get presence') ->groups(['api', 'presences']) - ->label('scope', 'users.read') + ->label('scope', 'presence.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index e932a2b42a..f9151a6f7e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -38,7 +38,7 @@ class Update extends PresenceAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Update presence') ->groups(['api', 'presences']) - ->label('scope', 'users.write') + ->label('scope', 'presence.write') ->label('event', 'presences.[presenceId].update') ->label('audits.event', 'presence.update') ->label('audits.resource', 'presence/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index eece989311..2b4ea39eee 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -9,6 +9,7 @@ use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; +use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Response; use Utopia\Database\Database; @@ -40,7 +41,7 @@ class Upsert extends PresenceAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Upsert presence') ->groups(['api', 'presences']) - ->label('scope', 'users.write') + ->label('scope', 'presence.write') ->label('event', 'presences.[presenceId].upsert') ->label('audits.event', 'presence.upsert') ->label('audits.resource', 'presence/{response.$id}') @@ -69,6 +70,7 @@ class Upsert extends PresenceAction ->inject('user') ->inject('authorization') ->inject('queueForEvents') + ->inject('usage') ->callback($this->action(...)); } @@ -83,7 +85,8 @@ class Upsert extends PresenceAction Database $dbForProject, User $user, Authorization $authorization, - Event $queueForEvents + Event $queueForEvents, + Context $usage ): void { $isAPIKey = $user->isApp($authorization->getRoles()); $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index fb8203c7e2..e6f6711008 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -39,7 +39,7 @@ class XList extends Base ->setHttpPath('/v1/presences') ->desc('List presences') ->groups(['api', 'presences']) - ->label('scope', 'users.read') + ->label('scope', 'presence.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', From 93ee8f45eab4618687d1ab50f4b90d07b6e39f84 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 13:50:11 +0530 Subject: [PATCH 050/192] updated scopes --- tests/e2e/Services/Presence/PresenceBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index b63e1e1b3a..c432e534cf 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -20,8 +20,8 @@ trait PresenceBase } self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ - 'users.read', - 'users.write', + 'presence.read', + 'presence.write', ]); return self::$presenceApiKeyCache[$projectId]; From 587a03949354c63d16c2fda78570f3b175997f63 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 13:57:31 +0530 Subject: [PATCH 051/192] fixed syntax --- src/Appwrite/Messaging/Adapter/Realtime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 0793c98a03..60bd9f9d10 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -125,7 +125,7 @@ class Realtime extends MessagingAdapter 'projectId' => $projectId, 'roles' => \array_values(\array_unique(\array_merge($existingRoles, $roles))), 'userId' => $userId ?? ($existing['userId'] ?? ''), - 'channels' => \array_values(\array_unique(\array_merge($existingChannels, $channels))),, + 'channels' => \array_values(\array_unique(\array_merge($existingChannels, $channels))), 'presences' => $this->connections[$identifier]['presences'] ?? [] ]; From 34f782d98657250960d574f29b09254787aaa57c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 17:16:24 +0530 Subject: [PATCH 052/192] updated roles for the admin and members users --- app/config/roles.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/config/roles.php b/app/config/roles.php index 33c7ffc9de..cd1e2963c7 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -12,6 +12,8 @@ $member = [ 'account', 'teams.read', 'teams.write', + 'presence.read', + 'presence.write', 'documents.read', 'documents.write', 'rows.read', @@ -47,6 +49,8 @@ $admins = [ 'buckets.write', 'users.read', 'users.write', + 'presence.read', + 'presence.write', 'databases.read', 'databases.write', 'collections.read', From 8d378720b04789505a39922f3d316bc086ff5ebe Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 17:19:24 +0530 Subject: [PATCH 053/192] add presence API metrics and usage tracking --- app/init/constants.php | 5 + app/init/models.php | 2 + app/realtime.php | 78 +++++++++++- src/Appwrite/Databases/PresenceState.php | 34 ++++- .../Modules/Presences/HTTP/Delete.php | 1 + .../Modules/Presences/HTTP/Upsert.php | 8 +- .../Modules/Presences/HTTP/Usage/Get.php | 119 ++++++++++++++++++ .../Modules/Presences/Services/Http.php | 2 + src/Appwrite/Utopia/Response.php | 1 + .../Utopia/Response/Model/UsagePresence.php | 43 +++++++ tests/e2e/General/UsageTest.php | 105 ++++++++++++++++ .../Presence/PresenceConsoleClientTest.php | 39 ++++++ 12 files changed, 428 insertions(+), 9 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php create mode 100644 src/Appwrite/Utopia/Response/Model/UsagePresence.php create mode 100644 tests/e2e/Services/Presence/PresenceConsoleClientTest.php diff --git a/app/init/constants.php b/app/init/constants.php index 8eacf2fe12..b0a7de1ab5 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -385,6 +385,7 @@ const METRIC_NETWORK_OUTBOUND = 'network.outbound'; const METRIC_MAU = 'users.mau'; const METRIC_DAU = 'users.dau'; const METRIC_WAU = 'users.wau'; +const METRIC_USERS_PRESENCE = 'users.presence'; const METRIC_WEBHOOKS = 'webhooks'; const METRIC_PLATFORMS = 'platforms'; const METRIC_PROVIDERS = 'providers'; @@ -409,6 +410,10 @@ const METRIC_REALTIME_CONNECTIONS_MESSAGES_SENT = 'realtime.messages.sent'; const METRIC_REALTIME_INBOUND = 'realtime.inbound'; const METRIC_REALTIME_OUTBOUND = 'realtime.outbound'; +// Presence API metrics +const METRIC_PRESENCE_UPSERTED = 'presence.upserted'; +const METRIC_PRESENCE_DELETED = 'presence.deleted'; + // Resource types const RESOURCE_TYPE_PROJECTS = 'projects'; const RESOURCE_TYPE_FUNCTIONS = 'functions'; diff --git a/app/init/models.php b/app/init/models.php index fd90291e96..143ec213ce 100644 --- a/app/init/models.php +++ b/app/init/models.php @@ -160,6 +160,7 @@ use Appwrite\Utopia\Response\Model\UsageDocumentsDB; use Appwrite\Utopia\Response\Model\UsageDocumentsDBs; use Appwrite\Utopia\Response\Model\UsageFunction; use Appwrite\Utopia\Response\Model\UsageFunctions; +use Appwrite\Utopia\Response\Model\UsagePresence; use Appwrite\Utopia\Response\Model\UsageProject; use Appwrite\Utopia\Response\Model\UsageSite; use Appwrite\Utopia\Response\Model\UsageSites; @@ -388,6 +389,7 @@ Response::setModel(new UsageDatabase()); Response::setModel(new UsageTable()); Response::setModel(new UsageCollection()); Response::setModel(new UsageUsers()); +Response::setModel(new UsagePresence()); Response::setModel(new UsageStorage()); Response::setModel(new UsageBuckets()); Response::setModel(new UsageFunctions()); diff --git a/app/realtime.php b/app/realtime.php index d8f1bdeb2d..83a2f7733e 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -2,12 +2,15 @@ use Appwrite\Databases\PresenceState; use Appwrite\Event\Event as QueueEvent; +use Appwrite\Event\Message\Usage as UsageMessage; +use Appwrite\Event\Publisher\Usage as UsagePublisher; use Appwrite\Event\Realtime as QueueRealtime; use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; use Appwrite\PubSub\Adapter\Pool as PubSubPool; +use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; @@ -42,6 +45,7 @@ use Utopia\DSN\DSN; use Utopia\Logger\Log; use Utopia\Pools\Group; use Utopia\Queue\Broker\Pool as BrokerPool; +use Utopia\Queue\Queue; use Utopia\Registry\Registry; use Utopia\Span\Span; use Utopia\System\System; @@ -55,6 +59,29 @@ require_once __DIR__ . '/init/span.php'; /** @var Registry $register */ $register = $GLOBALS['register'] ?? throw new \RuntimeException('Registry not initialized'); +/** @var Group $pools */ +$pools = $register->get('pools'); +$statsUsageConnection = System::getEnv('_APP_CONNECTIONS_QUEUE_STATS_USAGE', ''); +$publisherPoolName = 'publisher'; + +if (!empty($statsUsageConnection)) { + try { + $pools->get('publisher_' . $statsUsageConnection); + $publisherPoolName = 'publisher_' . $statsUsageConnection; + } catch (Throwable) { + // Fallback to default publisher pool when custom one is unavailable. + } +} + +$broker = new BrokerPool(publisher: $pools->get($publisherPoolName)); +$publisherForUsage = new UsagePublisher( + $broker, + new Queue(System::getEnv( + '_APP_STATS_USAGE_QUEUE_NAME', + \Appwrite\Event\Event::STATS_USAGE_QUEUE_NAME + )) +); + $registerConnectionResources ??= require __DIR__ . '/init/realtime/connection.php'; Runtime::enableCoroutine(SWOOLE_HOOK_ALL); @@ -245,8 +272,39 @@ if (!function_exists('getTelemetry')) { } if (!function_exists('triggerStats')) { - function triggerStats(array $event, string $projectId): void + function triggerStats(array $event, string $projectId): void{} +} + +if (!function_exists('triggerPresenceUsage')) { + function triggerPresenceUsage(int $value, string $projectId): void { + if (empty($projectId)) { + return; + } + + try { + global $publisherForUsage; + + $consoleDB = getConsoleDB(); + /** @var Document $project */ + $project = $consoleDB->getAuthorization()->skip( + fn () => $consoleDB->getDocument('projects', $projectId) + ); + + if ($project->isEmpty()) { + return; + } + + $usage = new Context(); + $usage->addMetric(METRIC_USERS_PRESENCE, $value); + + $publisherForUsage->enqueue(new UsageMessage( + project: $project, + metrics: $usage->getMetrics(), + )); + } catch (Throwable $th) { + logError($th, 'realtimeStats', tags: ['projectId' => $projectId]); + } } } @@ -1429,7 +1487,17 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $presenceState->setPermissions($presenceDocument, $message['data']['permissions'] ?? null, $user, $authorization); $presenceId = $message['data']['presenceId'] ?? 'unique()'; - $presence = $presenceState->upsertForUser($database, $presenceDocument, $presenceId, $userId); + $presence = $presenceState->upsertForUser( + $database, + $presenceDocument, + $presenceId, + $userId, + function () use ($project): void { + if ($project !== null && !$project->isEmpty()) { + triggerPresenceUsage(1, $project->getId()); + } + } + ); $presence->removeAttribute('hostname'); @@ -1558,6 +1626,12 @@ $server->onClose(function (int $connection) use ($server, $realtime, $stats, $re // swallow errors to avoid breaking disconnect cleanup } + $deletedPresences = \count($presences); + + if ($deletedPresences > 0) { + triggerPresenceUsage(-$deletedPresences, $project->getId()); + } + foreach ($presences as $presence) { try { triggerPresenceEvent($server, $realtime, $project, new User([]), 'presences.[presenceId].delete', $presence); diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 317c23a23c..6568a095d6 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -51,18 +51,38 @@ class PresenceState return $document; } - public function upsertForUser(Database $dbForProject, Document $presenceDocument, string $presenceId, string $userId): Document - { + public function upsertForUser( + Database $dbForProject, + Document $presenceDocument, + string $presenceId, + string $userId, + ?callable $onPresenceCreated = null + ): Document { if ($presenceId !== 'unique()') { $presenceDocument->setAttribute('$id', $presenceId); } + $presenceCreated = false; try { if ($this->getSupportForUniqueIndexBasedUpsert()) { - return $this->transactionalUpsertForUser($dbForProject, $presenceDocument, $presenceId, $userId); + $presence = $this->transactionalUpsertForUser( + $dbForProject, + $presenceDocument, + $presenceId, + $userId, + $presenceCreated + ); + } else { + $presenceCreated = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])])->isEmpty(); + $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); } - return $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + + if ($presenceCreated && $onPresenceCreated !== null) { + call_user_func($onPresenceCreated); + } + + return $presence; } catch (DuplicateException $e) { throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); } catch (NotFoundException $e) { @@ -78,12 +98,14 @@ class PresenceState Database $dbForProject, Document $presenceDocument, string $presenceId, - string $userId + string $userId, + ?bool &$presenceCreated = null ): Document { - return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId) { + return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId, &$presenceCreated) { $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); if ($existingPresence->isEmpty()) { + $presenceCreated = true; return $dbForProject->createDocument('presenceLogs', $presenceDocument); } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index ea232c9457..7b9bd51205 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -77,6 +77,7 @@ class Delete extends Base } $usage->addMetric(METRIC_PRESENCE_DELETED, 1); + $usage->addMetric(METRIC_USERS_PRESENCE, -1); $queueForEvents ->setParam('presenceId', $presence->getId()) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 2b4ea39eee..03ed352d66 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -126,7 +126,13 @@ class Upsert extends PresenceAction $presenceState = new PresenceState(); $presenceDocument = new Document($presenceData); $presenceState->setPermissions($presenceDocument, $permissions, $user, $authorization); - $presence = $presenceState->upsertForUser($dbForProject, $presenceDocument, $presenceId, $resolvedUserId); + $presence = $presenceState->upsertForUser( + $dbForProject, + $presenceDocument, + $presenceId, + $resolvedUserId, + fn () => $usage->addMetric(METRIC_USERS_PRESENCE, 1) + ); $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php new file mode 100644 index 0000000000..85bf089453 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php @@ -0,0 +1,119 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/presences/usage') + ->desc('Get presence usage') + ->groups(['api', 'presences', 'usage']) + ->label('scope', 'presence.read') + ->label('sdk', new Method( + namespace: 'presences', + group: null, + name: 'getUsage', + description: 'Get presence usage metrics and statistics, including the current total of online users and historical online user counts for the selected time range.', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USAGE_PRESENCE, + ), + ], + )) + ->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('authorization') + ->callback($this->action(...)); + } + + public function action( + string $range, + Response $response, + Database $dbForProject, + Authorization $authorization + ): void { + $periods = Config::getParam('usage', []); + $days = $periods[$range]; + $metric = METRIC_USERS_PRESENCE; + $stats = [ + 'total' => 0, + 'data' => [], + ]; + $hasTotal = false; + + $authorization->skip(function () use ($dbForProject, $days, $metric, &$stats, &$hasTotal): void { + $result = $dbForProject->findOne('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', ['inf']), + ]); + + $hasTotal = !$result->isEmpty(); + $stats['total'] = $result['value'] ?? 0; + + $results = $dbForProject->find('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', [$days['period']]), + Query::limit($days['limit']), + Query::orderDesc('time'), + ]); + + foreach ($results as $result) { + $stats['data'][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + }); + + if (!$hasTotal && !empty($stats['data'])) { + $stats['total'] = \end($stats['data'])['value'] ?? 0; + } + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + default => throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Unsupported period: ' . $days['period']), + }; + + $usage = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[] = [ + 'value' => $stats['data'][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + + $response->dynamic(new Document([ + 'range' => $range, + 'usersOnlineTotal' => $stats['total'], + 'usersOnline' => $usage, + ]), Response::MODEL_USAGE_PRESENCE); + } +} diff --git a/src/Appwrite/Platform/Modules/Presences/Services/Http.php b/src/Appwrite/Platform/Modules/Presences/Services/Http.php index 76fcfdee75..40aafd6610 100644 --- a/src/Appwrite/Platform/Modules/Presences/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Presences/Services/Http.php @@ -6,6 +6,7 @@ use Appwrite\Platform\Modules\Presences\HTTP\Delete as DeletePresence; use Appwrite\Platform\Modules\Presences\HTTP\Get as GetPresence; use Appwrite\Platform\Modules\Presences\HTTP\Update as UpdatePresence; use Appwrite\Platform\Modules\Presences\HTTP\Upsert as UpsertPresence; +use Appwrite\Platform\Modules\Presences\HTTP\Usage\Get as GetUsage; use Appwrite\Platform\Modules\Presences\HTTP\XList as ListPresences; use Utopia\Platform\Service; @@ -17,6 +18,7 @@ class Http extends Service $this ->addAction(UpsertPresence::getName(), new UpsertPresence()) + ->addAction(GetUsage::getName(), new GetUsage()) ->addAction(GetPresence::getName(), new GetPresence()) ->addAction(ListPresences::getName(), new ListPresences()) ->addAction(UpdatePresence::getName(), new UpdatePresence()) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 9b453b9876..2521a01973 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -39,6 +39,7 @@ class Response extends SwooleResponse public const MODEL_USAGE_TABLE = 'usageTable'; public const MODEL_USAGE_COLLECTION = 'usageCollection'; public const MODEL_USAGE_USERS = 'usageUsers'; + public const MODEL_USAGE_PRESENCE = 'usagePresence'; public const MODEL_USAGE_BUCKETS = 'usageBuckets'; public const MODEL_USAGE_STORAGE = 'usageStorage'; public const MODEL_USAGE_FUNCTIONS = 'usageFunctions'; diff --git a/src/Appwrite/Utopia/Response/Model/UsagePresence.php b/src/Appwrite/Utopia/Response/Model/UsagePresence.php new file mode 100644 index 0000000000..6693fd53b2 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/UsagePresence.php @@ -0,0 +1,43 @@ +addRule('range', [ + 'type' => self::TYPE_STRING, + 'description' => 'Time range of the usage stats.', + 'default' => '', + 'example' => '30d', + ]) + ->addRule('usersOnlineTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Current total number of online users.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('usersOnline', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of online users per period.', + 'default' => [], + 'example' => [], + 'array' => true, + ]); + } + + public function getName(): string + { + return 'UsagePresence'; + } + + public function getType(): string + { + return Response::MODEL_USAGE_PRESENCE; + } +} diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 4f557e8959..e000972a6c 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -18,6 +18,7 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\System\System; +use WebSocket\Client as WebSocketClient; class UsageTest extends Scope { @@ -227,6 +228,110 @@ class UsageTest extends Scope } #[Depends('testUsersStats')] + public function testPreparePresenceStats(array $data): array + { + $presenceKey = $this->getNewKey([ + 'presence.read', + 'presence.write', + ]); + $projectId = $this->getProject()['$id']; + + $apiUser = $this->getUser(true); + $apiPresence = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $presenceKey, + ], + [ + 'userId' => $apiUser['$id'], + 'status' => 'online', + 'metadata' => [ + 'source' => 'api', + 'testRunId' => ID::unique(), + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ] + ); + $this->assertEquals(200, $apiPresence['headers']['status-code']); + + return $data; + } + + #[Depends('testPreparePresenceStats')] + #[Retry(count: 1)] + public function testPresenceStats(array $data): array + { + $projectId = $this->getProject()['$id']; + $realtimeUser = $this->getUser(true); + $realtime = new WebSocketClient( + 'ws://appwrite.test/v1/realtime?' . \http_build_query([ + 'project' => $projectId, + ]), + [ + 'headers' => [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $realtimeUser['session'], + ], + 'timeout' => 2, + ] + ); + + try { + $connected = \json_decode($realtime->receive(), true); + $this->assertSame('connected', $connected['type'] ?? null); + + $presenceId = ID::unique(); + $realtime->send(\json_encode([ + 'type' => 'presence', + 'data' => [ + 'presenceId' => $presenceId, + 'status' => 'online', + 'metadata' => [ + 'source' => 'realtime', + 'testRunId' => ID::unique(), + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ], + ])); + + $response = \json_decode($realtime->receive(), true); + $this->assertSame('response', $response['type'] ?? null); + $this->assertSame('presence', $response['data']['to'] ?? null); + $this->assertSame($presenceId, $response['data']['presence']['$id'] ?? null); + + $this->assertEventually(function () { + $response = $this->client->call( + Client::METHOD_GET, + '/presences/usage?range=90d', + $this->getConsoleHeaders() + ); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals('90d', $response['body']['range']); + $this->assertEquals(90, count($response['body']['usersOnline'])); + $this->assertEquals(2, $response['body']['usersOnlineTotal']); + $this->assertEquals(2, $response['body']['usersOnline'][array_key_last($response['body']['usersOnline'])]['value']); + $this->validateDates($response['body']['usersOnline']); + }); + } finally { + $realtime->close(); + } + + return $data; + } + + #[Depends('testPresenceStats')] public function testPrepareStorageStats(array $data): array { $requestsTotal = $data['requestsTotal']; diff --git a/tests/e2e/Services/Presence/PresenceConsoleClientTest.php b/tests/e2e/Services/Presence/PresenceConsoleClientTest.php new file mode 100644 index 0000000000..67b2a967d4 --- /dev/null +++ b/tests/e2e/Services/Presence/PresenceConsoleClientTest.php @@ -0,0 +1,39 @@ +client->call(Client::METHOD_GET, '/presences/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'range' => '32h', + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/presences/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'range' => '24h', + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals('24h', $response['body']['range']); + $this->assertCount(3, $response['body']); + $this->assertIsNumeric($response['body']['usersOnlineTotal']); + $this->assertIsArray($response['body']['usersOnline']); + } +} From 25ae2e7314fe8694de5f159a4b1e220909e1e3a3 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 17:48:23 +0530 Subject: [PATCH 054/192] Implement triggerStats function, add GraphQL source header, and enhance presence upsert logic with source detection. Also, introduce PresenceTest for GraphQL presence upsert validation. --- app/realtime.php | 4 +- src/Appwrite/GraphQL/Resolvers.php | 1 + .../Modules/Presences/HTTP/Upsert.php | 6 ++- tests/e2e/Services/GraphQL/PresenceTest.php | 54 +++++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 tests/e2e/Services/GraphQL/PresenceTest.php diff --git a/app/realtime.php b/app/realtime.php index 83a2f7733e..5be64a131f 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -272,7 +272,9 @@ if (!function_exists('getTelemetry')) { } if (!function_exists('triggerStats')) { - function triggerStats(array $event, string $projectId): void{} + function triggerStats(array $event, string $projectId): void + { + } } if (!function_exists('triggerPresenceUsage')) { diff --git a/src/Appwrite/GraphQL/Resolvers.php b/src/Appwrite/GraphQL/Resolvers.php index cabb357607..af88b00762 100644 --- a/src/Appwrite/GraphQL/Resolvers.php +++ b/src/Appwrite/GraphQL/Resolvers.php @@ -362,6 +362,7 @@ class Resolvers $original = $utopia->getRoute(); try { $request = clone $request; + $request->addHeader('x-appwrite-source', 'graphql'); // Drop json content type so post args are used directly. if (\str_starts_with($request->getHeader('content-type'), 'application/json')) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 03ed352d66..1622319c56 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -11,6 +11,7 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; +use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\DateTime; @@ -66,6 +67,7 @@ class Upsert extends PresenceAction ->param('expiry', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Presence expiry datetime.', true) ->param('metadata', [], new JSON(), 'Presence metadata object.', true) ->inject('response') + ->inject('request') ->inject('dbForProject') ->inject('user') ->inject('authorization') @@ -82,6 +84,7 @@ class Upsert extends PresenceAction ?string $expiry, array $metadata, Response $response, + Request $request, Database $dbForProject, User $user, Authorization $authorization, @@ -111,12 +114,13 @@ class Upsert extends PresenceAction $userInternalId = $fetchedUser->getSequence(); $resolvedUserId = $fetchedUser->getId(); } + $isGraphQL = $request->getHeader('x-appwrite-source') === 'graphql'; $presenceData = [ 'userInternalId' => $userInternalId, 'userId' => $resolvedUserId, 'status' => $status, - 'source' => 'rest', + 'source' => $isGraphQL ? 'graphql' : 'rest', 'expiry' => $expiry ?? DateTime::addSeconds(new \DateTime(), 15 * 60), // TODO: finding a way to find hostname // 'hostname' => $hostname, diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php new file mode 100644 index 0000000000..43d61e212b --- /dev/null +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -0,0 +1,54 @@ +getProject()['$id']; + $apiKey = $this->getNewKey(['presence.write']); + $user = $this->getUser(true); + + $payload = [ + 'query' => <<<'GQL' + mutation upsertPresence($presenceId: String!, $userId: String!, $status: String!, $metadata: Json) { + presencesUpsert(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { + _id + userId + status + source + } + } + GQL, + 'variables' => [ + 'presenceId' => ID::unique(), + 'userId' => $user['$id'], + 'status' => 'online', + 'metadata' => [ + 'testRunId' => ID::unique(), + ], + ], + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $apiKey, + ], $payload); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertArrayNotHasKey('errors', $response['body']); + $this->assertEquals('online', $response['body']['data']['presencesUpsert']['status']); + $this->assertEquals('graphql', $response['body']['data']['presencesUpsert']['source']); + } +} From 41b2962e645a76493fad5fabf7535df9bb544a87 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 28 Apr 2026 18:03:26 +0530 Subject: [PATCH 055/192] updated usage name --- src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php | 2 +- src/Appwrite/Utopia/Response/Model/UsagePresence.php | 2 +- tests/e2e/General/UsageTest.php | 6 +++--- tests/e2e/Services/Presence/PresenceConsoleClientTest.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php index 85bf089453..d7eaf1f23f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php @@ -113,7 +113,7 @@ class Get extends Base $response->dynamic(new Document([ 'range' => $range, 'usersOnlineTotal' => $stats['total'], - 'usersOnline' => $usage, + 'presences' => $usage, ]), Response::MODEL_USAGE_PRESENCE); } } diff --git a/src/Appwrite/Utopia/Response/Model/UsagePresence.php b/src/Appwrite/Utopia/Response/Model/UsagePresence.php index 6693fd53b2..f679d4c00c 100644 --- a/src/Appwrite/Utopia/Response/Model/UsagePresence.php +++ b/src/Appwrite/Utopia/Response/Model/UsagePresence.php @@ -22,7 +22,7 @@ class UsagePresence extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('usersOnline', [ + ->addRule('presences', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of online users per period.', 'default' => [], diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index e000972a6c..2debccd631 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -319,10 +319,10 @@ class UsageTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals('90d', $response['body']['range']); - $this->assertEquals(90, count($response['body']['usersOnline'])); + $this->assertEquals(90, count($response['body']['presences'])); $this->assertEquals(2, $response['body']['usersOnlineTotal']); - $this->assertEquals(2, $response['body']['usersOnline'][array_key_last($response['body']['usersOnline'])]['value']); - $this->validateDates($response['body']['usersOnline']); + $this->assertEquals(2, $response['body']['presences'][array_key_last($response['body']['presences'])]['value']); + $this->validateDates($response['body']['presences']); }); } finally { $realtime->close(); diff --git a/tests/e2e/Services/Presence/PresenceConsoleClientTest.php b/tests/e2e/Services/Presence/PresenceConsoleClientTest.php index 67b2a967d4..fbb00d6cab 100644 --- a/tests/e2e/Services/Presence/PresenceConsoleClientTest.php +++ b/tests/e2e/Services/Presence/PresenceConsoleClientTest.php @@ -34,6 +34,6 @@ class PresenceConsoleClientTest extends Scope $this->assertEquals('24h', $response['body']['range']); $this->assertCount(3, $response['body']); $this->assertIsNumeric($response['body']['usersOnlineTotal']); - $this->assertIsArray($response['body']['usersOnline']); + $this->assertIsArray($response['body']['presences']); } } From 496b91480ba2654f1bf25b787a3c8dde32309a8a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 29 Apr 2026 11:33:48 +0530 Subject: [PATCH 056/192] updated --- .../Presence/PresenceRealtimeClientTest.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index fa22854d13..2a36a9ea6b 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -110,19 +110,6 @@ class PresenceRealtimeClientTest extends Scope } $this->fail('Timed out waiting for expected websocket frame. Last frame: ' . \json_encode($lastMessage)); - return []; - } - - private function drainSocketFor(WebSocketClient $client, int $timeoutMs = 500): void - { - $deadline = \microtime(true) + ($timeoutMs / 1000); - while (\microtime(true) < $deadline) { - try { - $client->receive(); - } catch (TimeoutException) { - return; - } - } } private function assertQuietFor(WebSocketClient $client, callable $forbidden, int $timeoutMs = 150): void From e624040e5758ebdc4dcb87e03b13e10c662df8eb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 29 Apr 2026 13:49:57 +0530 Subject: [PATCH 057/192] Refactor presence API methods for clarity and consistency. Updated method names to include 'Presence' suffix for better identification. Enhanced presence state logic to support unique index-based upserts and improved test coverage for presence functionalities, including custom permissions and expiry handling. --- src/Appwrite/Databases/PresenceState.php | 8 +- .../Modules/Presences/HTTP/Delete.php | 2 +- .../Platform/Modules/Presences/HTTP/Get.php | 2 +- .../Modules/Presences/HTTP/Update.php | 2 +- .../Modules/Presences/HTTP/Upsert.php | 2 +- .../Platform/Modules/Presences/HTTP/XList.php | 2 +- tests/e2e/Services/Presence/PresenceBase.php | 313 +++++++++++++++++- .../Services/Presence/PresenceExpiryTest.php | 11 +- .../Presence/PresenceRealtimeClientTest.php | 21 +- 9 files changed, 334 insertions(+), 29 deletions(-) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 6568a095d6..455cd27f72 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -66,6 +66,9 @@ class PresenceState try { if ($this->getSupportForUniqueIndexBasedUpsert()) { + $presenceCreated = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])])->isEmpty(); + $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + } else { $presence = $this->transactionalUpsertForUser( $dbForProject, $presenceDocument, @@ -73,9 +76,6 @@ class PresenceState $userId, $presenceCreated ); - } else { - $presenceCreated = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])])->isEmpty(); - $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); } if ($presenceCreated && $onPresenceCreated !== null) { @@ -129,7 +129,7 @@ class PresenceState private function getSupportForUniqueIndexBasedUpsert(): bool { $adapter = \strtolower(System::getEnv('_APP_DB_ADAPTER', 'mariadb')); - return \in_array($adapter, ['mongodb', 'postgres', 'postgresql'], true); + return !\in_array($adapter, ['mongodb', 'postgres', 'postgresql'], true); } private function assertPermissionsAgainstAuthorization(array $permissions, Authorization $authorization): void diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 7b9bd51205..203ec6497f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -41,7 +41,7 @@ class Delete extends Base ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'delete', + name: 'deletePresence', description: 'Delete a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 88316bd3ce..2fe6974f6f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -33,7 +33,7 @@ class Get extends Base ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'get', + name: 'getPresence', description: 'Get a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index f9151a6f7e..9675c8f6da 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -45,7 +45,7 @@ class Update extends PresenceAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'update', + name: 'updatePresence', description: 'Update a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 1622319c56..00ef174bd7 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -49,7 +49,7 @@ class Upsert extends PresenceAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'upsert', + name: 'upsertPresence', description: 'Create or update a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index e6f6711008..e4e6eaeff7 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -43,7 +43,7 @@ class XList extends Base ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'list', + name: 'listPresences', description: 'List presence logs.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index c432e534cf..0de2808333 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -4,6 +4,8 @@ namespace Tests\E2E\Services\Presence; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Database\Query; trait PresenceBase @@ -27,6 +29,19 @@ trait PresenceBase return self::$presenceApiKeyCache[$projectId]; } + /** + * Server-side helper: ensure presences requests use a presence-scoped API key. + */ + protected function getPresenceServerHeaders(): array + { + $headers = $this->getHeaders(false); + + // Override the project API key added by `SideServer` with a presence-scoped key. + $headers['x-appwrite-key'] = $this->getPresenceApiKey(); + + return $headers; + } + protected function setupPresence(array $overrides = []): array { $projectId = $this->getProject()['$id']; @@ -93,6 +108,8 @@ trait PresenceBase public function testUpsertAndGetPresence(): void { if ($this->getSide() === 'client') { + $userId = $this->getUser()['$id']; + $upsert = $this->client->call( Client::METHOD_PUT, '/presences/' . ID::unique(), @@ -106,7 +123,24 @@ trait PresenceBase ] ); - $this->assertEquals(401, $upsert['headers']['status-code']); + $this->assertEquals(200, $upsert['headers']['status-code']); + $this->assertNotEmpty($upsert['body']['$id']); + $this->assertEquals($userId, $upsert['body']['userId']); + + $get = $this->client->call( + Client::METHOD_GET, + '/presences/' . $upsert['body']['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)) + ); + + $this->assertEquals(200, $get['headers']['status-code']); + $this->assertEquals($upsert['body']['$id'], $get['body']['$id']); + $this->assertEquals($userId, $get['body']['userId']); + $this->assertArrayHasKey('expiry', $get['body']); + return; } @@ -118,7 +152,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)) + ], $this->getPresenceServerHeaders()) ); $this->assertEquals(200, $get['headers']['status-code']); @@ -130,16 +164,78 @@ trait PresenceBase public function testListPresences(): void { if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'status' => 'online', + 'metadata' => ['device' => 'web'], + ] + ); + + $this->assertEquals(200, $upsert['headers']['status-code']); + $this->assertNotEmpty($upsert['body']['$id']); + $this->assertArrayHasKey('userId', $upsert['body']); + $list = $this->client->call( Client::METHOD_GET, '/presences', \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)) + ], $this->getHeaders(false)), + [ + 'queries' => [ + Query::equal('userId', [$upsert['body']['userId']])->toString(), + ], + ] ); - $this->assertEquals(401, $list['headers']['status-code']); + $this->assertEquals(200, $list['headers']['status-code']); + $this->assertArrayHasKey('total', $list['body']); + $this->assertArrayHasKey('presences', $list['body']); + $this->assertIsArray($list['body']['presences']); + $this->assertGreaterThanOrEqual(1, $list['body']['total']); + + // Client sessions must not be able to list presences belonging to a different user. + $projectId = $this->getProject()['$id']; + $originalUser = $this->getUser(); + $otherUserId = $this->getUser(true)['$id']; + + // Important: don't let `getUser(true)` overwrite the cached user/session for the rest + // of this test run. We only need the other user's ID. + self::$user[$projectId] = $originalUser; + + // Seed another presence for the other user (setup via API key, not the client session). + $this->setupPresence([ + 'userId' => $otherUserId, + 'status' => 'online', + 'metadata' => ['device' => 'other-user'], + ]); + + $otherList = $this->client->call( + Client::METHOD_GET, + '/presences', + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'queries' => [ + Query::equal('userId', [$otherUserId])->toString(), + ], + ] + ); + + $this->assertEquals(200, $otherList['headers']['status-code']); + $this->assertArrayHasKey('total', $otherList['body']); + $this->assertArrayHasKey('presences', $otherList['body']); + $this->assertSame([], $otherList['body']['presences']); + $this->assertEquals(0, $otherList['body']['total']); return; } @@ -151,7 +247,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)), + ], $this->getPresenceServerHeaders()), [ 'queries' => [ Query::equal('userId', [$presence['userId']])->toString(), @@ -166,12 +262,179 @@ trait PresenceBase $this->assertGreaterThanOrEqual(1, $list['body']['total']); } + public function testClientPresenceCustomPermissionsForOtherUser(): void + { + if ($this->getSide() !== 'client') { + $this->expectNotToPerformAssertions(); + return; + } + + $projectId = $this->getProject()['$id']; + $user1 = $this->getUser(); + $headersUser1 = $this->getHeaders(false); + + $user2 = $this->getUser(true); + + // Avoid overwriting the cached user for the rest of the test run. + self::$user[$projectId] = $user1; + + $headersUser2 = $this->getHeaders(false); + $headersUser2['cookie'] = 'a_session_' . $projectId . '=' . $user2['session']; + + $permissionsForUser2 = [ + Permission::read(Role::user($user2['$id'])), + Permission::update(Role::user($user2['$id'])), + Permission::delete(Role::user($user2['$id'])), + Permission::write(Role::user($user2['$id'])), + ]; + + $permissionsForUser1 = [ + Permission::read(Role::user($user1['$id'])), + Permission::update(Role::user($user1['$id'])), + Permission::delete(Role::user($user1['$id'])), + Permission::write(Role::user($user1['$id'])), + ]; + + // Create a presence for user1 using a presence-scoped API key so we can set ACLs. + $presenceAllow = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getPresenceApiKey(), + ]), + [ + 'userId' => $user1['$id'], + 'status' => 'online', + 'metadata' => ['case' => 'allow'], + // Owner always retains full permissions; user2 additionally gets access. + 'permissions' => \array_merge($permissionsForUser1, $permissionsForUser2), + ] + ); + + $this->assertEquals(200, $presenceAllow['headers']['status-code']); + $presenceIdAllow = $presenceAllow['body']['$id']; + + // user2 can read + $get = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presenceIdAllow, + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2) + ); + $this->assertEquals(200, $get['headers']['status-code']); + + // user2 can update + $patch = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presenceIdAllow, + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2), + [ + 'status' => 'busy', + 'metadata' => ['case' => 'allow-update'], + ] + ); + $this->assertEquals(200, $patch['headers']['status-code']); + $this->assertEquals('busy', $patch['body']['status']); + + // user2 can delete + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presenceIdAllow, + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2) + ); + $this->assertEquals(204, $delete['headers']['status-code']); + + // Create another presence for user1 without granting any special permissions to user2. + $presenceDeny = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getPresenceApiKey(), + ]), + [ + 'userId' => $user1['$id'], + 'status' => 'online', + 'metadata' => ['case' => 'deny'], + // Only the owner has permissions; user2 should not be able to access this document. + 'permissions' => $permissionsForUser1, + ] + ); + + $this->assertEquals(200, $presenceDeny['headers']['status-code']); + $presenceIdDeny = $presenceDeny['body']['$id']; + + // user2 cannot read + $getDeny = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presenceIdDeny, + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2) + ); + // When read permission is missing, the document should be treated as not found. + $this->assertEquals(404, $getDeny['headers']['status-code']); + + // user2 cannot update + $patchDeny = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presenceIdDeny, + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2), + [ + 'status' => 'busy', + ] + ); + $this->assertEquals(404, $patchDeny['headers']['status-code']); + + // user2 cannot delete + $deleteDeny = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presenceIdDeny, + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2) + ); + $this->assertEquals(404, $deleteDeny['headers']['status-code']); + } + public function testUpdatePresenceSparseFields(): void { if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'status' => 'away', + 'metadata' => ['source' => 'setup'], + ] + ); + + $this->assertEquals(200, $upsert['headers']['status-code']); + $presenceId = $upsert['body']['$id']; + $update = $this->client->call( Client::METHOD_PATCH, - '/presences/' . ID::unique(), + '/presences/' . $presenceId, \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -182,7 +445,10 @@ trait PresenceBase ] ); - $this->assertEquals(401, $update['headers']['status-code']); + $this->assertEquals(200, $update['headers']['status-code']); + $this->assertEquals('busy', $update['body']['status']); + $this->assertEquals(['source' => 'update'], $update['body']['metadata']); + return; } @@ -206,7 +472,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)), + ], $this->getPresenceServerHeaders()), $payload ); @@ -218,16 +484,33 @@ trait PresenceBase public function testDeletePresence(): void { if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'status' => 'temp-delete', + 'metadata' => ['cleanup' => true], + ] + ); + + $this->assertEquals(200, $upsert['headers']['status-code']); + $presenceId = $upsert['body']['$id']; + $delete = $this->client->call( Client::METHOD_DELETE, - '/presences/' . ID::unique(), + '/presences/' . $presenceId, \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(false)) ); - $this->assertEquals(401, $delete['headers']['status-code']); + $this->assertEquals(204, $delete['headers']['status-code']); + return; } @@ -242,7 +525,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)) + ], $this->getPresenceServerHeaders()) ); $this->assertEquals(204, $delete['headers']['status-code']); @@ -263,7 +546,7 @@ trait PresenceBase ] ); - $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals(404, $response['headers']['status-code']); return; } @@ -281,7 +564,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)), + ], $this->getPresenceServerHeaders()), $payload ); @@ -324,7 +607,7 @@ trait PresenceBase \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders(false)), + ], $this->getPresenceServerHeaders()), [ 'status' => 'online', ] @@ -345,7 +628,7 @@ trait PresenceBase $headers = \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - ], $this->getHeaders(false)); + ], $this->getPresenceServerHeaders()); $firstUpsert = $this->client->call( Client::METHOD_PUT, diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php index 3d86045a41..8ef9b0a803 100644 --- a/tests/e2e/Services/Presence/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -7,6 +7,7 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Utopia\Console; +use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; class PresenceExpiryTest extends Scope @@ -25,8 +26,8 @@ class PresenceExpiryTest extends Scope } self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ - 'users.read', - 'users.write', + 'presence.read', + 'presence.write', ]); return self::$presenceApiKeyCache[$projectId]; @@ -36,7 +37,8 @@ class PresenceExpiryTest extends Scope { $projectId = $this->getProject()['$id']; $userId = $this->getUser()['$id']; - $expiredAt = \gmdate('Y-m-d\TH:i:s.v\Z', \time() - 120); + // Must match the format used by the maintenance worker query. + $expiredAt = DateTime::format((new \DateTime())->modify('-120 seconds')); $createServer = $this->client->call( Client::METHOD_PUT, @@ -81,6 +83,7 @@ class PresenceExpiryTest extends Scope $code = Console::execute('docker exec appwrite maintenance --type=trigger', '', $stdout, $stderr); $this->assertSame(0, $code, "Maintenance command failed with code $code: $stderr ($stdout)"); + // Maintenance + delete workers are asynchronous; give extra time to observe cleanup. $this->assertEventually(function () use ($presenceIdServer, $projectId) { $getServer = $this->client->call( Client::METHOD_GET, @@ -93,6 +96,6 @@ class PresenceExpiryTest extends Scope ); $this->assertEquals(404, $getServer['headers']['status-code']); - }); + }, 30000, 1000); } } diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index 2a36a9ea6b..b2f4c08f24 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -18,6 +18,8 @@ class PresenceRealtimeClientTest extends Scope use ProjectCustom; use SideClient; + private static array $presenceApiKeyCache = []; + private function bootstrapIsolatedProject(): array { $project = $this->getProject(true); @@ -37,10 +39,27 @@ class PresenceRealtimeClientTest extends Scope return [ 'content-type' => 'application/json', 'x-appwrite-project' => $project['$id'], - 'x-appwrite-key' => $project['apiKey'], + 'x-appwrite-key' => $this->getPresenceApiKey($project), ]; } + private function getPresenceApiKey(array $project): string + { + $projectId = $project['$id']; + + if (!empty(self::$presenceApiKeyCache[$projectId])) { + return self::$presenceApiKeyCache[$projectId]; + } + + // Realtime tests validate HTTP reads of presences; those endpoints require `presence.read`. + self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ + 'presence.read', + 'presence.write', + ]); + + return self::$presenceApiKeyCache[$projectId]; + } + private function connectRealtimeAndSubscribe( array $project, array $headers, From 59ee0901c94980ab2b0dc3dd4d496b2f4ed04b50 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 29 Apr 2026 14:20:38 +0530 Subject: [PATCH 058/192] Enhance presence API methods by adding detailed parameter specifications for update and upsert actions. Separate client-side and server-side SDK method definitions to clarify authentication requirements and improve usability. This update includes new parameters for presence management, ensuring better handling of user presence logs. --- .../Modules/Presences/HTTP/Update.php | 59 +++++++++++--- .../Modules/Presences/HTTP/Upsert.php | 81 ++++++++++++++++--- 2 files changed, 114 insertions(+), 26 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 9675c8f6da..55970bcd8a 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -7,6 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; +use Appwrite\SDK\Parameter; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Response; @@ -42,19 +43,51 @@ class Update extends PresenceAction ->label('event', 'presences.[presenceId].update') ->label('audits.event', 'presence.update') ->label('audits.resource', 'presence/{response.$id}') - ->label('sdk', new Method( - namespace: 'presences', - group: 'presences', - name: 'updatePresence', - description: 'Update a presence log by its unique ID.', - auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PRESENCE, - ), - ], - )) + ->label('sdk', [ + // Client-side SDK: `userId` is not accepted (session callers can only update their own presence). + new Method( + namespace: 'presences', + group: 'presences', + name: 'updatePresence', + description: 'Update a presence log by its unique ID.', + auth: [AuthType::SESSION], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + parameters: [ + new Parameter('presenceId', optional: false), + new Parameter('status', optional: true), + new Parameter('expiry', optional: true), + new Parameter('metadata', optional: true), + new Parameter('permissions', optional: true), + ], + ), + // Server-side SDK: `userId` is required when authenticating with API keys/JWT. + new Method( + namespace: 'presences', + group: 'presences', + name: 'updatePresence', + description: 'Update a presence log by its unique ID.', + auth: [AuthType::KEY, AuthType::JWT, AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + parameters: [ + new Parameter('presenceId', optional: false), + new Parameter('userId', optional: false), + new Parameter('status', optional: true), + new Parameter('expiry', optional: true), + new Parameter('metadata', optional: true), + new Parameter('permissions', optional: true), + ], + ), + ]) ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) ->param('userId', null, new Nullable(new UID()), 'User ID.', true) ->param('status', null, new Nullable(new Text(Database::LENGTH_KEY)), 'Presence status.', true) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 00ef174bd7..0fb31f83cb 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -8,6 +8,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; +use Appwrite\SDK\Parameter; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; @@ -46,19 +47,73 @@ class Upsert extends PresenceAction ->label('event', 'presences.[presenceId].upsert') ->label('audits.event', 'presence.upsert') ->label('audits.resource', 'presence/{response.$id}') - ->label('sdk', new Method( - namespace: 'presences', - group: 'presences', - name: 'upsertPresence', - description: 'Create or update a presence log by its unique ID.', - auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PRESENCE, - ), - ], - )) + ->label('sdk', [ + // Client-side SDK: `userId` is not accepted (session callers should just upsert their own presence). + new Method( + namespace: 'presences', + group: 'presences', + name: 'upsertPresence', + description: 'Create or update a presence log by its unique ID.', + auth: [AuthType::SESSION], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + parameters: [ + new Parameter('presenceId', optional: false), + new Parameter('status', optional: false), + new Parameter('permissions', optional: true), + new Parameter('expiry', optional: true), + new Parameter('metadata', optional: true), + ], + ), + // Server-side SDK: `userId` is required when authenticating with API keys/JWT. + new Method( + namespace: 'presences', + group: 'presences', + name: 'upsertPresence', + description: 'Create or update a presence log by its unique ID.', + auth: [AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + parameters: [ + new Parameter('presenceId', optional: false), + new Parameter('userId', optional: false), + new Parameter('status', optional: false), + new Parameter('permissions', optional: true), + new Parameter('expiry', optional: true), + new Parameter('metadata', optional: true), + ], + ), + // Console SDK (admin): still operates with `userId`. + new Method( + namespace: 'presences', + group: 'presences', + name: 'upsertPresence', + description: 'Create or update a presence log by its unique ID.', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PRESENCE, + ), + ], + parameters: [ + new Parameter('presenceId', optional: false), + new Parameter('userId', optional: false), + new Parameter('status', optional: false), + new Parameter('permissions', optional: true), + new Parameter('expiry', optional: true), + new Parameter('metadata', optional: true), + ], + ), + ]) ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) ->param('userId', null, new Nullable(new UID()), 'User ID.', true) ->param('status', '', new Text(Database::LENGTH_KEY), 'Presence status.', false) From 58c248f4f22fbe607db48c614043480189c9700a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 29 Apr 2026 14:32:57 +0530 Subject: [PATCH 059/192] Add migration for version 25 to ensure presenceLogs collection exists; update migration mapping for version 1.9.3. Remove redundant error assertion in PresenceTest. --- src/Appwrite/Migration/Migration.php | 1 + src/Appwrite/Migration/Version/V25.php | 34 +++++++++++++++++++++ tests/e2e/Services/GraphQL/PresenceTest.php | 1 - 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/Appwrite/Migration/Version/V25.php diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index ef0dd9f8b5..5660f73187 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -95,6 +95,7 @@ abstract class Migration '1.9.0' => 'V24', '1.9.1' => 'V24', '1.9.2' => 'V24', + '1.9.3' => 'V25', ]; /** diff --git a/src/Appwrite/Migration/Version/V25.php b/src/Appwrite/Migration/Version/V25.php new file mode 100644 index 0000000000..4270d0cc90 --- /dev/null +++ b/src/Appwrite/Migration/Version/V25.php @@ -0,0 +1,34 @@ +project->getSequence() === 'console') { + return; + } + + $collectionId = 'presenceLogs'; + + try { + Console::info("Ensuring collection \"{$collectionId}\" exists for project \"{$this->project->getId()}\"."); + $this->dbForProject->purgeCachedCollection($collectionId); + $this->dbForProject->purgeCachedDocument(Database::METADATA, $collectionId); + + $this->createCollection($collectionId); + } catch (Throwable $th) { + Console::warning("Failed to create collection \"{$collectionId}\": {$th->getMessage()}"); + + // Re-throw so the migration fails fast and doesn't leave the system in a partially migrated state. + throw $th; + } + } +} diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index 43d61e212b..fd76378b8a 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -47,7 +47,6 @@ class PresenceTest extends Scope ], $payload); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertArrayNotHasKey('errors', $response['body']); $this->assertEquals('online', $response['body']['data']['presencesUpsert']['status']); $this->assertEquals('graphql', $response['body']['data']['presencesUpsert']['source']); } From 9d6be1eef4d1cc5f548e35b5f658c55761e9ad24 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 29 Apr 2026 15:04:28 +0530 Subject: [PATCH 060/192] updated --- src/Appwrite/Migration/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 7bd766d3e0..004e09cd23 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -96,7 +96,7 @@ abstract class Migration '1.9.1' => 'V24', '1.9.2' => 'V24', '1.9.3' => 'V24', - '1.9.3' => 'V25', + '1.9.4' => 'V25', ]; /** From e6c3acb21cd26a9d659401ee690981e59c15a4ce Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 13:04:28 +0530 Subject: [PATCH 061/192] Refactor presence API by removing the Action class and updating related classes to extend PlatformAction. This change enhances consistency across the API methods and improves code maintainability. --- .../Modules/Presences/HTTP/Action.php | 65 ------------------- .../Modules/Presences/HTTP/Delete.php | 7 +- .../Platform/Modules/Presences/HTTP/Get.php | 4 +- .../Modules/Presences/HTTP/Update.php | 8 ++- .../Modules/Presences/HTTP/Upsert.php | 4 +- .../Modules/Presences/HTTP/Usage/Get.php | 4 +- .../Platform/Modules/Presences/HTTP/XList.php | 4 +- 7 files changed, 15 insertions(+), 81 deletions(-) delete mode 100644 src/Appwrite/Platform/Modules/Presences/HTTP/Action.php diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php deleted file mode 100644 index 45bfa1a35c..0000000000 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Action.php +++ /dev/null @@ -1,65 +0,0 @@ -isApp($authorization->getRoles()); - $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); - - $allowedPermissions = [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - Database::PERMISSION_WRITE, - ]; - - $permissions = Permission::aggregate($permissions, $allowedPermissions); - - // Add permissions for current the user if none were provided. - if (\is_null($permissions)) { - $permissions = []; - if (!empty($user->getId()) && !$isPrivilegedUser) { - foreach ($allowedPermissions as $permission) { - $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); - } - } - } - - // Users can only manage their own roles, API keys and Admin users can manage any - if (!$isAPIKey && !$isPrivilegedUser) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!$authorization->hasRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $authorization->getRoles()) . ')'); - } - } - } - } - - sort($permissions, SORT_STRING); - $document->setAttribute('$permissions', $permissions); - - return $document; - } -} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 203ec6497f..3d63301821 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; +use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -16,12 +16,9 @@ use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; -class Delete extends Base +class Delete extends PlatformAction { - use HTTP; - public static function getName() { return 'deletePresence'; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 2fe6974f6f..f97eea04f3 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; +use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -13,7 +13,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Get extends Base +class Get extends PlatformAction { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 55970bcd8a..c824649e5c 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -2,9 +2,10 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Databases\PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; +use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Parameter; @@ -25,7 +26,7 @@ use Utopia\Validator\JSON; use Utopia\Validator\Nullable; use Utopia\Validator\Text; -class Update extends PresenceAction +class Update extends PlatformAction { public static function getName() { @@ -115,6 +116,7 @@ class Update extends PresenceAction Authorization $authorization, Event $queueForEvents ): void { + $presenceState = new PresenceState(); $isAPIKey = $user->isApp($authorization->getRoles()); $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); @@ -154,7 +156,7 @@ class Update extends PresenceAction $updates = new Document($updateData); if ($permissions !== null) { - $this->setPermission($updates, $permissions, $user, $authorization); + $presenceState->setPermissions($updates, $permissions, $user, $authorization); } if (empty($updateData) && $permissions === null) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 0fb31f83cb..07a7db665c 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -5,7 +5,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; use Appwrite\Databases\PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Presences\HTTP\Action as PresenceAction; +use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Parameter; @@ -27,7 +27,7 @@ use Utopia\Validator\JSON; use Utopia\Validator\Nullable; use Utopia\Validator\Text; -class Upsert extends PresenceAction +class Upsert extends PlatformAction { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php index d7eaf1f23f..4fac73c6a4 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP\Usage; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; +use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -16,7 +16,7 @@ use Utopia\Database\Validator\Authorization; use Utopia\Platform\Action; use Utopia\Validator\WhiteList; -class Get extends Base +class Get extends PlatformAction { public static function getName() { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index e4e6eaeff7..886c9f010e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; +use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -21,7 +21,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Boolean; -class XList extends Base +class XList extends PlatformAction { use HTTP; From 869c35416d38b054c8af89dcf1d31d15c9f2f39f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 13:30:15 +0530 Subject: [PATCH 062/192] Refactor presence API to standardize scope and attribute names. Updated 'presence' to 'presences' across roles, scopes, and HTTP methods for consistency. Renamed 'expiry' to 'expiresAt' in various locations to improve clarity and maintainability. --- app/config/collections/projects.php | 27 ++++++++++---- app/config/roles.php | 8 ++--- app/config/scopes/project.php | 4 +-- app/init/constants.php | 2 +- src/Appwrite/Databases/PresenceState.php | 1 + .../Modules/Presences/HTTP/Delete.php | 2 +- .../Platform/Modules/Presences/HTTP/Get.php | 2 +- .../Modules/Presences/HTTP/Update.php | 14 ++++---- .../Modules/Presences/HTTP/Upsert.php | 36 ++++--------------- .../Modules/Presences/HTTP/Usage/Get.php | 2 +- .../Platform/Modules/Presences/HTTP/XList.php | 4 +-- src/Appwrite/Platform/Workers/Deletes.php | 4 +-- .../Utopia/Response/Model/Presence.php | 2 +- tests/e2e/General/UsageTest.php | 4 +-- tests/e2e/Services/GraphQL/PresenceTest.php | 2 +- tests/e2e/Services/Presence/PresenceBase.php | 8 ++--- .../Services/Presence/PresenceExpiryTest.php | 8 ++--- .../Presence/PresenceRealtimeClientTest.php | 6 ++-- 18 files changed, 65 insertions(+), 71 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 7841b08f6a..4450d9c473 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2756,7 +2756,6 @@ return [ ], // Naming it presenceLogs as later it might be only be used as a presence events table only and not for the actual presence - // TODO: check between var_string and var_id => userInternalId, userId(they can be null as well in case of guest login) 'presenceLogs' => [ '$collection' => ID::custom(Database::METADATA), '$id' => ID::custom('presenceLogs'), @@ -2785,7 +2784,7 @@ return [ 'filters' => [], ], [ - '$id' => ID::custom('expiry'), + '$id' => ID::custom('expiresAt'), 'type' => Database::VAR_DATETIME, 'format' => '', 'size' => 0, @@ -2839,9 +2838,18 @@ return [ 'array' => false, 'filters' => ['json'], ], + [ + '$id' => ID::custom('perms_md5'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 32, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], ], - // TODO: shall we create the perms_md5 now only for the upsertion based on perms_md5 or later via patch script? - // permissions must be sorted before md5 conversion to have deterministic hashes 'indexes' => [ [ '$id' => ID::custom('_unique_userId'), @@ -2858,9 +2866,9 @@ return [ 'orders' => [Database::ORDER_ASC] ], [ - '$id' => ID::custom('_key_expiry'), + '$id' => ID::custom('_key_expiresAt'), 'type' => Database::INDEX_KEY, - 'attributes' => ['expiry'], + 'attributes' => ['expiresAt'], 'lengths' => [], 'orders' => [Database::ORDER_ASC] ], @@ -2884,6 +2892,13 @@ return [ 'attributes' => ['source', 'status'], 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC] + ], + [ + '$id' => ID::custom('_key_perms_md5'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['perms_md5'], + 'lengths' => [32], + 'orders' => [Database::ORDER_ASC] ] ] ] diff --git a/app/config/roles.php b/app/config/roles.php index cc545b75d9..8ad06abcbf 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -12,8 +12,8 @@ $member = [ 'account', 'teams.read', 'teams.write', - 'presence.read', - 'presence.write', + 'presences.read', + 'presences.read', 'documents.read', 'documents.write', 'rows.read', @@ -49,8 +49,8 @@ $admins = [ 'buckets.write', 'users.read', 'users.write', - 'presence.read', - 'presence.write', + 'presences.read', + 'presences.read', 'databases.read', 'databases.write', 'collections.read', diff --git a/app/config/scopes/project.php b/app/config/scopes/project.php index 2a085d8050..82c71a7f59 100644 --- a/app/config/scopes/project.php +++ b/app/config/scopes/project.php @@ -10,10 +10,10 @@ return [ // List of publicly visible scopes 'users.write' => [ 'description' => 'Access to create, update, and delete your project\'s users', ], - 'presence.read' => [ + 'presences.read' => [ 'description' => 'Access to read your project\'s presences', ], - 'presence.write' => [ + 'presences.read' => [ 'description' => 'Access to create, update, and delete your project\'s presences', ], 'teams.read' => [ diff --git a/app/init/constants.php b/app/init/constants.php index 6db53b4276..ea645f45e2 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -411,7 +411,7 @@ const METRIC_REALTIME_INBOUND = 'realtime.inbound'; const METRIC_REALTIME_OUTBOUND = 'realtime.outbound'; // Presence API metrics -const METRIC_PRESENCE_UPSERTED = 'presence.upserted'; +const METRIC_PRESENCE_UPSERTED = 'presences.upserted'; const METRIC_PRESENCE_DELETED = 'presence.deleted'; // Resource types diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 455cd27f72..6625e709fb 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -47,6 +47,7 @@ class PresenceState sort($permissions, SORT_STRING); $document->setAttribute('$permissions', $permissions); + $document->setAttribute('perms_md5', \md5(\json_encode($permissions))); return $document; } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 3d63301821..fc34718075 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -31,7 +31,7 @@ class Delete extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Delete presence') ->groups(['api', 'presences']) - ->label('scope', 'presence.write') + ->label('scope', 'presences.read') ->label('event', 'presences.[presenceId].delete') ->label('audits.event', 'presence.delete') ->label('audits.resource', 'presence/{request.presenceId}') diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index f97eea04f3..2cc9c981d8 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -29,7 +29,7 @@ class Get extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Get presence') ->groups(['api', 'presences']) - ->label('scope', 'presence.read') + ->label('scope', 'presences.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index c824649e5c..8e4025e9f2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -40,7 +40,7 @@ class Update extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Update presence') ->groups(['api', 'presences']) - ->label('scope', 'presence.write') + ->label('scope', 'presences.read') ->label('event', 'presences.[presenceId].update') ->label('audits.event', 'presence.update') ->label('audits.resource', 'presence/{response.$id}') @@ -61,7 +61,7 @@ class Update extends PlatformAction parameters: [ new Parameter('presenceId', optional: false), new Parameter('status', optional: true), - new Parameter('expiry', optional: true), + new Parameter('expiresAt', optional: true), new Parameter('metadata', optional: true), new Parameter('permissions', optional: true), ], @@ -83,7 +83,7 @@ class Update extends PlatformAction new Parameter('presenceId', optional: false), new Parameter('userId', optional: false), new Parameter('status', optional: true), - new Parameter('expiry', optional: true), + new Parameter('expiresAt', optional: true), new Parameter('metadata', optional: true), new Parameter('permissions', optional: true), ], @@ -92,7 +92,7 @@ class Update extends PlatformAction ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) ->param('userId', null, new Nullable(new UID()), 'User ID.', true) ->param('status', null, new Nullable(new Text(Database::LENGTH_KEY)), 'Presence status.', true) - ->param('expiry', null, new Nullable(new DatetimeValidator()), 'Presence expiry datetime.', true) + ->param('expiresAt', null, new Nullable(new DatetimeValidator()), 'Presence expiry datetime.', true) ->param('metadata', null, new Nullable(new JSON()), 'Presence metadata object.', true) ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('response') @@ -107,7 +107,7 @@ class Update extends PlatformAction string $presenceId, ?string $userId, ?string $status, - ?string $expiry, + ?string $expiresAt, ?array $metadata, ?array $permissions, Response $response, @@ -145,8 +145,8 @@ class Update extends PlatformAction $updateData['status'] = $status; } - if ($expiry !== null) { - $updateData['expiry'] = $expiry; + if ($expiresAt !== null) { + $updateData['expiresAt'] = $expiresAt; } if ($metadata !== null) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 07a7db665c..5908e52111 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -43,7 +43,7 @@ class Upsert extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Upsert presence') ->groups(['api', 'presences']) - ->label('scope', 'presence.write') + ->label('scope', 'presences.read') ->label('event', 'presences.[presenceId].upsert') ->label('audits.event', 'presence.upsert') ->label('audits.resource', 'presence/{response.$id}') @@ -65,7 +65,7 @@ class Upsert extends PlatformAction new Parameter('presenceId', optional: false), new Parameter('status', optional: false), new Parameter('permissions', optional: true), - new Parameter('expiry', optional: true), + new Parameter('expiresAt', optional: true), new Parameter('metadata', optional: true), ], ), @@ -75,7 +75,7 @@ class Upsert extends PlatformAction group: 'presences', name: 'upsertPresence', description: 'Create or update a presence log by its unique ID.', - auth: [AuthType::KEY, AuthType::JWT], + auth: [AuthType::KEY, AuthType::JWT, AuthType::ADMIN], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -87,29 +87,7 @@ class Upsert extends PlatformAction new Parameter('userId', optional: false), new Parameter('status', optional: false), new Parameter('permissions', optional: true), - new Parameter('expiry', optional: true), - new Parameter('metadata', optional: true), - ], - ), - // Console SDK (admin): still operates with `userId`. - new Method( - namespace: 'presences', - group: 'presences', - name: 'upsertPresence', - description: 'Create or update a presence log by its unique ID.', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PRESENCE, - ), - ], - parameters: [ - new Parameter('presenceId', optional: false), - new Parameter('userId', optional: false), - new Parameter('status', optional: false), - new Parameter('permissions', optional: true), - new Parameter('expiry', optional: true), + new Parameter('expiresAt', optional: true), new Parameter('metadata', optional: true), ], ), @@ -119,7 +97,7 @@ class Upsert extends PlatformAction ->param('status', '', new Text(Database::LENGTH_KEY), 'Presence status.', false) ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) // TODO: what shall be the min and max date here - ->param('expiry', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Presence expiry datetime.', true) + ->param('expiresAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Presence expiry datetime.', true) ->param('metadata', [], new JSON(), 'Presence metadata object.', true) ->inject('response') ->inject('request') @@ -136,7 +114,7 @@ class Upsert extends PlatformAction ?string $userId, ?string $status, ?array $permissions, - ?string $expiry, + ?string $expiresAt, array $metadata, Response $response, Request $request, @@ -176,7 +154,7 @@ class Upsert extends PlatformAction 'userId' => $resolvedUserId, 'status' => $status, 'source' => $isGraphQL ? 'graphql' : 'rest', - 'expiry' => $expiry ?? DateTime::addSeconds(new \DateTime(), 15 * 60), + 'expiresAt' => $expiresAt ?? DateTime::addSeconds(new \DateTime(), 15 * 60), // TODO: finding a way to find hostname // 'hostname' => $hostname, 'metadata' => $metadata, diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php index 4fac73c6a4..6023a071e4 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php @@ -30,7 +30,7 @@ class Get extends PlatformAction ->setHttpPath('/v1/presences/usage') ->desc('Get presence usage') ->groups(['api', 'presences', 'usage']) - ->label('scope', 'presence.read') + ->label('scope', 'presences.read') ->label('sdk', new Method( namespace: 'presences', group: null, diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 886c9f010e..265682e0a7 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -32,14 +32,14 @@ class XList extends PlatformAction public function __construct() { - $allowedAttributes = ['userInternalId', 'userId', 'expiry', 'status', 'source']; + $allowedAttributes = ['userInternalId', 'userId', 'expiresAt', 'status', 'source']; $this ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/presences') ->desc('List presences') ->groups(['api', 'presences']) - ->label('scope', 'presence.read') + ->label('scope', 'presences.read') ->label('sdk', new Method( namespace: 'presences', group: 'presences', diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 6c2d06199f..6d037d0f39 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -1641,8 +1641,8 @@ class Deletes extends Action $dbForProject = $getProjectDB($project); $dbForProject->deleteDocuments('presenceLogs', [ - Query::isNotNull('expiry'), - Query::lessThan('expiry', DateTime::format(new \DateTime())), + Query::isNotNull('expiresAt'), + Query::lessThan('expiresAt', DateTime::format(new \DateTime())), ], onError: function (Throwable $th) { // Swallow errors to avoid breaking the cleanup process }); diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php index d23328bebb..4140cdb9d9 100644 --- a/src/Appwrite/Utopia/Response/Model/Presence.php +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -77,7 +77,7 @@ class Presence extends Any 'default' => '', 'example' => 'HTTP', ]) - ->addRule('expiry', [ + ->addRule('expiresAt', [ 'type' => self::TYPE_DATETIME, 'description' => 'Presence expiry date in ISO 8601 format.', 'required' => false, diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 2debccd631..11fb4f79f3 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -231,8 +231,8 @@ class UsageTest extends Scope public function testPreparePresenceStats(array $data): array { $presenceKey = $this->getNewKey([ - 'presence.read', - 'presence.write', + 'presences.read', + 'presences.read', ]); $projectId = $this->getProject()['$id']; diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index fd76378b8a..077c0aa902 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -16,7 +16,7 @@ class PresenceTest extends Scope public function testUpsertPresenceSourceIsGraphql(): void { $projectId = $this->getProject()['$id']; - $apiKey = $this->getNewKey(['presence.write']); + $apiKey = $this->getNewKey(['presences.read']); $user = $this->getUser(true); $payload = [ diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index 0de2808333..c5f2f5409a 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -22,8 +22,8 @@ trait PresenceBase } self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ - 'presence.read', - 'presence.write', + 'presences.read', + 'presences.read', ]); return self::$presenceApiKeyCache[$projectId]; @@ -139,7 +139,7 @@ trait PresenceBase $this->assertEquals(200, $get['headers']['status-code']); $this->assertEquals($upsert['body']['$id'], $get['body']['$id']); $this->assertEquals($userId, $get['body']['userId']); - $this->assertArrayHasKey('expiry', $get['body']); + $this->assertArrayHasKey('expiresAt', $get['body']); return; } @@ -158,7 +158,7 @@ trait PresenceBase $this->assertEquals(200, $get['headers']['status-code']); $this->assertEquals($presence['$id'], $get['body']['$id']); $this->assertEquals($presence['userId'], $get['body']['userId']); - $this->assertArrayHasKey('expiry', $get['body']); + $this->assertArrayHasKey('expiresAt', $get['body']); } public function testListPresences(): void diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php index 8ef9b0a803..e16b9826e1 100644 --- a/tests/e2e/Services/Presence/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -26,8 +26,8 @@ class PresenceExpiryTest extends Scope } self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ - 'presence.read', - 'presence.write', + 'presences.read', + 'presences.read', ]); return self::$presenceApiKeyCache[$projectId]; @@ -68,14 +68,14 @@ class PresenceExpiryTest extends Scope ], [ 'userId' => $userId, - 'expiry' => $expiredAt, + 'expiresAt' => $expiredAt, ] ); $this->assertEquals(200, $expireServer['headers']['status-code']); $this->assertEquals( (new \DateTime($expiredAt))->getTimestamp(), - (new \DateTime($expireServer['body']['expiry']))->getTimestamp() + (new \DateTime($expireServer['body']['expiresAt']))->getTimestamp() ); $stdout = ''; diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index b2f4c08f24..e03dba110d 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -51,10 +51,10 @@ class PresenceRealtimeClientTest extends Scope return self::$presenceApiKeyCache[$projectId]; } - // Realtime tests validate HTTP reads of presences; those endpoints require `presence.read`. + // Realtime tests validate HTTP reads of presences; those endpoints require `presences.read`. self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ - 'presence.read', - 'presence.write', + 'presences.read', + 'presences.read', ]); return self::$presenceApiKeyCache[$projectId]; From 2c06e4185f97cff54c38adff3cfcb66eab817675 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 13:30:25 +0530 Subject: [PATCH 063/192] Update presence expiry datetime validation to enforce a 30-day maximum limit. This change standardizes the 'expiresAt' parameter across the Update and Upsert actions, ensuring consistent handling of presence expiry across the API. --- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 6 +++++- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 8e4025e9f2..cb20fb601d 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -92,7 +92,11 @@ class Update extends PlatformAction ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) ->param('userId', null, new Nullable(new UID()), 'User ID.', true) ->param('status', null, new Nullable(new Text(Database::LENGTH_KEY)), 'Presence status.', true) - ->param('expiresAt', null, new Nullable(new DatetimeValidator()), 'Presence expiry datetime.', true) + ->param('expiresAt', null, new Nullable(new DatetimeValidator( + new \DateTime(), + (new \DateTime())->modify('+30 days'), + requireDateInFuture: true + )), 'Presence expiry datetime.', true) ->param('metadata', null, new Nullable(new JSON()), 'Presence metadata object.', true) ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 5908e52111..8297639045 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -96,8 +96,11 @@ class Upsert extends PlatformAction ->param('userId', null, new Nullable(new UID()), 'User ID.', true) ->param('status', '', new Text(Database::LENGTH_KEY), 'Presence status.', false) ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) - // TODO: what shall be the min and max date here - ->param('expiresAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Presence expiry datetime.', true) + ->param('expiresAt', null, new Nullable(new DatetimeValidator( + new \DateTime(), + (new \DateTime())->modify('+30 days'), + requireDateInFuture: true + )), 'Presence expiry datetime.', true) ->param('metadata', [], new JSON(), 'Presence metadata object.', true) ->inject('response') ->inject('request') From 32dc870eafbed2a3c2f5341cf4c02a17cfe35852 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 15:56:31 +0530 Subject: [PATCH 064/192] Refactor presence API functions and update expiry test to improve clarity and maintainability. Renamed 'triggerPresenceEvent' to 'getQueueForEventsForProject' and adjusted expiry handling in tests for better validation. --- app/realtime.php | 12 ++++++++++-- composer.lock | 12 ++++++------ src/Appwrite/Databases/PresenceState.php | 9 +-------- tests/e2e/Services/Presence/PresenceExpiryTest.php | 10 ++++++---- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 47c07dfd24..664ed738d8 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -313,7 +313,7 @@ if (!function_exists('triggerPresenceUsage')) { } } -if (!function_exists('triggerPresenceEvent')) { +if (!function_exists('getQueueForEventsForProject')) { function getQueueForEventsForProject(Document $project, User $user): QueueEvent { global $register; @@ -330,7 +330,9 @@ if (!function_exists('triggerPresenceEvent')) { return $queueForEvents; } +} +if (!function_exists('triggerPresenceEvent')) { function triggerPresenceEvent( Server $server, Realtime $realtime, @@ -344,13 +346,16 @@ if (!function_exists('triggerPresenceEvent')) { } try { + global $container; $queueForEvents = getQueueForEventsForProject($project, $user); $queueForEvents ->setEvent($eventName) ->setParam('presenceId', $presence->getId()) ->setPayload($presence->getArrayCopy()); - (new QueueRealtime()) + /** @var QueueRealtime $queueForRealtime */ + $queueForRealtime = $container->get('queueForRealtime'); + $queueForRealtime ->setProject($project) ->setUser($user) ->from($queueForEvents) @@ -399,6 +404,9 @@ global $container; $container->set('pools', function ($register) { return $register->get('pools'); }, ['register']); +$container->set('queueForRealtime', function () { + return new QueueRealtime(); +}, []); $realtime = getRealtime(); $presenceState = new PresenceState(); diff --git a/composer.lock b/composer.lock index 2cf57b95a3..5f85164618 100644 --- a/composer.lock +++ b/composer.lock @@ -3850,16 +3850,16 @@ }, { "name": "utopia-php/database", - "version": "5.3.22", + "version": "5.4.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "d765945da6b3141852014b2f96ecf1fe7e3d6ba7" + "reference": "a1bb3e2a4fba13032ea625b21a21039c43cffeda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/d765945da6b3141852014b2f96ecf1fe7e3d6ba7", - "reference": "d765945da6b3141852014b2f96ecf1fe7e3d6ba7", + "url": "https://api.github.com/repos/utopia-php/database/zipball/a1bb3e2a4fba13032ea625b21a21039c43cffeda", + "reference": "a1bb3e2a4fba13032ea625b21a21039c43cffeda", "shasum": "" }, "require": { @@ -3903,9 +3903,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/5.3.22" + "source": "https://github.com/utopia-php/database/tree/5.4.2" }, - "time": "2026-04-20T07:12:46+00:00" + "time": "2026-04-30T09:59:57+00:00" }, { "name": "utopia-php/detector", diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 6625e709fb..dad34b2e12 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -14,7 +14,6 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; -use Utopia\System\System; class PresenceState { @@ -66,7 +65,7 @@ class PresenceState $presenceCreated = false; try { - if ($this->getSupportForUniqueIndexBasedUpsert()) { + if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { $presenceCreated = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])])->isEmpty(); $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); } else { @@ -127,12 +126,6 @@ class PresenceState }); } - private function getSupportForUniqueIndexBasedUpsert(): bool - { - $adapter = \strtolower(System::getEnv('_APP_DB_ADAPTER', 'mariadb')); - return !\in_array($adapter, ['mongodb', 'postgres', 'postgresql'], true); - } - private function assertPermissionsAgainstAuthorization(array $permissions, Authorization $authorization): void { foreach (Database::PERMISSIONS as $type) { diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php index e16b9826e1..ecbd51e147 100644 --- a/tests/e2e/Services/Presence/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -37,8 +37,8 @@ class PresenceExpiryTest extends Scope { $projectId = $this->getProject()['$id']; $userId = $this->getUser()['$id']; - // Must match the format used by the maintenance worker query. - $expiredAt = DateTime::format((new \DateTime())->modify('-120 seconds')); + // Set a near-future expiry to satisfy validation, then wait until it is in the past. + $expiresAt = DateTime::format((new \DateTime())->modify('+2 seconds')); $createServer = $this->client->call( Client::METHOD_PUT, @@ -68,16 +68,18 @@ class PresenceExpiryTest extends Scope ], [ 'userId' => $userId, - 'expiresAt' => $expiredAt, + 'expiresAt' => $expiresAt, ] ); $this->assertEquals(200, $expireServer['headers']['status-code']); $this->assertEquals( - (new \DateTime($expiredAt))->getTimestamp(), + (new \DateTime($expiresAt))->getTimestamp(), (new \DateTime($expireServer['body']['expiresAt']))->getTimestamp() ); + \sleep(3); + $stdout = ''; $stderr = ''; $code = Console::execute('docker exec appwrite maintenance --type=trigger', '', $stdout, $stderr); From d802c57cb9e745330e800fd35c594c5112f5e131 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 16:22:28 +0530 Subject: [PATCH 065/192] Refactor presence management by introducing a new 'presenceLogs' collection and updating related API methods. Added error handling for presence not found scenarios and standardized parameter names across the Update and XList actions. Removed obsolete migration version 25 and adjusted migration mapping for version 1.9.4. --- app/config/errors.php | 7 ++++ src/Appwrite/Extend/Exception.php | 3 ++ src/Appwrite/Migration/Migration.php | 2 +- src/Appwrite/Migration/Version/V24.php | 27 +++++++++++++++ src/Appwrite/Migration/Version/V25.php | 34 ------------------- .../Modules/Presences/HTTP/Delete.php | 2 +- .../Platform/Modules/Presences/HTTP/Get.php | 2 +- .../Modules/Presences/HTTP/Update.php | 2 +- .../Platform/Modules/Presences/HTTP/XList.php | 6 ++-- .../Database/Validator/Queries/Presences.php | 23 +++++++++++++ 10 files changed, 66 insertions(+), 42 deletions(-) delete mode 100644 src/Appwrite/Migration/Version/V25.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Presences.php diff --git a/app/config/errors.php b/app/config/errors.php index fa112bcb6f..97daae0ca6 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -715,6 +715,13 @@ return [ 'code' => 404, ], + /** Presence */ + Exception::PRESENCE_NOT_FOUND => [ + 'name' => Exception::PRESENCE_NOT_FOUND, + 'description' => 'Presence with the requested ID could not be found.', + 'code' => 404, + ], + /** Databases */ Exception::DATABASE_NOT_FOUND => [ 'name' => Exception::DATABASE_NOT_FOUND, diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 6fc3e88635..57bc9432a2 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -200,6 +200,9 @@ class Exception extends \Exception /** Log */ public const string LOG_NOT_FOUND = 'log_not_found'; + /** Presence */ + public const string PRESENCE_NOT_FOUND = 'presence_not_found'; + /** Databases */ public const string DATABASE_NOT_FOUND = 'database_not_found'; public const string DATABASE_ALREADY_EXISTS = 'database_already_exists'; diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 004e09cd23..08e32a9c74 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -96,7 +96,7 @@ abstract class Migration '1.9.1' => 'V24', '1.9.2' => 'V24', '1.9.3' => 'V24', - '1.9.4' => 'V25', + '1.9.4' => 'V24', ]; /** diff --git a/src/Appwrite/Migration/Version/V24.php b/src/Appwrite/Migration/Version/V24.php index a2d9d7907b..0aa67cb74e 100644 --- a/src/Appwrite/Migration/Version/V24.php +++ b/src/Appwrite/Migration/Version/V24.php @@ -55,6 +55,9 @@ class V24 extends Migration if ($this->project->getSequence() != 'console') { Console::info('Migrating Databases'); $this->migrateDatabases(); + + Console::info('Creating presence logs collection'); + $this->createPresenceLogsCollection(); } Console::info('Migrating Buckets'); @@ -330,6 +333,30 @@ class V24 extends Migration }); } + /** + * Ensure the presenceLogs collection exists for project databases. + * + * @return void + * @throws Throwable + */ + private function createPresenceLogsCollection(): void + { + $collectionId = 'presenceLogs'; + + try { + Console::info("Ensuring collection \"{$collectionId}\" exists for project \"{$this->project->getId()}\"."); + $this->dbForProject->purgeCachedCollection($collectionId); + $this->dbForProject->purgeCachedDocument(Database::METADATA, $collectionId); + + $this->createCollection($collectionId); + } catch (Throwable $th) { + Console::warning("Failed to create collection \"{$collectionId}\": {$th->getMessage()}"); + + // Re-throw so the migration fails fast and doesn't leave the system in a partially migrated state. + throw $th; + } + } + /** * Migrate all Bucket tables * diff --git a/src/Appwrite/Migration/Version/V25.php b/src/Appwrite/Migration/Version/V25.php deleted file mode 100644 index 4270d0cc90..0000000000 --- a/src/Appwrite/Migration/Version/V25.php +++ /dev/null @@ -1,34 +0,0 @@ -project->getSequence() === 'console') { - return; - } - - $collectionId = 'presenceLogs'; - - try { - Console::info("Ensuring collection \"{$collectionId}\" exists for project \"{$this->project->getId()}\"."); - $this->dbForProject->purgeCachedCollection($collectionId); - $this->dbForProject->purgeCachedDocument(Database::METADATA, $collectionId); - - $this->createCollection($collectionId); - } catch (Throwable $th) { - Console::warning("Failed to create collection \"{$collectionId}\": {$th->getMessage()}"); - - // Re-throw so the migration fails fast and doesn't leave the system in a partially migrated state. - throw $th; - } - } -} diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index fc34718075..84877d404e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -62,7 +62,7 @@ class Delete extends PlatformAction $presence = $dbForProject->getDocument('presenceLogs', $presenceId); if ($presence->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); + throw new Exception(Exception::PRESENCE_NOT_FOUND); } try { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 2cc9c981d8..058cb2fa6f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -53,7 +53,7 @@ class Get extends PlatformAction { $presence = $dbForProject->getDocument('presenceLogs', $presenceId); if ($presence->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); + throw new Exception(Exception::PRESENCE_NOT_FOUND); } $response->dynamic($presence, Response::MODEL_PRESENCE); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index cb20fb601d..27f15a802e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -131,7 +131,7 @@ class Update extends PlatformAction $presence = $dbForProject->getDocument('presenceLogs', $presenceId); if ($presence->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId]); + throw new Exception(Exception::PRESENCE_NOT_FOUND, params: [$presenceId]); } $updateData = []; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 265682e0a7..eb6e794361 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -7,7 +7,7 @@ use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; -use Appwrite\Utopia\Database\Validator\Queries\Base as QueryValidator; +use Appwrite\Utopia\Database\Validator\Queries\Presences as PresencesQueries; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Document; @@ -32,8 +32,6 @@ class XList extends PlatformAction public function __construct() { - $allowedAttributes = ['userInternalId', 'userId', 'expiresAt', 'status', 'source']; - $this ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/presences') @@ -53,7 +51,7 @@ class XList extends PlatformAction ), ], )) - ->param('queries', [], new QueryValidator('presenceLogs', $allowedAttributes), 'Array of query strings generated using the Query class provided by the SDK.', true) + ->param('queries', [], new PresencesQueries(), 'Array of query strings generated using the Query class provided by the SDK.', true) ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Presences.php b/src/Appwrite/Utopia/Database/Validator/Queries/Presences.php new file mode 100644 index 0000000000..b1ee7b6fbd --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Presences.php @@ -0,0 +1,23 @@ + Date: Thu, 30 Apr 2026 16:38:26 +0530 Subject: [PATCH 066/192] Update userInternalId attribute type to VAR_ID and remove lengths from index definition for consistency. --- app/config/collections/projects.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 4450d9c473..ff723d2345 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2763,7 +2763,7 @@ return [ 'attributes' => [ [ '$id' => ID::custom('userInternalId'), - 'type' => Database::VAR_STRING, + 'type' => Database::VAR_ID, 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, @@ -2862,7 +2862,6 @@ return [ '$id' => ID::custom('_key_userInternal'), 'type' => Database::INDEX_KEY, 'attributes' => ['userInternalId'], - 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC] ], [ From 971858078c5e8a88b597da9fe3e9337fe7736ca4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 16:50:04 +0530 Subject: [PATCH 067/192] updated --- app/config/scopes/project.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/scopes/project.php b/app/config/scopes/project.php index 8b9d2ccdf7..7f39d6db95 100644 --- a/app/config/scopes/project.php +++ b/app/config/scopes/project.php @@ -340,7 +340,7 @@ return [ 'presences.read' => [ 'description' => 'Access to read your project\'s presences', ], - 'presences.read' => [ + 'presences.write' => [ 'description' => 'Access to create, update, and delete your project\'s presences', ], ]; From 8597d48e41d16f600e99cc42e157af6aadc835a5 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 17:47:31 +0530 Subject: [PATCH 068/192] added additonal property key to rename on the sdk generator --- .../SDK/Specification/Format/OpenAPI3.php | 7 +++++++ .../SDK/Specification/Format/Swagger2.php | 7 +++++++ src/Appwrite/Utopia/Response/Model/Any.php | 20 +++++++++++++++++++ .../Utopia/Response/Model/Presence.php | 14 ++++++------- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 66c2cd7c1c..2817569037 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -825,6 +825,13 @@ class OpenAPI3 extends Format if ($model->isAny()) { $output['components']['schemas'][$model->getType()]['additionalProperties'] = true; + + $additionalKey = \method_exists($model, 'getAdditionalPropertiesKey') + ? $model->getAdditionalPropertiesKey() + : null; + if ($additionalKey !== null) { + $output['components']['schemas'][$model->getType()]['x-additional-properties-key'] = $additionalKey; + } } if (!empty($required)) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index d07d957577..30833378a9 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -807,6 +807,13 @@ class Swagger2 extends Format if ($model->isAny()) { $output['definitions'][$model->getType()]['additionalProperties'] = true; + + $additionalKey = \method_exists($model, 'getAdditionalPropertiesKey') + ? $model->getAdditionalPropertiesKey() + : null; + if ($additionalKey !== null) { + $output['definitions'][$model->getType()]['x-additional-properties-key'] = $additionalKey; + } } if (!empty($required)) { diff --git a/src/Appwrite/Utopia/Response/Model/Any.php b/src/Appwrite/Utopia/Response/Model/Any.php index 6863748ac8..0ae3040a1d 100644 --- a/src/Appwrite/Utopia/Response/Model/Any.php +++ b/src/Appwrite/Utopia/Response/Model/Any.php @@ -12,6 +12,26 @@ class Any extends Model */ protected bool $any = true; + /** + * JSON wire-format key under which extra/dynamic attributes are exposed in + * generated SDK models (e.g. Document's `data` slot). Default null means + * SDK templates fall back to their hardcoded "data" key. Set this on + * subclasses (via setAdditionalPropertiesKey) to use a custom key like + * "metadata" while still benefiting from the generic `Model` mapping. + */ + protected ?string $additionalPropertiesKey = null; + + public function setAdditionalPropertiesKey(string $key): self + { + $this->additionalPropertiesKey = $key; + return $this; + } + + public function getAdditionalPropertiesKey(): ?string + { + return $this->additionalPropertiesKey; + } + /** * Get Name * diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php index 4140cdb9d9..ea4092cff1 100644 --- a/src/Appwrite/Utopia/Response/Model/Presence.php +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -19,6 +19,9 @@ class Presence extends Any public function __construct() { + // Expose user-defined extras under "metadata" instead of the SDK default "data" + $this->setAdditionalPropertiesKey('metadata'); + $this ->addRule('$id', [ 'type' => self::TYPE_STRING, @@ -83,15 +86,10 @@ class Presence extends Any 'required' => false, 'default' => null, 'example' => self::TYPE_DATETIME_EXAMPLE, - ]) - // not adding hostname here in the response model - ->addRule('metadata', [ - 'type' => self::TYPE_STRING, - 'description' => 'Presence metadata.', - 'required' => false, - 'default' => [], - 'example' => ['device' => 'web'], ]); + // `hostname` is intentionally not exposed. + // User-defined extras flow through Any's generic mapping, surfaced under + // the "metadata" key declared via setAdditionalPropertiesKey() above. } public function filter(DatabaseDocument $document): DatabaseDocument From 9c1cbecda4931893be8bea61e716b2f9f513e5f4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 17:58:39 +0530 Subject: [PATCH 069/192] bypassed sdk example? --- .github/workflows/specs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml index 6f377354d5..6ff66c8620 100644 --- a/.github/workflows/specs.yml +++ b/.github/workflows/specs.yml @@ -44,11 +44,11 @@ jobs: run: | docker compose exec appwrite specs --version=${{ inputs.version }} --mode=normal --git=no - - name: Generate SDK examples - if: inputs.push - run: | - docker compose exec appwrite sdks --platform=* --sdk=* --version=${{ inputs.version }} --git=no --mode=examples - sudo chown -R $USER:$USER ./docs/examples/ + # - name: Generate SDK examples + # if: inputs.push + # run: | + # docker compose exec appwrite sdks --platform=* --sdk=* --version=${{ inputs.version }} --git=no --mode=examples + # sudo chown -R $USER:$USER ./docs/examples/ - name: Push to appwrite/specs and create PR if: inputs.push From e267dcf9abc514f2fc1d4cb1e499c6b0f1665d2e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 18:01:51 +0530 Subject: [PATCH 070/192] updated --- .github/workflows/specs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml index 6ff66c8620..6f377354d5 100644 --- a/.github/workflows/specs.yml +++ b/.github/workflows/specs.yml @@ -44,11 +44,11 @@ jobs: run: | docker compose exec appwrite specs --version=${{ inputs.version }} --mode=normal --git=no - # - name: Generate SDK examples - # if: inputs.push - # run: | - # docker compose exec appwrite sdks --platform=* --sdk=* --version=${{ inputs.version }} --git=no --mode=examples - # sudo chown -R $USER:$USER ./docs/examples/ + - name: Generate SDK examples + if: inputs.push + run: | + docker compose exec appwrite sdks --platform=* --sdk=* --version=${{ inputs.version }} --git=no --mode=examples + sudo chown -R $USER:$USER ./docs/examples/ - name: Push to appwrite/specs and create PR if: inputs.push From 4f030619da85c87e5284d47a1c3ef7c6fe165fac Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 30 Apr 2026 18:03:25 +0530 Subject: [PATCH 071/192] temp gitignore --- .gitignore | 2 +- app/config/specs/open-api3-latest-client.json | 17702 ++++ .../specs/open-api3-latest-console.json | 80463 +++++++++++++++ app/config/specs/open-api3-latest-server.json | 68884 +++++++++++++ app/config/specs/swagger2-latest-client.json | 17510 ++++ app/config/specs/swagger2-latest-console.json | 80584 ++++++++++++++++ app/config/specs/swagger2-latest-server.json | 68959 +++++++++++++ 7 files changed, 334103 insertions(+), 1 deletion(-) create mode 100644 app/config/specs/open-api3-latest-client.json create mode 100644 app/config/specs/open-api3-latest-console.json create mode 100644 app/config/specs/open-api3-latest-server.json create mode 100644 app/config/specs/swagger2-latest-client.json create mode 100644 app/config/specs/swagger2-latest-console.json create mode 100644 app/config/specs/swagger2-latest-server.json diff --git a/.gitignore b/.gitignore index 6846e19aa7..c64732dc19 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ dev/yasd_init.php Makefile appwrite.config.json /.zed/ -/app/config/specs/ +# /app/config/specs/ /docs/examples/ .phpunit.cache .phpstan-cache diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json new file mode 100644 index 0000000000..c3493cccd9 --- /dev/null +++ b/app/config/specs/open-api3-latest-client.json @@ -0,0 +1,17702 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.9.3", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, + { + "url": "https:\/\/.cloud.appwrite.io\/v1" + } + ], + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "account", + "weight": 9, + "cookies": false, + "type": "", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "account", + "weight": 8, + "cookies": false, + "type": "", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "account", + "weight": 34, + "cookies": false, + "type": "", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "tokens", + "weight": 29, + "cookies": false, + "type": "", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 31, + "cookies": false, + "type": "", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "weight": 166, + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaType" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaAuthenticator", + "group": "mfa", + "weight": 168, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaAuthenticator", + "group": "mfa", + "weight": 169, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 170, + "cookies": false, + "type": "", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaChallenge" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaChallenge", + "group": "mfa", + "weight": 174, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + } + } + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaChallenge", + "group": "mfa", + "weight": 175, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "x-example": "" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + } + } + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 167, + "cookies": false, + "type": "", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 173, + "cookies": false, + "type": "", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 171, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 172, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "account", + "weight": 32, + "cookies": false, + "type": "", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "account", + "weight": 33, + "cookies": false, + "type": "", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "account", + "weight": 35, + "cookies": false, + "type": "", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + } + } + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "account", + "weight": 30, + "cookies": false, + "type": "", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "account", + "weight": 36, + "cookies": false, + "type": "", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecovery", + "group": "recovery", + "weight": 39, + "cookies": false, + "type": "", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "x-example": "" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 11, + "cookies": false, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 12, + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "weight": 17, + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "tags": [ + "account" + ], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailPasswordSession", + "group": "sessions", + "weight": 16, + "cookies": false, + "type": "", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMagicURLSession", + "group": "sessions", + "weight": 26, + "cookies": false, + "type": "", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "301": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Session", + "group": "sessions", + "weight": 19, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "weight": 27, + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 18, + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "weight": 13, + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "weight": 15, + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 14, + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "account", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/targets\/push": { + "post": { + "summary": "Create push target", + "operationId": "accountCreatePushTarget", + "tags": [ + "account" + ], + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPushTarget", + "group": "pushTargets", + "weight": 44, + "cookies": false, + "type": "", + "demo": "account\/create-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "" + } + }, + "required": [ + "targetId", + "identifier" + ] + } + } + } + } + } + }, + "\/account\/targets\/{targetId}\/push": { + "put": { + "summary": "Update push target", + "operationId": "accountUpdatePushTarget", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePushTarget", + "group": "pushTargets", + "weight": 45, + "cookies": false, + "type": "", + "demo": "account\/update-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "" + } + }, + "required": [ + "identifier" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete push target", + "operationId": "accountDeletePushTarget", + "tags": [ + "account" + ], + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePushTarget", + "group": "pushTargets", + "weight": 46, + "cookies": false, + "type": "", + "demo": "account\/delete-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailToken", + "group": "tokens", + "weight": 25, + "cookies": false, + "type": "", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMagicURLToken", + "group": "tokens", + "weight": 24, + "cookies": false, + "type": "", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Token", + "group": "tokens", + "weight": 23, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneToken", + "group": "tokens", + "weight": 28, + "cookies": false, + "type": "", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "x-example": "" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + } + } + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailVerification", + "group": "verification", + "weight": 40, + "cookies": false, + "type": "", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "verification", + "weight": 41, + "cookies": false, + "type": "", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneVerification", + "group": "verification", + "weight": 42, + "cookies": false, + "type": "", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "verification", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "weight": 177, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "schema": { + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "weight": 176, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "schema": { + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "weight": 180, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "weight": 178, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "weight": 179, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "weight": 182, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "weight": 181, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400 + }, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "weight": 183, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "schema": { + "type": "object", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + "default": {} + }, + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280 + }, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720 + }, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "2", + "default": 1 + }, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "schema": { + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "light" + }, + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "" + }, + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "en-US", + "default": "" + }, + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "america\/new_york", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "" + }, + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0 + }, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0 + }, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "100", + "default": 0 + }, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [] + }, + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0 + }, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 259, + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 255, + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 256, + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 257, + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 258, + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 260, + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 210, + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 202, + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 203, + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 206, + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 204, + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 208, + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 213, + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 212, + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 366, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 362, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 363, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 364, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 365, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "tags": [ + "documentsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 367, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 359, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 351, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 352, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 355, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 353, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 357, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 361, + "cookies": false, + "type": "", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 360, + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "weight": 438, + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "content": { + "multipart\/form-data": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "weight": 436, + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "x-example": "" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "x-example": "" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getExecution", + "group": "executions", + "weight": 437, + "cookies": false, + "type": "", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "weight": 117, + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "mutation", + "group": "graphql", + "weight": 116, + "cookies": false, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/locale" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 49, + "cookies": false, + "type": "", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/localeCodeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "weight": 50, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/continentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listContinents", + "group": null, + "weight": 54, + "cookies": false, + "type": "", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "weight": 51, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesEU", + "group": null, + "weight": 52, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/phoneList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "weight": 53, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/currencyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCurrencies", + "group": null, + "weight": 55, + "cookies": false, + "type": "", + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/languageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLanguages", + "group": null, + "weight": 56, + "cookies": false, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "weight": 150, + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "weight": 154, + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesListPresences", + "tags": [ + "presences" + ], + "description": "List presence logs.", + "responses": { + "200": { + "description": "Presences List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presenceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPresences", + "group": "presences", + "weight": 416, + "cookies": false, + "type": "", + "demo": "presences\/list-presences.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGetPresence", + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPresence", + "group": "presences", + "weight": 415, + "cookies": false, + "type": "", + "demo": "presences\/get-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsertPresence", + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertPresence", + "group": "presences", + "weight": 413, + "cookies": false, + "type": "", + "demo": "presences\/upsert-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertPresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "", + "demo": "presences\/upsert-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdatePresence", + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePresence", + "group": "presences", + "weight": 417, + "cookies": false, + "type": "", + "demo": "presences\/update-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updatePresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "status", + "expiresAt", + "metadata", + "permissions" + ], + "required": [ + "presenceId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "", + "demo": "presences\/update-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "", + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "x-example": "{}", + "x-nullable": true + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDeletePresence", + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePresence", + "group": "presences", + "weight": 418, + "cookies": false, + "type": "", + "demo": "presences\/delete-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/fileList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "weight": 550, + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "weight": 548, + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-upload-id": true + }, + "file": { + "type": "string", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "x-example": null, + "format": "binary" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + }, + "required": [ + "fileId", + "file" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFile", + "group": "files", + "weight": 549, + "cookies": false, + "type": "", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFile", + "group": "files", + "weight": 551, + "cookies": false, + "type": "", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "weight": 552, + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileDownload", + "group": "files", + "weight": 554, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFilePreview", + "group": "files", + "weight": 553, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "schema": { + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "default": "center" + }, + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0 + }, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileView", + "group": "files", + "weight": 555, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 332, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 328, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 329, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 330, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 331, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 333, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"tableId\": \"\",\n\t \"rowId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 324, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 316, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 317, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 320, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 318, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 322, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 327, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 326, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/teamList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "teams", + "weight": 526, + "cookies": false, + "type": "", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "weight": 524, + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "x-example": "" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "weight": 525, + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "weight": 528, + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "weight": 527, + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 533, + "cookies": false, + "type": "", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMembership", + "group": "memberships", + "weight": 531, + "cookies": false, + "type": "", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "x-example": "" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "roles" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMembership", + "group": "memberships", + "weight": 532, + "cookies": false, + "type": "", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "weight": 534, + "cookies": false, + "type": "", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "weight": 535, + "cookies": false, + "type": "", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipStatus", + "group": "memberships", + "weight": 536, + "cookies": false, + "type": "", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "teams", + "weight": 529, + "cookies": false, + "type": "", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "teams", + "weight": 530, + "cookies": false, + "type": "", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 399, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 395, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 396, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 397, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 398, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 400, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 389, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 385, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 388, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 387, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 386, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 390, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + } + ], + "components": { + "schemas": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "error": { + "description": "Error", + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message.", + "x-example": "Not found" + }, + "code": { + "type": "string", + "description": "Error code.", + "x-example": "404" + }, + "type": { + "type": "string", + "description": "Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes", + "x-example": "not_found" + }, + "version": { + "type": "string", + "description": "Server version number.", + "x-example": "1.0" + } + }, + "required": [ + "message", + "code", + "type", + "version" + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "$ref": "#\/components\/schemas\/document" + }, + "x-example": "" + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "$ref": "#\/components\/schemas\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "$ref": "#\/components\/schemas\/session" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "$ref": "#\/components\/schemas\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "$ref": "#\/components\/schemas\/log" + }, + "x-example": "" + } + }, + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "$ref": "#\/components\/schemas\/file" + }, + "x-example": "" + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "$ref": "#\/components\/schemas\/team" + }, + "x-example": "" + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "$ref": "#\/components\/schemas\/membership" + }, + "x-example": "" + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "$ref": "#\/components\/schemas\/execution" + }, + "x-example": "" + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "$ref": "#\/components\/schemas\/country" + }, + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "$ref": "#\/components\/schemas\/continent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "$ref": "#\/components\/schemas\/language" + }, + "x-example": "" + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "$ref": "#\/components\/schemas\/currency" + }, + "x-example": "" + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "$ref": "#\/components\/schemas\/phone" + }, + "x-example": "" + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "$ref": "#\/components\/schemas\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "$ref": "#\/components\/schemas\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Presence sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "userInternalId": { + "type": "string", + "description": "User internal ID.", + "x-example": "1" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "additionalProperties": true, + "x-additional-properties-key": "metadata", + "required": [ + "$id", + "$sequence", + "$createdAt", + "$updatedAt", + "$permissions", + "userInternalId", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userInternalId": "1", + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/algoArgon2" + }, + { + "$ref": "#\/components\/schemas\/algoScrypt" + }, + { + "$ref": "#\/components\/schemas\/algoScryptModified" + }, + { + "$ref": "#\/components\/schemas\/algoBcrypt" + }, + { + "$ref": "#\/components\/schemas\/algoPhpass" + }, + { + "$ref": "#\/components\/schemas\/algoSha" + }, + { + "$ref": "#\/components\/schemas\/algoMd5" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/components\/schemas\/algoArgon2", + "scrypt": "#\/components\/schemas\/algoScrypt", + "scryptMod": "#\/components\/schemas\/algoScryptModified", + "bcrypt": "#\/components\/schemas\/algoBcrypt", + "phpass": "#\/components\/schemas\/algoPhpass", + "sha": "#\/components\/schemas\/algoSha", + "md5": "#\/components\/schemas\/algoMd5" + } + } + }, + "nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "$ref": "#\/components\/schemas\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + } + }, + "securitySchemes": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "" + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header" + }, + "DevKey": { + "type": "apiKey", + "name": "X-Appwrite-Dev-Key", + "description": "Your secret dev API key", + "in": "header" + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json new file mode 100644 index 0000000000..30f73a0f1e --- /dev/null +++ b/app/config/specs/open-api3-latest-console.json @@ -0,0 +1,80463 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.9.3", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, + { + "url": "https:\/\/.cloud.appwrite.io\/v1" + } + ], + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "account", + "weight": 9, + "cookies": false, + "type": "", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "account", + "weight": 8, + "cookies": false, + "type": "", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete account", + "operationId": "accountDelete", + "tags": [ + "account" + ], + "description": "Delete the currently logged in user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "account", + "weight": 10, + "cookies": false, + "type": "", + "demo": "account\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "account", + "weight": 34, + "cookies": false, + "type": "", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "tokens", + "weight": 29, + "cookies": false, + "type": "", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 31, + "cookies": false, + "type": "", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "weight": 166, + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaType" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaAuthenticator", + "group": "mfa", + "weight": 168, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaAuthenticator", + "group": "mfa", + "weight": 169, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 170, + "cookies": false, + "type": "", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaChallenge" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaChallenge", + "group": "mfa", + "weight": 174, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + } + } + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaChallenge", + "group": "mfa", + "weight": 175, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "x-example": "" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + } + } + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 167, + "cookies": false, + "type": "", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 173, + "cookies": false, + "type": "", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 171, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 172, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "account", + "weight": 32, + "cookies": false, + "type": "", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "account", + "weight": 33, + "cookies": false, + "type": "", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "account", + "weight": 35, + "cookies": false, + "type": "", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + } + } + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "account", + "weight": 30, + "cookies": false, + "type": "", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "account", + "weight": 36, + "cookies": false, + "type": "", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecovery", + "group": "recovery", + "weight": 39, + "cookies": false, + "type": "", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "x-example": "" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 11, + "cookies": false, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 12, + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "weight": 17, + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "tags": [ + "account" + ], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailPasswordSession", + "group": "sessions", + "weight": 16, + "cookies": false, + "type": "", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMagicURLSession", + "group": "sessions", + "weight": 26, + "cookies": false, + "type": "", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "301": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Session", + "group": "sessions", + "weight": 19, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "weight": 27, + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 18, + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "weight": 13, + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "weight": 15, + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 14, + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "account", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/targets\/push": { + "post": { + "summary": "Create push target", + "operationId": "accountCreatePushTarget", + "tags": [ + "account" + ], + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPushTarget", + "group": "pushTargets", + "weight": 44, + "cookies": false, + "type": "", + "demo": "account\/create-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "" + } + }, + "required": [ + "targetId", + "identifier" + ] + } + } + } + } + } + }, + "\/account\/targets\/{targetId}\/push": { + "put": { + "summary": "Update push target", + "operationId": "accountUpdatePushTarget", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePushTarget", + "group": "pushTargets", + "weight": 45, + "cookies": false, + "type": "", + "demo": "account\/update-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "" + } + }, + "required": [ + "identifier" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete push target", + "operationId": "accountDeletePushTarget", + "tags": [ + "account" + ], + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePushTarget", + "group": "pushTargets", + "weight": 46, + "cookies": false, + "type": "", + "demo": "account\/delete-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailToken", + "group": "tokens", + "weight": 25, + "cookies": false, + "type": "", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMagicURLToken", + "group": "tokens", + "weight": 24, + "cookies": false, + "type": "", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Token", + "group": "tokens", + "weight": 23, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneToken", + "group": "tokens", + "weight": 28, + "cookies": false, + "type": "", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "x-example": "" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + } + } + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailVerification", + "group": "verification", + "weight": 40, + "cookies": false, + "type": "", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "verification", + "weight": 41, + "cookies": false, + "type": "", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneVerification", + "group": "verification", + "weight": 42, + "cookies": false, + "type": "", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "verification", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "weight": 177, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "schema": { + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "weight": 176, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "schema": { + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "weight": 180, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "weight": 178, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "weight": 179, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "weight": 182, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "weight": 181, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400 + }, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "weight": 183, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "schema": { + "type": "object", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + "default": {} + }, + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280 + }, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720 + }, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "2", + "default": 1 + }, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "schema": { + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "light" + }, + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "" + }, + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "en-US", + "default": "" + }, + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "america\/new_york", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "" + }, + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0 + }, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0 + }, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "100", + "default": 0 + }, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [] + }, + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0 + }, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/console\/assistant": { + "post": { + "summary": "Create assistant query", + "operationId": "assistantChat", + "tags": [ + "assistant" + ], + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "chat", + "group": "console", + "weight": 506, + "cookies": false, + "type": "", + "demo": "assistant\/chat.md", + "rate-limit": 15, + "rate-time": 3600, + "rate-key": "userId:{userId}", + "scope": "assistant.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "Prompt. A string containing questions asked to the AI assistant.", + "x-example": "" + } + }, + "required": [ + "prompt" + ] + } + } + } + } + } + }, + "\/console\/oauth2-providers": { + "get": { + "summary": "List OAuth2 providers", + "operationId": "consoleListOAuth2Providers", + "tags": [ + "console" + ], + "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", + "responses": { + "200": { + "description": "Console OAuth2 Providers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleOAuth2ProviderList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Providers", + "group": "console", + "weight": 504, + "cookies": false, + "type": "", + "demo": "console\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/resources": { + "get": { + "summary": "Check resource ID availability", + "operationId": "consoleGetResource", + "tags": [ + "console" + ], + "description": "Check if a resource ID is available.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getResource", + "group": null, + "weight": 507, + "cookies": false, + "type": "", + "demo": "console\/get-resource.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "value", + "description": "Resource value.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "type", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "x-example": "rules", + "enum": [ + "rules" + ], + "x-enum-name": "ConsoleResourceType", + "x-enum-keys": [] + }, + "in": "query" + } + ] + } + }, + "\/console\/scopes\/project": { + "get": { + "summary": "List project scopes", + "operationId": "consoleListProjectScopes", + "tags": [ + "console" + ], + "description": "List all scopes available for project API keys, along with a description for each scope.", + "responses": { + "200": { + "description": "Console Key Scopes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleKeyScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProjectScopes", + "group": "console", + "weight": 505, + "cookies": false, + "type": "", + "demo": "console\/list-project-scopes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/variables": { + "get": { + "summary": "Get variables", + "operationId": "consoleVariables", + "tags": [ + "console" + ], + "description": "Get all Environment Variables that are relevant for the console.", + "responses": { + "200": { + "description": "Console Variables", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleVariables" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "variables", + "group": "console", + "weight": 503, + "cookies": false, + "type": "", + "demo": "console\/variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "list", + "group": "databases", + "weight": 191, + "cookies": false, + "type": "", + "demo": "databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "queries", + "search", + "total" + ], + "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.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "create", + "group": "databases", + "weight": 187, + "cookies": false, + "type": "", + "demo": "databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 259, + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 255, + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 256, + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 257, + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 258, + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 260, + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/databases\/usage": { + "get": { + "summary": "Get databases usage stats", + "operationId": "databasesListUsage", + "tags": [ + "databases" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 194, + "cookies": false, + "type": "", + "demo": "databases\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listUsage" + }, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/list-usage.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listUsage" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "get", + "group": "databases", + "weight": 188, + "cookies": false, + "type": "", + "demo": "databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "update", + "group": "databases", + "weight": 189, + "cookies": false, + "type": "", + "demo": "databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "delete", + "group": "databases", + "weight": 190, + "cookies": false, + "type": "", + "demo": "databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 199, + "cookies": false, + "type": "", + "demo": "databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collections", + "operationId": "databasesCreateCollection", + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 195, + "cookies": false, + "type": "", + "demo": "databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "tags": [ + "databases" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 196, + "cookies": false, + "type": "", + "demo": "databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 197, + "cookies": false, + "type": "", + "demo": "databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "tags": [ + "databases" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 198, + "cookies": false, + "type": "", + "demo": "databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listAttributes", + "group": "attributes", + "weight": 216, + "cookies": false, + "type": "", + "demo": "databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createBooleanAttribute", + "group": "attributes", + "weight": 217, + "cookies": false, + "type": "", + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateBooleanAttribute", + "group": "attributes", + "weight": 218, + "cookies": false, + "type": "", + "demo": "databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDatetimeAttribute", + "group": "attributes", + "weight": 219, + "cookies": false, + "type": "", + "demo": "databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update datetime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "group": "attributes", + "weight": 220, + "cookies": false, + "type": "", + "demo": "databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEmailAttribute", + "group": "attributes", + "weight": 221, + "cookies": false, + "type": "", + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEmailAttribute", + "group": "attributes", + "weight": 222, + "cookies": false, + "type": "", + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEnumAttribute", + "group": "attributes", + "weight": 223, + "cookies": false, + "type": "", + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEnumAttribute", + "group": "attributes", + "weight": 224, + "cookies": false, + "type": "", + "demo": "databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFloatAttribute", + "group": "attributes", + "weight": 225, + "cookies": false, + "type": "", + "demo": "databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFloatAttribute", + "group": "attributes", + "weight": 226, + "cookies": false, + "type": "", + "demo": "databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateFloatColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIntegerAttribute", + "group": "attributes", + "weight": 227, + "cookies": false, + "type": "", + "demo": "databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIntegerColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIntegerAttribute", + "group": "attributes", + "weight": 228, + "cookies": false, + "type": "", + "demo": "databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIntegerColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIpAttribute", + "group": "attributes", + "weight": 229, + "cookies": false, + "type": "", + "demo": "databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIpColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIpAttribute", + "group": "attributes", + "weight": 230, + "cookies": false, + "type": "", + "demo": "databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIpColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric line attribute.", + "responses": { + "202": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createLineAttribute", + "group": "attributes", + "weight": 231, + "cookies": false, + "type": "", + "demo": "databases\/create-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLineColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", + "tags": [ + "databases" + ], + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateLineAttribute", + "group": "attributes", + "weight": 232, + "cookies": false, + "type": "", + "demo": "databases\/update-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLineColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a longtext attribute.\n", + "responses": { + "202": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextAttribute", + "group": "attributes", + "weight": 249, + "cookies": false, + "type": "", + "demo": "databases\/create-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextAttribute", + "group": "attributes", + "weight": 250, + "cookies": false, + "type": "", + "demo": "databases\/update-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a mediumtext attribute.\n", + "responses": { + "202": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextAttribute", + "group": "attributes", + "weight": 247, + "cookies": false, + "type": "", + "demo": "databases\/create-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextAttribute", + "group": "attributes", + "weight": 248, + "cookies": false, + "type": "", + "demo": "databases\/update-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric point attribute.", + "responses": { + "202": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPointAttribute", + "group": "attributes", + "weight": 233, + "cookies": false, + "type": "", + "demo": "databases\/create-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPointColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", + "tags": [ + "databases" + ], + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePointAttribute", + "group": "attributes", + "weight": 234, + "cookies": false, + "type": "", + "demo": "databases\/update-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePointColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric polygon attribute.", + "responses": { + "202": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPolygonAttribute", + "group": "attributes", + "weight": 235, + "cookies": false, + "type": "", + "demo": "databases\/create-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPolygonColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePolygonAttribute", + "group": "attributes", + "weight": 236, + "cookies": false, + "type": "", + "demo": "databases\/update-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePolygonColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createRelationshipAttribute", + "group": "attributes", + "weight": 237, + "cookies": false, + "type": "", + "demo": "databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRelationshipColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "group": "attributes", + "weight": 238, + "cookies": false, + "type": "", + "demo": "databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRelationshipColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringAttribute", + "group": "attributes", + "weight": 239, + "cookies": false, + "type": "", + "demo": "databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createStringColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringAttribute", + "group": "attributes", + "weight": 240, + "cookies": false, + "type": "", + "demo": "databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateStringColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { + "post": { + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", + "tags": [ + "databases" + ], + "description": "Create a text attribute.\n", + "responses": { + "202": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextAttribute", + "group": "attributes", + "weight": 245, + "cookies": false, + "type": "", + "demo": "databases\/create-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { + "patch": { + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", + "tags": [ + "databases" + ], + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextAttribute", + "group": "attributes", + "weight": 246, + "cookies": false, + "type": "", + "demo": "databases\/update-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createUrlAttribute", + "group": "attributes", + "weight": 241, + "cookies": false, + "type": "", + "demo": "databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createUrlColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateUrlAttribute", + "group": "attributes", + "weight": 242, + "cookies": false, + "type": "", + "demo": "databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateUrlColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "post": { + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Create a varchar attribute.\n", + "responses": { + "202": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharAttribute", + "group": "attributes", + "weight": 243, + "cookies": false, + "type": "", + "demo": "databases\/create-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { + "patch": { + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharAttribute", + "group": "attributes", + "weight": 244, + "cookies": false, + "type": "", + "demo": "databases\/update-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar attribute.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getAttribute", + "group": "attributes", + "weight": 214, + "cookies": false, + "type": "", + "demo": "databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteAttribute", + "group": "attributes", + "weight": 215, + "cookies": false, + "type": "", + "demo": "databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 210, + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 202, + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", + "tags": [ + "databases" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 207, + "cookies": false, + "type": "", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 205, + "cookies": false, + "type": "", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 209, + "cookies": false, + "type": "", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 203, + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 206, + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 204, + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 208, + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs": { + "get": { + "summary": "List document logs", + "operationId": "databasesListDocumentLogs", + "tags": [ + "databases" + ], + "description": "Get the document 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": "listDocumentLogs", + "group": "logs", + "weight": 211, + "cookies": false, + "type": "", + "demo": "databases\/list-document-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRowLogs" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "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}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 213, + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 212, + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 254, + "cookies": false, + "type": "", + "demo": "databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listIndexes" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 251, + "cookies": false, + "type": "", + "demo": "databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIndex" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "DatabasesIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "tags": [ + "databases" + ], + "description": "Get an index by its unique ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 252, + "cookies": false, + "type": "", + "demo": "databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getIndex" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 253, + "cookies": false, + "type": "", + "demo": "databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteIndex" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/logs": { + "get": { + "summary": "List collection logs", + "operationId": "databasesListCollectionLogs", + "tags": [ + "databases" + ], + "description": "Get the collection 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": "listCollectionLogs", + "group": "collections", + "weight": 200, + "cookies": false, + "type": "", + "demo": "databases\/list-collection-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTableLogs" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "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}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "databasesGetCollectionUsage", + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageCollection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollectionUsage", + "group": null, + "weight": 201, + "cookies": false, + "type": "", + "demo": "databases\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTableUsage" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/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": 192, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listDatabaseLogs" + }, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/list-logs.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listDatabaseLogs" + } + } + ], + "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", + "operationId": "databasesGetUsage", + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabase" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 193, + "cookies": false, + "type": "", + "demo": "databases\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getUsage" + }, + "methods": [ + { + "name": "getUsage", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/get-usage.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getUsage" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "documentsdb", + "weight": 338, + "cookies": false, + "type": "", + "demo": "documentsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "documentsDBCreate", + "tags": [ + "documentsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "documentsdb", + "weight": 334, + "cookies": false, + "type": "", + "demo": "documentsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 366, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 362, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 363, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 364, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 365, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/usage": { + "get": { + "summary": "Get DocumentsDB usage stats", + "operationId": "documentsDBListUsage", + "tags": [ + "documentsDB" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 340, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-usage.md", + "methods": [ + { + "name": "listUsage", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "documentsdb\/list-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", + "tags": [ + "documentsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "documentsdb", + "weight": 335, + "cookies": false, + "type": "", + "demo": "documentsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", + "tags": [ + "documentsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "documentsdb", + "weight": 336, + "cookies": false, + "type": "", + "demo": "documentsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", + "tags": [ + "documentsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "documentsdb", + "weight": 337, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 345, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "documentsDBCreateCollection", + "tags": [ + "documentsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 341, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "documentsDBGetCollection", + "tags": [ + "documentsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 342, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", + "tags": [ + "documentsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 343, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", + "tags": [ + "documentsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 344, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 359, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 351, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "documentsDBUpsertDocuments", + "tags": [ + "documentsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 356, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "documentsDBUpdateDocuments", + "tags": [ + "documentsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 354, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "documentsDBDeleteDocuments", + "tags": [ + "documentsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 358, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 352, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 355, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 353, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 357, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 361, + "cookies": false, + "type": "", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 360, + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "documentsDBListIndexes", + "tags": [ + "documentsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 350, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "documentsDBCreateIndex", + "tags": [ + "documentsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 347, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "DocumentsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "documentsDBGetIndex", + "tags": [ + "documentsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 348, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "documentsDBDeleteIndex", + "tags": [ + "documentsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 349, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "documentsDBGetCollectionUsage", + "tags": [ + "documentsDB" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollectionUsage", + "group": null, + "weight": 346, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/usage": { + "get": { + "summary": "Get DocumentsDB usage stats", + "operationId": "documentsDBGetUsage", + "tags": [ + "documentsDB" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDocumentsDB", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDocumentsDB" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 339, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-database-usage.md", + "methods": [ + { + "name": "getUsage", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDocumentsDB" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "documentsdb\/get-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/functions": { + "get": { + "summary": "List functions", + "operationId": "functionsList", + "tags": [ + "functions" + ], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/functionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "functions", + "weight": 422, + "cookies": false, + "type": "", + "demo": "functions\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create function", + "operationId": "functionsCreate", + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "functions", + "weight": 419, + "cookies": false, + "type": "", + "demo": "functions\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Function maximum execution time in seconds.", + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "x-example": "" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "x-example": "" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "x-example": "" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "x-example": "" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "functionId", + "name", + "runtime" + ] + } + } + } + } + } + }, + "\/functions\/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "tags": [ + "functions" + ], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/runtimeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRuntimes", + "group": "runtimes", + "weight": 424, + "cookies": false, + "type": "", + "demo": "functions\/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "runtimes", + "weight": 425, + "cookies": false, + "type": "", + "demo": "functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/templates": { + "get": { + "summary": "List templates", + "operationId": "functionsListTemplates", + "tags": [ + "functions" + ], + "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Function Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateFunctionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTemplates", + "group": "templates", + "weight": 448, + "cookies": false, + "type": "", + "demo": "functions\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "runtimes", + "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "starter", + "databases", + "ai", + "messaging", + "utilities", + "dev-tools", + "auth" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/functions\/templates\/{templateId}": { + "get": { + "summary": "Get function template", + "operationId": "functionsGetTemplate", + "tags": [ + "functions" + ], + "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Template Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateFunction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTemplate", + "group": "templates", + "weight": 447, + "cookies": false, + "type": "", + "demo": "functions\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/functions\/usage": { + "get": { + "summary": "Get functions usage", + "operationId": "functionsListUsage", + "tags": [ + "functions" + ], + "description": "Get usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageFunctions", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageFunctions" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 441, + "cookies": false, + "type": "", + "demo": "functions\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}": { + "get": { + "summary": "Get function", + "operationId": "functionsGet", + "tags": [ + "functions" + ], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "functions", + "weight": 420, + "cookies": false, + "type": "", + "demo": "functions\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", + "tags": [ + "functions" + ], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "functions", + "weight": 421, + "cookies": false, + "type": "", + "demo": "functions\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Maximum execution time in seconds.", + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "x-example": "" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "x-example": "" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "x-example": "", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "x-example": "" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "x-example": "" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", + "tags": [ + "functions" + ], + "description": "Delete a function by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "functions", + "weight": 423, + "cookies": false, + "type": "", + "demo": "functions\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", + "tags": [ + "functions" + ], + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFunctionDeployment", + "group": "functions", + "weight": 428, + "cookies": false, + "type": "", + "demo": "functions\/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "functionsListDeployments", + "tags": [ + "functions" + ], + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deploymentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 429, + "cookies": false, + "type": "", + "demo": "functions\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "functionsCreateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 426, + "cookies": false, + "type": "upload", + "demo": "functions\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "entrypoint": { + "type": "string", + "description": "Entrypoint File.", + "x-example": "", + "x-nullable": true + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "", + "x-nullable": true + }, + "code": { + "type": "string", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "x-example": null, + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "code", + "activate" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 434, + "cookies": false, + "type": "", + "demo": "functions\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "" + }, + "buildId": { + "type": "string", + "description": "Build unique ID.", + "x-example": "" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", + "tags": [ + "functions" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 431, + "cookies": false, + "type": "", + "demo": "functions\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "x-example": "" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "x-example": "" + }, + "rootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "commit", + "enum": [ + "commit", + "branch", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", + "tags": [ + "functions" + ], + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 432, + "cookies": false, + "type": "", + "demo": "functions\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "functionsGetDeployment", + "tags": [ + "functions" + ], + "description": "Get a function deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 427, + "cookies": false, + "type": "", + "demo": "functions\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", + "tags": [ + "functions" + ], + "description": "Delete a code deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 430, + "cookies": false, + "type": "", + "demo": "functions\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", + "tags": [ + "functions" + ], + "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 433, + "cookies": false, + "type": "location", + "demo": "functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source" + }, + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 435, + "cookies": false, + "type": "", + "demo": "functions\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "weight": 438, + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "content": { + "multipart\/form-data": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "weight": 436, + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "x-example": "" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "x-example": "" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getExecution", + "group": "executions", + "weight": 437, + "cookies": false, + "type": "", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteExecution", + "group": "executions", + "weight": 439, + "cookies": false, + "type": "", + "demo": "functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/usage": { + "get": { + "summary": "Get function usage", + "operationId": "functionsGetUsage", + "tags": [ + "functions" + ], + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageFunction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageFunction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 440, + "cookies": false, + "type": "", + "demo": "functions\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 444, + "cookies": false, + "type": "", + "demo": "functions\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 442, + "cookies": false, + "type": "", + "demo": "functions\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 443, + "cookies": false, + "type": "", + "demo": "functions\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 445, + "cookies": false, + "type": "", + "demo": "functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 446, + "cookies": false, + "type": "", + "demo": "functions\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "weight": 117, + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "mutation", + "group": "graphql", + "weight": 116, + "cookies": false, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/health": { + "get": { + "summary": "Get HTTP", + "operationId": "healthGet", + "tags": [ + "health" + ], + "description": "Check the Appwrite HTTP server is up and responsive.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "health", + "weight": 449, + "cookies": false, + "type": "", + "demo": "health\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/anti-virus": { + "get": { + "summary": "Get antivirus", + "operationId": "healthGetAntivirus", + "tags": [ + "health" + ], + "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Antivirus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthAntivirus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAntivirus", + "group": "health", + "weight": 458, + "cookies": false, + "type": "", + "demo": "health\/get-antivirus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/cache": { + "get": { + "summary": "Get cache", + "operationId": "healthGetCache", + "tags": [ + "health" + ], + "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCache", + "group": "health", + "weight": 452, + "cookies": false, + "type": "", + "demo": "health\/get-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthCertificate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCertificate", + "group": "health", + "weight": 455, + "cookies": false, + "type": "", + "demo": "health\/get-certificate.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "schema": { + "type": "string" + }, + "in": "query" + } + ] + } + }, + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDB", + "group": "health", + "weight": 451, + "cookies": false, + "type": "", + "demo": "health\/get-db.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPubSub", + "group": "health", + "weight": 453, + "cookies": false, + "type": "", + "demo": "health\/get-pub-sub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/queue\/audits": { + "get": { + "summary": "Get audits queue", + "operationId": "healthGetQueueAudits", + "tags": [ + "health" + ], + "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueAudits", + "group": "queue", + "weight": 459, + "cookies": false, + "type": "", + "demo": "health\/get-queue-audits.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "tags": [ + "health" + ], + "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueBuilds", + "group": "queue", + "weight": 463, + "cookies": false, + "type": "", + "demo": "health\/get-queue-builds.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/certificates": { + "get": { + "summary": "Get certificates queue", + "operationId": "healthGetQueueCertificates", + "tags": [ + "health" + ], + "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueCertificates", + "group": "queue", + "weight": 462, + "cookies": false, + "type": "", + "demo": "health\/get-queue-certificates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "tags": [ + "health" + ], + "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDatabases", + "group": "queue", + "weight": 464, + "cookies": false, + "type": "", + "demo": "health\/get-queue-databases.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "database_db_main" + }, + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDeletes", + "group": "queue", + "weight": 465, + "cookies": false, + "type": "", + "demo": "health\/get-queue-deletes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFailedJobs", + "group": "queue", + "weight": 472, + "cookies": false, + "type": "", + "demo": "health\/get-failed-jobs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "schema": { + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-stats-resources", + "v1-stats-usage", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-screenshots", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "tags": [ + "health" + ], + "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueFunctions", + "group": "queue", + "weight": 469, + "cookies": false, + "type": "", + "demo": "health\/get-queue-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/logs": { + "get": { + "summary": "Get logs queue", + "operationId": "healthGetQueueLogs", + "tags": [ + "health" + ], + "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueLogs", + "group": "queue", + "weight": 461, + "cookies": false, + "type": "", + "demo": "health\/get-queue-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "tags": [ + "health" + ], + "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMails", + "group": "queue", + "weight": 466, + "cookies": false, + "type": "", + "demo": "health\/get-queue-mails.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "tags": [ + "health" + ], + "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMessaging", + "group": "queue", + "weight": 467, + "cookies": false, + "type": "", + "demo": "health\/get-queue-messaging.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "tags": [ + "health" + ], + "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMigrations", + "group": "queue", + "weight": 468, + "cookies": false, + "type": "", + "demo": "health\/get-queue-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-resources": { + "get": { + "summary": "Get stats resources queue", + "operationId": "healthGetQueueStatsResources", + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueStatsResources", + "group": "queue", + "weight": 470, + "cookies": false, + "type": "", + "demo": "health\/get-queue-stats-resources.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-usage": { + "get": { + "summary": "Get stats usage queue", + "operationId": "healthGetQueueUsage", + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueUsage", + "group": "queue", + "weight": 471, + "cookies": false, + "type": "", + "demo": "health\/get-queue-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/webhooks": { + "get": { + "summary": "Get webhooks queue", + "operationId": "healthGetQueueWebhooks", + "tags": [ + "health" + ], + "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueWebhooks", + "group": "queue", + "weight": 460, + "cookies": false, + "type": "", + "demo": "health\/get-queue-webhooks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorage", + "group": "storage", + "weight": 457, + "cookies": false, + "type": "", + "demo": "health\/get-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/storage\/local": { + "get": { + "summary": "Get local storage", + "operationId": "healthGetStorageLocal", + "tags": [ + "health" + ], + "description": "Check the Appwrite local storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorageLocal", + "group": "storage", + "weight": 456, + "cookies": false, + "type": "", + "demo": "health\/get-storage-local.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/time": { + "get": { + "summary": "Get time", + "operationId": "healthGetTime", + "tags": [ + "health" + ], + "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "responses": { + "200": { + "description": "Health Time", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthTime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTime", + "group": "health", + "weight": 454, + "cookies": false, + "type": "", + "demo": "health\/get-time.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/locale" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 49, + "cookies": false, + "type": "", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/localeCodeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "weight": 50, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/continentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listContinents", + "group": null, + "weight": 54, + "cookies": false, + "type": "", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "weight": 51, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesEU", + "group": null, + "weight": 52, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/phoneList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "weight": 53, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/currencyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCurrencies", + "group": null, + "weight": 55, + "cookies": false, + "type": "", + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/languageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLanguages", + "group": null, + "weight": 56, + "cookies": false, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/messageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessages", + "group": "messages", + "weight": 158, + "cookies": false, + "type": "", + "demo": "messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmail", + "group": "messages", + "weight": 155, + "cookies": false, + "type": "", + "demo": "messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "" + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.", + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "messages", + "weight": 162, + "cookies": false, + "type": "", + "demo": "messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "", + "x-nullable": true + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false, + "x-nullable": true + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPush", + "group": "messages", + "weight": 157, + "cookies": false, + "type": "", + "demo": "messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "<ID1:ID2>" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null, + "format": "int32" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePush", + "group": "messages", + "weight": 164, + "cookies": false, + "type": "", + "demo": "messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "<TITLE>", + "x-nullable": true + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>", + "x-nullable": true + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>", + "x-nullable": true + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "<ID1:ID2>", + "x-nullable": true + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "x-example": "<ICON>", + "x-nullable": true + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "x-example": "<SOUND>", + "x-nullable": true + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "x-example": "<COLOR>", + "x-nullable": true + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "x-example": "<TAG>", + "x-nullable": true + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [], + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSms", + "group": "messages", + "weight": 156, + "cookies": false, + "type": "", + "demo": "messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSms", + "group": "messages", + "weight": 163, + "cookies": false, + "type": "", + "demo": "messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMessage", + "group": "messages", + "weight": 161, + "cookies": false, + "type": "", + "demo": "messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "messages", + "weight": 165, + "cookies": false, + "type": "", + "demo": "messaging\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessageLogs", + "group": "logs", + "weight": 159, + "cookies": false, + "type": "", + "demo": "messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "messages", + "weight": 160, + "cookies": false, + "type": "", + "demo": "messaging\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviders", + "group": "providers", + "weight": 129, + "cookies": false, + "type": "", + "demo": "messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createApnsProvider", + "group": "providers", + "weight": 128, + "cookies": false, + "type": "", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateApnsProvider", + "group": "providers", + "weight": 142, + "cookies": false, + "type": "", + "demo": "messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFcmProvider", + "group": "providers", + "weight": 127, + "cookies": false, + "type": "", + "demo": "messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "x-example": "{}", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFcmProvider", + "group": "providers", + "weight": 141, + "cookies": false, + "type": "", + "demo": "messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "x-example": "{}", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMailgunProvider", + "group": "providers", + "weight": 118, + "cookies": false, + "type": "", + "demo": "messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMailgunProvider", + "group": "providers", + "weight": 132, + "cookies": false, + "type": "", + "demo": "messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMsg91Provider", + "group": "providers", + "weight": 122, + "cookies": false, + "type": "", + "demo": "messaging\/create-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMsg91Provider", + "group": "providers", + "weight": 136, + "cookies": false, + "type": "", + "demo": "messaging\/update-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "x-example": "<AUTH_KEY>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Resend provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createResendProvider", + "group": "providers", + "weight": 120, + "cookies": false, + "type": "", + "demo": "messaging\/create-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", + "tags": [ + "messaging" + ], + "description": "Update a Resend provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateResendProvider", + "group": "providers", + "weight": 134, + "cookies": false, + "type": "", + "demo": "messaging\/update-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSendgridProvider", + "group": "providers", + "weight": 119, + "cookies": false, + "type": "", + "demo": "messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSendgridProvider", + "group": "providers", + "weight": 133, + "cookies": false, + "type": "", + "demo": "messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSmtpProvider", + "group": "providers", + "weight": 121, + "cookies": false, + "type": "", + "demo": "messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "x-example": 1, + "format": "int32" + }, + "username": { + "type": "string", + "description": "Authentication username.", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSmtpProvider", + "group": "providers", + "weight": 135, + "cookies": false, + "type": "", + "demo": "messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Authentication username.", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false, + "x-nullable": true + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTelesignProvider", + "group": "providers", + "weight": 123, + "cookies": false, + "type": "", + "demo": "messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTelesignProvider", + "group": "providers", + "weight": 137, + "cookies": false, + "type": "", + "demo": "messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextmagicProvider", + "group": "providers", + "weight": 124, + "cookies": false, + "type": "", + "demo": "messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextmagicProvider", + "group": "providers", + "weight": 138, + "cookies": false, + "type": "", + "demo": "messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTwilioProvider", + "group": "providers", + "weight": 125, + "cookies": false, + "type": "", + "demo": "messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTwilioProvider", + "group": "providers", + "weight": 139, + "cookies": false, + "type": "", + "demo": "messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVonageProvider", + "group": "providers", + "weight": 126, + "cookies": false, + "type": "", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVonageProvider", + "group": "providers", + "weight": 140, + "cookies": false, + "type": "", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getProvider", + "group": "providers", + "weight": 131, + "cookies": false, + "type": "", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteProvider", + "group": "providers", + "weight": 143, + "cookies": false, + "type": "", + "demo": "messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviderLogs", + "group": "providers", + "weight": 130, + "cookies": false, + "type": "", + "demo": "messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscriberLogs", + "group": "subscribers", + "weight": 152, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topicList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopics", + "group": "topics", + "weight": 145, + "cookies": false, + "type": "", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTopic", + "group": "topics", + "weight": 144, + "cookies": false, + "type": "", + "demo": "messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTopic", + "group": "topics", + "weight": 147, + "cookies": false, + "type": "", + "demo": "messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTopic", + "group": "topics", + "weight": 148, + "cookies": false, + "type": "", + "demo": "messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTopic", + "group": "topics", + "weight": 149, + "cookies": false, + "type": "", + "demo": "messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopicLogs", + "group": "topics", + "weight": 146, + "cookies": false, + "type": "", + "demo": "messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscribers", + "group": "subscribers", + "weight": 151, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "weight": 150, + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriber", + "group": "subscribers", + "weight": 153, + "cookies": false, + "type": "", + "demo": "messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "weight": 154, + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/migrations": { + "get": { + "summary": "List migrations", + "operationId": "migrationsList", + "tags": [ + "migrations" + ], + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", + "responses": { + "200": { + "description": "Migrations List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 578, + "cookies": false, + "type": "", + "demo": "migrations\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/migrations\/appwrite": { + "post": { + "summary": "Create Appwrite migration", + "operationId": "migrationsCreateAppwriteMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAppwriteMigration", + "group": null, + "weight": 582, + "cookies": false, + "type": "", + "demo": "migrations\/create-appwrite-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable" + ], + "x-enum-name": "AppwriteMigrationResource", + "x-enum-keys": [] + } + }, + "endpoint": { + "type": "string", + "description": "Source Appwrite endpoint", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "projectId": { + "type": "string", + "description": "Source Project ID", + "x-example": "<PROJECT_ID>" + }, + "apiKey": { + "type": "string", + "description": "Source API Key", + "x-example": "<API_KEY>" + } + }, + "required": [ + "resources", + "endpoint", + "projectId", + "apiKey" + ] + } + } + } + } + } + }, + "\/migrations\/appwrite\/report": { + "get": { + "summary": "Get Appwrite migration report", + "operationId": "migrationsGetAppwriteReport", + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAppwriteReport", + "group": null, + "weight": 583, + "cookies": false, + "type": "", + "demo": "migrations\/get-appwrite-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable" + ], + "x-enum-name": "AppwriteMigrationResource", + "x-enum-keys": [] + } + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Appwrite Endpoint", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "projectID", + "description": "Source's Project ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "query" + }, + { + "name": "key", + "description": "Source's API Key", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY>" + }, + "in": "query" + } + ] + } + }, + "\/migrations\/csv\/exports": { + "post": { + "summary": "Export documents to CSV", + "operationId": "migrationsCreateCSVExport", + "tags": [ + "migrations" + ], + "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCSVExport", + "group": null, + "weight": 591, + "cookies": false, + "type": "", + "demo": "migrations\/create-csv-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-export.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", + "x-example": "<ID1:ID2>" + }, + "filename": { + "type": "string", + "description": "The name of the file to be created for the export, excluding the .csv extension.", + "x-example": "<FILENAME>" + }, + "columns": { + "type": "array", + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "x-example": null, + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "delimiter": { + "type": "string", + "description": "The character that separates each column value. Default is comma.", + "x-example": "<DELIMITER>" + }, + "enclosure": { + "type": "string", + "description": "The character that encloses each column value. Default is double quotes.", + "x-example": "<ENCLOSURE>" + }, + "escape": { + "type": "string", + "description": "The escape character for the enclosure character. Default is double quotes.", + "x-example": "<ESCAPE>" + }, + "header": { + "type": "boolean", + "description": "Whether to include the header row with column names. Default is true.", + "x-example": false + }, + "notify": { + "type": "boolean", + "description": "Set to true to receive an email when the export is complete. Default is true.", + "x-example": false + } + }, + "required": [ + "resourceId", + "filename" + ] + } + } + } + } + } + }, + "\/migrations\/csv\/imports": { + "post": { + "summary": "Import documents from a CSV", + "operationId": "migrationsCreateCSVImport", + "tags": [ + "migrations" + ], + "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCSVImport", + "group": null, + "weight": 590, + "cookies": false, + "type": "", + "demo": "migrations\/create-csv-import.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-import.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "x-example": "<BUCKET_ID>" + }, + "fileId": { + "type": "string", + "description": "File ID.", + "x-example": "<FILE_ID>" + }, + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", + "x-example": "<ID1:ID2>" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "x-example": false + } + }, + "required": [ + "bucketId", + "fileId", + "resourceId" + ] + } + } + } + } + } + }, + "\/migrations\/firebase": { + "post": { + "summary": "Create Firebase migration", + "operationId": "migrationsCreateFirebaseMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFirebaseMigration", + "group": null, + "weight": 584, + "cookies": false, + "type": "", + "demo": "migrations\/create-firebase-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "FirebaseMigrationResource", + "x-enum-keys": [] + } + }, + "serviceAccount": { + "type": "string", + "description": "JSON of the Firebase service account credentials", + "x-example": "<SERVICE_ACCOUNT>" + } + }, + "required": [ + "resources", + "serviceAccount" + ] + } + } + } + } + } + }, + "\/migrations\/firebase\/report": { + "get": { + "summary": "Get Firebase migration report", + "operationId": "migrationsGetFirebaseReport", + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFirebaseReport", + "group": null, + "weight": 585, + "cookies": false, + "type": "", + "demo": "migrations\/get-firebase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "FirebaseMigrationResource", + "x-enum-keys": [] + } + }, + "in": "query" + }, + { + "name": "serviceAccount", + "description": "JSON of the Firebase service account credentials", + "required": true, + "schema": { + "type": "string", + "x-example": "<SERVICE_ACCOUNT>" + }, + "in": "query" + } + ] + } + }, + "\/migrations\/json\/exports": { + "post": { + "summary": "Export documents to JSON", + "operationId": "migrationsCreateJSONExport", + "tags": [ + "migrations" + ], + "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJSONExport", + "group": null, + "weight": 593, + "cookies": false, + "type": "", + "demo": "migrations\/create-json-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-export.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", + "x-example": "<ID1:ID2>" + }, + "filename": { + "type": "string", + "description": "The name of the file to be created for the export, excluding the .json extension.", + "x-example": "<FILENAME>" + }, + "columns": { + "type": "array", + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "x-example": null, + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "notify": { + "type": "boolean", + "description": "Set to true to receive an email when the export is complete. Default is true.", + "x-example": false + } + }, + "required": [ + "resourceId", + "filename" + ] + } + } + } + } + } + }, + "\/migrations\/json\/imports": { + "post": { + "summary": "Import documents from a JSON", + "operationId": "migrationsCreateJSONImport", + "tags": [ + "migrations" + ], + "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJSONImport", + "group": null, + "weight": 592, + "cookies": false, + "type": "", + "demo": "migrations\/create-json-import.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-import.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "x-example": "<BUCKET_ID>" + }, + "fileId": { + "type": "string", + "description": "File ID.", + "x-example": "<FILE_ID>" + }, + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", + "x-example": "<ID1:ID2>" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "x-example": false + } + }, + "required": [ + "bucketId", + "fileId", + "resourceId" + ] + } + } + } + } + } + }, + "\/migrations\/nhost": { + "post": { + "summary": "Create NHost migration", + "operationId": "migrationsCreateNHostMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createNHostMigration", + "group": null, + "weight": 588, + "cookies": false, + "type": "", + "demo": "migrations\/create-n-host-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "NHostMigrationResource", + "x-enum-keys": [] + } + }, + "subdomain": { + "type": "string", + "description": "Source's Subdomain", + "x-example": "<SUBDOMAIN>" + }, + "region": { + "type": "string", + "description": "Source's Region", + "x-example": "<REGION>" + }, + "adminSecret": { + "type": "string", + "description": "Source's Admin Secret", + "x-example": "<ADMIN_SECRET>" + }, + "database": { + "type": "string", + "description": "Source's Database Name", + "x-example": "<DATABASE>" + }, + "username": { + "type": "string", + "description": "Source's Database Username", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Source's Database Password", + "x-example": "<PASSWORD>" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "x-example": null, + "format": "int32" + } + }, + "required": [ + "resources", + "subdomain", + "region", + "adminSecret", + "database", + "username", + "password" + ] + } + } + } + } + } + }, + "\/migrations\/nhost\/report": { + "get": { + "summary": "Get NHost migration report", + "operationId": "migrationsGetNHostReport", + "tags": [ + "migrations" + ], + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getNHostReport", + "group": null, + "weight": 589, + "cookies": false, + "type": "", + "demo": "migrations\/get-n-host-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "NHostMigrationResource", + "x-enum-keys": [] + } + }, + "in": "query" + }, + { + "name": "subdomain", + "description": "Source's Subdomain.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBDOMAIN>" + }, + "in": "query" + }, + { + "name": "region", + "description": "Source's Region.", + "required": true, + "schema": { + "type": "string", + "x-example": "<REGION>" + }, + "in": "query" + }, + { + "name": "adminSecret", + "description": "Source's Admin Secret.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ADMIN_SECRET>" + }, + "in": "query" + }, + { + "name": "database", + "description": "Source's Database Name.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE>" + }, + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USERNAME>" + }, + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PASSWORD>" + }, + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5432 + }, + "in": "query" + } + ] + } + }, + "\/migrations\/supabase": { + "post": { + "summary": "Create Supabase migration", + "operationId": "migrationsCreateSupabaseMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSupabaseMigration", + "group": null, + "weight": 586, + "cookies": false, + "type": "", + "demo": "migrations\/create-supabase-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "SupabaseMigrationResource", + "x-enum-keys": [] + } + }, + "endpoint": { + "type": "string", + "description": "Source's Supabase Endpoint", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "apiKey": { + "type": "string", + "description": "Source's API Key", + "x-example": "<API_KEY>" + }, + "databaseHost": { + "type": "string", + "description": "Source's Database Host", + "x-example": "<DATABASE_HOST>" + }, + "username": { + "type": "string", + "description": "Source's Database Username", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Source's Database Password", + "x-example": "<PASSWORD>" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "x-example": null, + "format": "int32" + } + }, + "required": [ + "resources", + "endpoint", + "apiKey", + "databaseHost", + "username", + "password" + ] + } + } + } + } + } + }, + "\/migrations\/supabase\/report": { + "get": { + "summary": "Get Supabase migration report", + "operationId": "migrationsGetSupabaseReport", + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSupabaseReport", + "group": null, + "weight": 587, + "cookies": false, + "type": "", + "demo": "migrations\/get-supabase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "SupabaseMigrationResource", + "x-enum-keys": [] + } + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Supabase Endpoint.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "apiKey", + "description": "Source's API Key.", + "required": true, + "schema": { + "type": "string", + "x-example": "<API_KEY>" + }, + "in": "query" + }, + { + "name": "databaseHost", + "description": "Source's Database Host.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_HOST>" + }, + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USERNAME>" + }, + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PASSWORD>" + }, + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5432 + }, + "in": "query" + } + ] + } + }, + "\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "migrationsGet", + "tags": [ + "migrations" + ], + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", + "responses": { + "200": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 579, + "cookies": false, + "type": "", + "demo": "migrations\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update retry migration", + "operationId": "migrationsRetry", + "tags": [ + "migrations" + ], + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "retry", + "group": null, + "weight": 580, + "cookies": false, + "type": "", + "demo": "migrations\/retry.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete migration", + "operationId": "migrationsDelete", + "tags": [ + "migrations" + ], + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 581, + "cookies": false, + "type": "", + "demo": "migrations\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesListPresences", + "tags": [ + "presences" + ], + "description": "List presence logs.", + "responses": { + "200": { + "description": "Presences List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presenceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPresences", + "group": "presences", + "weight": 416, + "cookies": false, + "type": "", + "demo": "presences\/list-presences.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/presences\/usage": { + "get": { + "summary": "Get presence usage", + "operationId": "presencesGetUsage", + "tags": [ + "presences" + ], + "description": "Get presence usage metrics and statistics, including the current total of online users and historical online user counts for the selected time range.", + "responses": { + "200": { + "description": "UsagePresence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usagePresence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 414, + "cookies": false, + "type": "", + "demo": "presences\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGetPresence", + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPresence", + "group": "presences", + "weight": 415, + "cookies": false, + "type": "", + "demo": "presences\/get-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsertPresence", + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertPresence", + "group": "presences", + "weight": 413, + "cookies": false, + "type": "", + "demo": "presences\/upsert-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertPresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "userId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "", + "demo": "presences\/upsert-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "<STATUS>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdatePresence", + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePresence", + "group": "presences", + "weight": 417, + "cookies": false, + "type": "", + "demo": "presences\/update-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updatePresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "expiresAt", + "metadata", + "permissions" + ], + "required": [ + "presenceId", + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "", + "demo": "presences\/update-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "<STATUS>", + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "x-example": "{}", + "x-nullable": true + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDeletePresence", + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePresence", + "group": "presences", + "weight": 418, + "cookies": false, + "type": "", + "demo": "presences\/delete-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project": { + "delete": { + "summary": "Delete project", + "operationId": "projectDelete", + "tags": [ + "project" + ], + "description": "Delete a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 594, + "cookies": false, + "type": "", + "demo": "project\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/auth-methods\/{methodId}": { + "patch": { + "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", + "operationId": "projectUpdateAuthMethod", + "tags": [ + "project" + ], + "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAuthMethod", + "group": null, + "weight": 643, + "cookies": false, + "type": "", + "demo": "project\/update-auth-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "methodId", + "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", + "required": true, + "schema": { + "type": "string", + "x-example": "email-password", + "enum": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Auth method status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/keys": { + "get": { + "summary": "List project keys", + "operationId": "projectListKeys", + "tags": [ + "project" + ], + "description": "Get a list of all API keys from the current project.", + "responses": { + "200": { + "description": "API Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/keyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listKeys", + "group": "keys", + "weight": 610, + "cookies": false, + "type": "", + "demo": "project\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project key", + "operationId": "projectCreateKey", + "tags": [ + "project" + ], + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "responses": { + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createKey", + "group": "keys", + "weight": 608, + "cookies": false, + "type": "", + "demo": "project\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "type": "string", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<KEY_ID>" + }, + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + } + } + } + }, + "\/project\/keys\/ephemeral": { + "post": { + "summary": "Create ephemeral project key", + "operationId": "projectCreateEphemeralKey", + "tags": [ + "project" + ], + "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "responses": { + "201": { + "description": "Ephemeral Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ephemeralKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEphemeralKey", + "group": "keys", + "weight": 609, + "cookies": false, + "type": "", + "demo": "project\/create-ephemeral-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "duration": { + "type": "integer", + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "x-example": 1, + "format": "int32" + } + }, + "required": [ + "scopes", + "duration" + ] + } + } + } + } + } + }, + "\/project\/keys\/{keyId}": { + "get": { + "summary": "Get project key", + "operationId": "projectGetKey", + "tags": [ + "project" + ], + "description": "Get a key by its unique ID. ", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getKey", + "group": "keys", + "weight": 611, + "cookies": false, + "type": "", + "demo": "project\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project key", + "operationId": "projectUpdateKey", + "tags": [ + "project" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateKey", + "group": "keys", + "weight": 613, + "cookies": false, + "type": "", + "demo": "project\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project key", + "operationId": "projectDeleteKey", + "tags": [ + "project" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "weight": 612, + "cookies": false, + "type": "", + "demo": "project\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project\/labels": { + "put": { + "summary": "Update project labels", + "operationId": "projectUpdateLabels", + "tags": [ + "project" + ], + "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": null, + "weight": 595, + "cookies": false, + "type": "", + "demo": "project\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/project\/mock-phones": { + "get": { + "summary": "List project mock phones", + "operationId": "projectListMockPhones", + "tags": [ + "project" + ], + "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", + "responses": { + "200": { + "description": "Mock Numbers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMockPhones", + "group": "mocks", + "weight": 628, + "cookies": false, + "type": "", + "demo": "project\/list-mock-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project mock phone", + "operationId": "projectCreateMockPhone", + "tags": [ + "project" + ], + "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", + "responses": { + "201": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMockPhone", + "group": "mocks", + "weight": 627, + "cookies": false, + "type": "", + "demo": "project\/create-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", + "x-example": "+12065550100", + "format": "phone" + }, + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "x-example": "<OTP>" + } + }, + "required": [ + "number", + "otp" + ] + } + } + } + } + } + }, + "\/project\/mock-phones\/{number}": { + "get": { + "summary": "Get project mock phone", + "operationId": "projectGetMockPhone", + "tags": [ + "project" + ], + "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMockPhone", + "group": "mocks", + "weight": 629, + "cookies": false, + "type": "", + "demo": "project\/get-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "tags": [ + "project" + ], + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMockPhone", + "group": "mocks", + "weight": 630, + "cookies": false, + "type": "", + "demo": "project\/update-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", + "tags": [ + "project" + ], + "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMockPhone", + "group": "mocks", + "weight": 631, + "cookies": false, + "type": "", + "demo": "project\/delete-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" + } + ] + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "tags": [ + "project" + ], + "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2 Providers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2ProviderList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Providers", + "group": "oauth2", + "weight": 644, + "cookies": false, + "type": "", + "demo": "project\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/oauth2\/amazon": { + "patch": { + "summary": "Update project OAuth2 Amazon", + "operationId": "projectUpdateOAuth2Amazon", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Amazon configuration.", + "responses": { + "200": { + "description": "OAuth2Amazon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Amazon", + "group": "oauth2", + "weight": 671, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-amazon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/apple": { + "patch": { + "summary": "Update project OAuth2 Apple", + "operationId": "projectUpdateOAuth2Apple", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Apple configuration.", + "responses": { + "200": { + "description": "OAuth2Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Apple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Apple", + "group": "oauth2", + "weight": 686, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-apple.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "serviceId": { + "type": "string", + "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", + "x-example": "<SERVICE_ID>", + "x-nullable": true + }, + "keyId": { + "type": "string", + "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", + "x-example": "<KEY_ID>", + "x-nullable": true + }, + "teamId": { + "type": "string", + "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", + "x-example": "<TEAM_ID>", + "x-nullable": true + }, + "p8File": { + "type": "string", + "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "x-example": "<P8_FILE>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/auth0": { + "patch": { + "summary": "Update project OAuth2 Auth0", + "operationId": "projectUpdateOAuth2Auth0", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Auth0 configuration.", + "responses": { + "200": { + "description": "OAuth2Auth0", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Auth0", + "group": "oauth2", + "weight": 680, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-auth-0.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Auth0 instance. For example: example.us.auth0.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/authentik": { + "patch": { + "summary": "Update project OAuth2 Authentik", + "operationId": "projectUpdateOAuth2Authentik", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Authentik configuration.", + "responses": { + "200": { + "description": "OAuth2Authentik", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Authentik", + "group": "oauth2", + "weight": 679, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-authentik.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Authentik instance. For example: example.authentik.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/autodesk": { + "patch": { + "summary": "Update project OAuth2 Autodesk", + "operationId": "projectUpdateOAuth2Autodesk", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Autodesk configuration.", + "responses": { + "200": { + "description": "OAuth2Autodesk", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Autodesk", + "group": "oauth2", + "weight": 654, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-autodesk.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/bitbucket": { + "patch": { + "summary": "Update project OAuth2 Bitbucket", + "operationId": "projectUpdateOAuth2Bitbucket", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitbucket configuration.", + "responses": { + "200": { + "description": "OAuth2Bitbucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitbucket", + "group": "oauth2", + "weight": 651, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitbucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", + "x-example": "<KEY>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", + "x-example": "<SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/bitly": { + "patch": { + "summary": "Update project OAuth2 Bitly", + "operationId": "projectUpdateOAuth2Bitly", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitly configuration.", + "responses": { + "200": { + "description": "OAuth2Bitly", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitly", + "group": "oauth2", + "weight": 652, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitly.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/box": { + "patch": { + "summary": "Update project OAuth2 Box", + "operationId": "projectUpdateOAuth2Box", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Box configuration.", + "responses": { + "200": { + "description": "OAuth2Box", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Box" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Box", + "group": "oauth2", + "weight": 653, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-box.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/dailymotion": { + "patch": { + "summary": "Update project OAuth2 Dailymotion", + "operationId": "projectUpdateOAuth2Dailymotion", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dailymotion configuration.", + "responses": { + "200": { + "description": "OAuth2Dailymotion", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dailymotion", + "group": "oauth2", + "weight": 650, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dailymotion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", + "x-example": "<API_KEY>", + "x-nullable": true + }, + "apiSecret": { + "type": "string", + "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", + "x-example": "<API_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/discord": { + "patch": { + "summary": "Update project OAuth2 Discord", + "operationId": "projectUpdateOAuth2Discord", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Discord configuration.", + "responses": { + "200": { + "description": "OAuth2Discord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Discord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Discord", + "group": "oauth2", + "weight": 647, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-discord.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/disqus": { + "patch": { + "summary": "Update project OAuth2 Disqus", + "operationId": "projectUpdateOAuth2Disqus", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Disqus configuration.", + "responses": { + "200": { + "description": "OAuth2Disqus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Disqus", + "group": "oauth2", + "weight": 670, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-disqus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "x-example": "<PUBLIC_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/dropbox": { + "patch": { + "summary": "Update project OAuth2 Dropbox", + "operationId": "projectUpdateOAuth2Dropbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dropbox configuration.", + "responses": { + "200": { + "description": "OAuth2Dropbox", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dropbox", + "group": "oauth2", + "weight": 649, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dropbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appKey": { + "type": "string", + "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", + "x-example": "<APP_KEY>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/etsy": { + "patch": { + "summary": "Update project OAuth2 Etsy", + "operationId": "projectUpdateOAuth2Etsy", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Etsy configuration.", + "responses": { + "200": { + "description": "OAuth2Etsy", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Etsy", + "group": "oauth2", + "weight": 672, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-etsy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyString": { + "type": "string", + "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", + "x-example": "<KEY_STRING>", + "x-nullable": true + }, + "sharedSecret": { + "type": "string", + "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", + "x-example": "<SHARED_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/facebook": { + "patch": { + "summary": "Update project OAuth2 Facebook", + "operationId": "projectUpdateOAuth2Facebook", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Facebook configuration.", + "responses": { + "200": { + "description": "OAuth2Facebook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Facebook", + "group": "oauth2", + "weight": 673, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-facebook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", + "x-example": "<APP_ID>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/figma": { + "patch": { + "summary": "Update project OAuth2 Figma", + "operationId": "projectUpdateOAuth2Figma", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Figma configuration.", + "responses": { + "200": { + "description": "OAuth2Figma", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Figma" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Figma", + "group": "oauth2", + "weight": 648, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-figma.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/fusionauth": { + "patch": { + "summary": "Update project OAuth2 FusionAuth", + "operationId": "projectUpdateOAuth2FusionAuth", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 FusionAuth configuration.", + "responses": { + "200": { + "description": "OAuth2FusionAuth", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2FusionAuth", + "group": "oauth2", + "weight": 681, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-fusion-auth.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/github": { + "patch": { + "summary": "Update project OAuth2 GitHub", + "operationId": "projectUpdateOAuth2GitHub", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 GitHub configuration.", + "responses": { + "200": { + "description": "OAuth2GitHub", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Github" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2GitHub", + "group": "oauth2", + "weight": 646, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-git-hub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/gitlab": { + "patch": { + "summary": "Update project OAuth2 Gitlab", + "operationId": "projectUpdateOAuth2Gitlab", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Gitlab configuration.", + "responses": { + "200": { + "description": "OAuth2Gitlab", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Gitlab", + "group": "oauth2", + "weight": 678, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-gitlab.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "x-example": "<SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/google": { + "patch": { + "summary": "Update project OAuth2 Google", + "operationId": "projectUpdateOAuth2Google", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Google configuration.", + "responses": { + "200": { + "description": "OAuth2Google", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Google" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Google", + "group": "oauth2", + "weight": 655, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-google.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/keycloak": { + "patch": { + "summary": "Update project OAuth2 Keycloak", + "operationId": "projectUpdateOAuth2Keycloak", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Keycloak configuration.", + "responses": { + "200": { + "description": "OAuth2Keycloak", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Keycloak", + "group": "oauth2", + "weight": 682, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-keycloak.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Keycloak instance. For example: keycloak.example.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "realmName": { + "type": "string", + "description": "Keycloak realm name. For example: appwrite-realm", + "x-example": "<REALM_NAME>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/kick": { + "patch": { + "summary": "Update project OAuth2 Kick", + "operationId": "projectUpdateOAuth2Kick", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Kick configuration.", + "responses": { + "200": { + "description": "OAuth2Kick", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Kick" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Kick", + "group": "oauth2", + "weight": 685, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-kick.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/linkedin": { + "patch": { + "summary": "Update project OAuth2 Linkedin", + "operationId": "projectUpdateOAuth2Linkedin", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Linkedin configuration.", + "responses": { + "200": { + "description": "OAuth2Linkedin", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Linkedin", + "group": "oauth2", + "weight": 669, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-linkedin.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "primaryClientSecret": { + "type": "string", + "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", + "x-example": "<PRIMARY_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/microsoft": { + "patch": { + "summary": "Update project OAuth2 Microsoft", + "operationId": "projectUpdateOAuth2Microsoft", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Microsoft configuration.", + "responses": { + "200": { + "description": "OAuth2Microsoft", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Microsoft", + "group": "oauth2", + "weight": 687, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-microsoft.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "applicationSecret": { + "type": "string", + "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "x-example": "<APPLICATION_SECRET>", + "x-nullable": true + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", + "x-example": "<TENANT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/notion": { + "patch": { + "summary": "Update project OAuth2 Notion", + "operationId": "projectUpdateOAuth2Notion", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Notion configuration.", + "responses": { + "200": { + "description": "OAuth2Notion", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Notion" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Notion", + "group": "oauth2", + "weight": 666, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-notion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "oauthClientId": { + "type": "string", + "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", + "x-example": "<OAUTH_CLIENT_ID>", + "x-nullable": true + }, + "oauthClientSecret": { + "type": "string", + "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", + "x-example": "<OAUTH_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/oidc": { + "patch": { + "summary": "Update project OAuth2 Oidc", + "operationId": "projectUpdateOAuth2Oidc", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Oidc configuration.", + "responses": { + "200": { + "description": "OAuth2Oidc", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Oidc", + "group": "oauth2", + "weight": 683, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-oidc.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/okta": { + "patch": { + "summary": "Update project OAuth2 Okta", + "operationId": "projectUpdateOAuth2Okta", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Okta configuration.", + "responses": { + "200": { + "description": "OAuth2Okta", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Okta" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Okta", + "group": "oauth2", + "weight": 684, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-okta.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "domain": { + "type": "string", + "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", + "x-example": null, + "x-nullable": true + }, + "authorizationServerId": { + "type": "string", + "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", + "x-example": "<AUTHORIZATION_SERVER_ID>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/paypal": { + "patch": { + "summary": "Update project OAuth2 Paypal", + "operationId": "projectUpdateOAuth2Paypal", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Paypal configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Paypal", + "group": "oauth2", + "weight": 676, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/paypalSandbox": { + "patch": { + "summary": "Update project OAuth2 PaypalSandbox", + "operationId": "projectUpdateOAuth2PaypalSandbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 PaypalSandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2PaypalSandbox", + "group": "oauth2", + "weight": 677, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/podio": { + "patch": { + "summary": "Update project OAuth2 Podio", + "operationId": "projectUpdateOAuth2Podio", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Podio configuration.", + "responses": { + "200": { + "description": "OAuth2Podio", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Podio" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Podio", + "group": "oauth2", + "weight": 665, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-podio.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/salesforce": { + "patch": { + "summary": "Update project OAuth2 Salesforce", + "operationId": "projectUpdateOAuth2Salesforce", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Salesforce configuration.", + "responses": { + "200": { + "description": "OAuth2Salesforce", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Salesforce", + "group": "oauth2", + "weight": 667, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-salesforce.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "customerSecret": { + "type": "string", + "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", + "x-example": "<CUSTOMER_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/slack": { + "patch": { + "summary": "Update project OAuth2 Slack", + "operationId": "projectUpdateOAuth2Slack", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Slack configuration.", + "responses": { + "200": { + "description": "OAuth2Slack", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Slack" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Slack", + "group": "oauth2", + "weight": 664, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-slack.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/spotify": { + "patch": { + "summary": "Update project OAuth2 Spotify", + "operationId": "projectUpdateOAuth2Spotify", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Spotify configuration.", + "responses": { + "200": { + "description": "OAuth2Spotify", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Spotify", + "group": "oauth2", + "weight": 663, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-spotify.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/stripe": { + "patch": { + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Stripe configuration.", + "responses": { + "200": { + "description": "OAuth2Stripe", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Stripe", + "group": "oauth2", + "weight": 662, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-stripe.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "apiSecretKey": { + "type": "string", + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "x-example": "<API_SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/tradeshift": { + "patch": { + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Tradeshift", + "group": "oauth2", + "weight": 674, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/tradeshiftBox": { + "patch": { + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2TradeshiftSandbox", + "group": "oauth2", + "weight": 675, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/twitch": { + "patch": { + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Twitch configuration.", + "responses": { + "200": { + "description": "OAuth2Twitch", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Twitch", + "group": "oauth2", + "weight": 661, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-twitch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/wordpress": { + "patch": { + "summary": "Update project OAuth2 WordPress", + "operationId": "projectUpdateOAuth2WordPress", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 WordPress configuration.", + "responses": { + "200": { + "description": "OAuth2WordPress", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2WordPress", + "group": "oauth2", + "weight": 660, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-word-press.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/x": { + "patch": { + "summary": "Update project OAuth2 X", + "operationId": "projectUpdateOAuth2X", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 X configuration.", + "responses": { + "200": { + "description": "OAuth2X", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2X" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2X", + "group": "oauth2", + "weight": 659, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2x.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/yahoo": { + "patch": { + "summary": "Update project OAuth2 Yahoo", + "operationId": "projectUpdateOAuth2Yahoo", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yahoo configuration.", + "responses": { + "200": { + "description": "OAuth2Yahoo", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yahoo", + "group": "oauth2", + "weight": 668, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yahoo.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/yandex": { + "patch": { + "summary": "Update project OAuth2 Yandex", + "operationId": "projectUpdateOAuth2Yandex", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yandex configuration.", + "responses": { + "200": { + "description": "OAuth2Yandex", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yandex", + "group": "oauth2", + "weight": 658, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yandex.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/zoho": { + "patch": { + "summary": "Update project OAuth2 Zoho", + "operationId": "projectUpdateOAuth2Zoho", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoho configuration.", + "responses": { + "200": { + "description": "OAuth2Zoho", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoho", + "group": "oauth2", + "weight": 657, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/zoom": { + "patch": { + "summary": "Update project OAuth2 Zoom", + "operationId": "projectUpdateOAuth2Zoom", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoom configuration.", + "responses": { + "200": { + "description": "OAuth2Zoom", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoom", + "group": "oauth2", + "weight": 656, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoom.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/{provider}": { + "get": { + "summary": "Get project OAuth2 provider", + "operationId": "projectGetOAuth2Provider", + "tags": [ + "project" + ], + "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getOAuth2Provider", + "group": "oauth2", + "weight": 645, + "cookies": false, + "type": "", + "demo": "project\/get-o-auth-2-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 provider key. For example: github, google, apple.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER>" + }, + "in": "path" + } + ] + } + }, + "\/project\/platforms": { + "get": { + "summary": "List project platforms", + "operationId": "projectListPlatforms", + "tags": [ + "project" + ], + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", + "responses": { + "200": { + "description": "Platforms List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPlatforms", + "group": "platforms", + "weight": 626, + "cookies": false, + "type": "", + "demo": "project\/list-platforms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/platforms\/android": { + "post": { + "summary": "Create project Android platform", + "operationId": "projectCreateAndroidPlatform", + "tags": [ + "project" + ], + "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Android", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformAndroid" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAndroidPlatform", + "group": "platforms", + "weight": 622, + "cookies": false, + "type": "", + "demo": "project\/create-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "platformId", + "name", + "applicationId" + ] + } + } + } + } + } + }, + "\/project\/platforms\/android\/{platformId}": { + "put": { + "summary": "Update project Android platform", + "operationId": "projectUpdateAndroidPlatform", + "tags": [ + "project" + ], + "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", + "responses": { + "200": { + "description": "Platform Android", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformAndroid" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAndroidPlatform", + "group": "platforms", + "weight": 617, + "cookies": false, + "type": "", + "demo": "project\/update-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "name", + "applicationId" + ] + } + } + } + } + } + }, + "\/project\/platforms\/apple": { + "post": { + "summary": "Create project Apple platform", + "operationId": "projectCreateApplePlatform", + "tags": [ + "project" + ], + "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformApple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createApplePlatform", + "group": "platforms", + "weight": 621, + "cookies": false, + "type": "", + "demo": "project\/create-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "platformId", + "name", + "bundleIdentifier" + ] + } + } + } + } + } + }, + "\/project\/platforms\/apple\/{platformId}": { + "put": { + "summary": "Update project Apple platform", + "operationId": "projectUpdateApplePlatform", + "tags": [ + "project" + ], + "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", + "responses": { + "200": { + "description": "Platform Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformApple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateApplePlatform", + "group": "platforms", + "weight": 616, + "cookies": false, + "type": "", + "demo": "project\/update-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "name", + "bundleIdentifier" + ] + } + } + } + } + } + }, + "\/project\/platforms\/linux": { + "post": { + "summary": "Create project Linux platform", + "operationId": "projectCreateLinuxPlatform", + "tags": [ + "project" + ], + "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Linux", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLinuxPlatform", + "group": "platforms", + "weight": 624, + "cookies": false, + "type": "", + "demo": "project\/create-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/linux\/{platformId}": { + "put": { + "summary": "Update project Linux platform", + "operationId": "projectUpdateLinuxPlatform", + "tags": [ + "project" + ], + "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", + "responses": { + "200": { + "description": "Platform Linux", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLinuxPlatform", + "group": "platforms", + "weight": 619, + "cookies": false, + "type": "", + "demo": "project\/update-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "name", + "packageName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/web": { + "post": { + "summary": "Create project web platform", + "operationId": "projectCreateWebPlatform", + "tags": [ + "project" + ], + "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Web", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWeb" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWebPlatform", + "group": "platforms", + "weight": 620, + "cookies": false, + "type": "", + "demo": "project\/create-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "x-example": "app.example.com" + } + }, + "required": [ + "platformId", + "name", + "hostname" + ] + } + } + } + } + } + }, + "\/project\/platforms\/web\/{platformId}": { + "put": { + "summary": "Update project web platform", + "operationId": "projectUpdateWebPlatform", + "tags": [ + "project" + ], + "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", + "responses": { + "200": { + "description": "Platform Web", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWeb" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWebPlatform", + "group": "platforms", + "weight": 615, + "cookies": false, + "type": "", + "demo": "project\/update-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "x-example": "app.example.com" + } + }, + "required": [ + "name", + "hostname" + ] + } + } + } + } + } + }, + "\/project\/platforms\/windows": { + "post": { + "summary": "Create project Windows platform", + "operationId": "projectCreateWindowsPlatform", + "tags": [ + "project" + ], + "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Windows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWindowsPlatform", + "group": "platforms", + "weight": 623, + "cookies": false, + "type": "", + "demo": "project\/create-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageIdentifierName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/windows\/{platformId}": { + "put": { + "summary": "Update project Windows platform", + "operationId": "projectUpdateWindowsPlatform", + "tags": [ + "project" + ], + "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", + "responses": { + "200": { + "description": "Platform Windows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWindowsPlatform", + "group": "platforms", + "weight": 618, + "cookies": false, + "type": "", + "demo": "project\/update-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "name", + "packageIdentifierName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/{platformId}": { + "get": { + "summary": "Get project platform", + "operationId": "projectGetPlatform", + "tags": [ + "project" + ], + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", + "responses": { + "200": { + "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPlatform", + "group": "platforms", + "weight": 625, + "cookies": false, + "type": "", + "demo": "project\/get-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete project platform", + "operationId": "projectDeletePlatform", + "tags": [ + "project" + ], + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePlatform", + "group": "platforms", + "weight": 614, + "cookies": false, + "type": "", + "demo": "project\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project\/policies": { + "get": { + "summary": "List project policies", + "operationId": "projectListPolicies", + "tags": [ + "project" + ], + "description": "Get a list of all project policies and their current configuration.", + "responses": { + "200": { + "description": "Policies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/policyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPolicies", + "group": "policies", + "weight": 632, + "cookies": false, + "type": "", + "demo": "project\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/policies\/membership-privacy": { + "patch": { + "summary": "Update membership privacy policy", + "operationId": "projectUpdateMembershipPrivacyPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipPrivacyPolicy", + "group": "policies", + "weight": 634, + "cookies": false, + "type": "", + "demo": "project\/update-membership-privacy-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "boolean", + "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true if you want make user email visible to all team members, or false to hide it.", + "x-example": false + }, + "userPhone": { + "type": "boolean", + "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", + "x-example": false + }, + "userName": { + "type": "boolean", + "description": "Set to true if you want make user name visible to all team members, or false to hide it.", + "x-example": false + }, + "userMFA": { + "type": "boolean", + "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/project\/policies\/password-dictionary": { + "patch": { + "summary": "Update password dictionary policy", + "operationId": "projectUpdatePasswordDictionaryPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordDictionaryPolicy", + "group": "policies", + "weight": 635, + "cookies": false, + "type": "", + "demo": "project\/update-password-dictionary-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-history": { + "patch": { + "summary": "Update password history policy", + "operationId": "projectUpdatePasswordHistoryPolicy", + "tags": [ + "project" + ], + "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordHistoryPolicy", + "group": "policies", + "weight": 636, + "cookies": false, + "type": "", + "demo": "project\/update-password-history-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-personal-data": { + "patch": { + "summary": "Update password personal data policy", + "operationId": "projectUpdatePasswordPersonalDataPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordPersonalDataPolicy", + "group": "policies", + "weight": 637, + "cookies": false, + "type": "", + "demo": "project\/update-password-personal-data-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-alert": { + "patch": { + "summary": "Update session alert policy", + "operationId": "projectUpdateSessionAlertPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionAlertPolicy", + "group": "policies", + "weight": 638, + "cookies": false, + "type": "", + "demo": "project\/update-session-alert-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-duration": { + "patch": { + "summary": "Update session duration policy", + "operationId": "projectUpdateSessionDurationPolicy", + "tags": [ + "project" + ], + "description": "Update maximum duration how long sessions created within a project should stay active for.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionDurationPolicy", + "group": "policies", + "weight": 639, + "cookies": false, + "type": "", + "demo": "project\/update-session-duration-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "duration" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-invalidation": { + "patch": { + "summary": "Update session invalidation policy", + "operationId": "projectUpdateSessionInvalidationPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionInvalidationPolicy", + "group": "policies", + "weight": 640, + "cookies": false, + "type": "", + "demo": "project\/update-session-invalidation-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-limit": { + "patch": { + "summary": "Update session limit policy", + "operationId": "projectUpdateSessionLimitPolicy", + "tags": [ + "project" + ], + "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionLimitPolicy", + "group": "policies", + "weight": 641, + "cookies": false, + "type": "", + "demo": "project\/update-session-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/user-limit": { + "patch": { + "summary": "Update user limit policy", + "operationId": "projectUpdateUserLimitPolicy", + "tags": [ + "project" + ], + "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUserLimitPolicy", + "group": "policies", + "weight": 642, + "cookies": false, + "type": "", + "demo": "project\/update-user-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/{policyId}": { + "get": { + "summary": "Get project policy", + "operationId": "projectGetPolicy", + "tags": [ + "project" + ], + "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", + "responses": { + "200": { + "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPolicy", + "group": "policies", + "weight": 633, + "cookies": false, + "type": "", + "demo": "project\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "required": true, + "schema": { + "type": "string", + "x-example": "password-dictionary", + "enum": [ + "password-dictionary", + "password-history", + "password-personal-data", + "session-alert", + "session-duration", + "session-invalidation", + "session-limit", + "user-limit", + "membership-privacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/project\/protocols\/{protocolId}": { + "patch": { + "summary": "Update project protocol", + "operationId": "projectUpdateProtocol", + "tags": [ + "project" + ], + "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateProtocol", + "group": null, + "weight": 596, + "cookies": false, + "type": "", + "demo": "project\/update-protocol.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "protocolId", + "description": "Protocol name. Can be one of: rest, graphql, websocket", + "required": true, + "schema": { + "type": "string", + "x-example": "rest", + "enum": [ + "rest", + "graphql", + "websocket" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Protocol status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/services\/{serviceId}": { + "patch": { + "summary": "Update project service", + "operationId": "projectUpdateService", + "tags": [ + "project" + ], + "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateService", + "group": null, + "weight": 597, + "cookies": false, + "type": "", + "demo": "project\/update-service.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "serviceId", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", + "required": true, + "schema": { + "type": "string", + "x-example": "account", + "enum": [ + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Service status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/smtp": { + "patch": { + "summary": "Update project SMTP configuration", + "operationId": "projectUpdateSMTP", + "tags": [ + "project" + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSMTP", + "group": "smtp", + "weight": 598, + "cookies": false, + "type": "", + "demo": "project\/update-smtp.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "SMTP server hostname (domain)", + "x-example": null, + "x-nullable": true + }, + "port": { + "type": "integer", + "description": "SMTP server port", + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "SMTP server username. Leave empty for no authorization.", + "x-example": "<USERNAME>", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", + "x-example": "<PASSWORD>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email address shown in inbox as the sender of the email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name shown in inbox as the sender of the email.", + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Email used when user replies to the email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Name used when user replies to the email.", + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + }, + "secure": { + "type": "string", + "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": null, + "x-enum-keys": [], + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/smtp\/tests": { + "post": { + "summary": "Create project SMTP test", + "operationId": "projectCreateSMTPTest", + "tags": [ + "project" + ], + "description": "Send a test email to verify SMTP configuration. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSMTPTest", + "group": "smtp", + "weight": 599, + "cookies": false, + "type": "", + "demo": "project\/create-smtp-test.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + } + } + } + } + } + }, + "\/project\/templates\/email": { + "get": { + "summary": "List project email templates", + "operationId": "projectListEmailTemplates", + "tags": [ + "project" + ], + "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", + "responses": { + "200": { + "description": "Email Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplateList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listEmailTemplates", + "group": "templates", + "weight": 600, + "cookies": false, + "type": "", + "demo": "project\/list-email-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "patch": { + "summary": "Update project email template", + "operationId": "projectUpdateEmailTemplate", + "tags": [ + "project" + ], + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailTemplate", + "group": "templates", + "weight": 602, + "cookies": false, + "type": "", + "demo": "project\/update-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [] + }, + "locale": { + "type": "string", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [] + }, + "subject": { + "type": "string", + "description": "Subject of the email template. Can be up to 255 characters.", + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "message": { + "type": "string", + "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", + "x-example": "<MESSAGE>", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name of the email sender.", + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Reply to name.", + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + } + }, + "required": [ + "templateId" + ] + } + } + } + } + } + }, + "\/project\/templates\/email\/{templateId}": { + "get": { + "summary": "Get project email template", + "operationId": "projectGetEmailTemplate", + "tags": [ + "project" + ], + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getEmailTemplate", + "group": "templates", + "weight": 601, + "cookies": false, + "type": "", + "demo": "project\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "required": true, + "schema": { + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "locale", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/project\/usage": { + "get": { + "summary": "Get project usage stats", + "operationId": "projectGetUsage", + "tags": [ + "project" + ], + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", + "responses": { + "200": { + "description": "UsageProject", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageProject" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 61, + "cookies": false, + "type": "", + "demo": "project\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "startDate", + "description": "Starting date for the usage", + "required": true, + "schema": { + "type": "string", + "format": "datetime", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "in": "query" + }, + { + "name": "endDate", + "description": "End date for the usage", + "required": true, + "schema": { + "type": "string", + "format": "datetime", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "in": "query" + }, + { + "name": "period", + "description": "Period used", + "required": false, + "schema": { + "type": "string", + "x-example": "1h", + "enum": [ + "1h", + "1d" + ], + "x-enum-name": "ProjectUsageRange", + "x-enum-keys": [ + "One Hour", + "One Day" + ], + "default": "1d" + }, + "in": "query" + } + ] + } + }, + "\/project\/variables": { + "get": { + "summary": "List project variables", + "operationId": "projectListVariables", + "tags": [ + "project" + ], + "description": "Get a list of all project environment variables.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 604, + "cookies": false, + "type": "", + "demo": "project\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project variable", + "operationId": "projectCreateVariable", + "tags": [ + "project" + ], + "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 603, + "cookies": false, + "type": "", + "demo": "project\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<VARIABLE_ID>" + }, + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "x-example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + } + } + } + }, + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get project variable", + "operationId": "projectGetVariable", + "tags": [ + "project" + ], + "description": "Get a variable by its unique ID. ", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 605, + "cookies": false, + "type": "", + "demo": "project\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project variable", + "operationId": "projectUpdateVariable", + "tags": [ + "project" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 607, + "cookies": false, + "type": "", + "demo": "project\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete project variable", + "operationId": "projectDeleteVariable", + "tags": [ + "project" + ], + "description": "Delete a variable by its unique ID. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 606, + "cookies": false, + "type": "", + "demo": "project\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects": { + "get": { + "summary": "List projects", + "operationId": "projectsList", + "tags": [ + "projects" + ], + "description": "Get a list of all projects. You can use the query params to filter your results. ", + "responses": { + "200": { + "description": "Projects List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/projectList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "projects", + "weight": 408, + "cookies": false, + "type": "", + "demo": "projects\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project", + "operationId": "projectsCreate", + "tags": [ + "projects" + ], + "description": "Create a new project. You can create a maximum of 100 projects per account. ", + "responses": { + "201": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "projects", + "weight": 406, + "cookies": false, + "type": "", + "demo": "projects\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "x-example": "<TEAM_ID>" + }, + "region": { + "type": "string", + "description": "Project Region.", + "x-example": "default", + "enum": [ + "default" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "description": { + "type": "string", + "description": "Project description. Max length: 256 chars.", + "x-example": "<DESCRIPTION>" + }, + "logo": { + "type": "string", + "description": "Project logo.", + "x-example": "<LOGO>" + }, + "url": { + "type": "string", + "description": "Project URL.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "legalName": { + "type": "string", + "description": "Project legal Name. Max length: 256 chars.", + "x-example": "<LEGAL_NAME>" + }, + "legalCountry": { + "type": "string", + "description": "Project legal Country. Max length: 256 chars.", + "x-example": "<LEGAL_COUNTRY>" + }, + "legalState": { + "type": "string", + "description": "Project legal State. Max length: 256 chars.", + "x-example": "<LEGAL_STATE>" + }, + "legalCity": { + "type": "string", + "description": "Project legal City. Max length: 256 chars.", + "x-example": "<LEGAL_CITY>" + }, + "legalAddress": { + "type": "string", + "description": "Project legal Address. Max length: 256 chars.", + "x-example": "<LEGAL_ADDRESS>" + }, + "legalTaxId": { + "type": "string", + "description": "Project legal Tax ID. Max length: 256 chars.", + "x-example": "<LEGAL_TAX_ID>" + } + }, + "required": [ + "projectId", + "name", + "teamId" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}": { + "get": { + "summary": "Get project", + "operationId": "projectsGet", + "tags": [ + "projects" + ], + "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "projects", + "weight": 57, + "cookies": false, + "type": "", + "demo": "projects\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update project", + "operationId": "projectsUpdate", + "tags": [ + "projects" + ], + "description": "Update a project by its unique ID.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "projects", + "weight": 407, + "cookies": false, + "type": "", + "demo": "projects\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Project description. Max length: 256 chars.", + "x-example": "<DESCRIPTION>" + }, + "logo": { + "type": "string", + "description": "Project logo.", + "x-example": "<LOGO>" + }, + "url": { + "type": "string", + "description": "Project URL.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "legalName": { + "type": "string", + "description": "Project legal name. Max length: 256 chars.", + "x-example": "<LEGAL_NAME>" + }, + "legalCountry": { + "type": "string", + "description": "Project legal country. Max length: 256 chars.", + "x-example": "<LEGAL_COUNTRY>" + }, + "legalState": { + "type": "string", + "description": "Project legal state. Max length: 256 chars.", + "x-example": "<LEGAL_STATE>" + }, + "legalCity": { + "type": "string", + "description": "Project legal city. Max length: 256 chars.", + "x-example": "<LEGAL_CITY>" + }, + "legalAddress": { + "type": "string", + "description": "Project legal address. Max length: 256 chars.", + "x-example": "<LEGAL_ADDRESS>" + }, + "legalTaxId": { + "type": "string", + "description": "Project legal tax ID. Max length: 256 chars.", + "x-example": "<LEGAL_TAX_ID>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/dev-keys": { + "get": { + "summary": "List dev keys", + "operationId": "projectsListDevKeys", + "tags": [ + "projects" + ], + "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "responses": { + "200": { + "description": "Dev Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKeyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDevKeys", + "group": "devKeys", + "weight": 404, + "cookies": false, + "type": "", + "demo": "projects\/list-dev-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create dev key", + "operationId": "projectsCreateDevKey", + "tags": [ + "projects" + ], + "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "responses": { + "201": { + "description": "DevKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDevKey", + "group": "devKeys", + "weight": 401, + "cookies": false, + "type": "", + "demo": "projects\/create-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + } + }, + "required": [ + "name", + "expire" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/dev-keys\/{keyId}": { + "get": { + "summary": "Get dev key", + "operationId": "projectsGetDevKey", + "tags": [ + "projects" + ], + "description": "Get a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", + "responses": { + "200": { + "description": "DevKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDevKey", + "group": "devKeys", + "weight": 403, + "cookies": false, + "type": "", + "demo": "projects\/get-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update dev key", + "operationId": "projectsUpdateDevKey", + "tags": [ + "projects" + ], + "description": "Update a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", + "responses": { + "200": { + "description": "DevKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDevKey", + "group": "devKeys", + "weight": 402, + "cookies": false, + "type": "", + "demo": "projects\/update-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + } + }, + "required": [ + "name", + "expire" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete dev key", + "operationId": "projectsDeleteDevKey", + "tags": [ + "projects" + ], + "description": "Delete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDevKey", + "group": "devKeys", + "weight": 405, + "cookies": false, + "type": "", + "demo": "projects\/delete-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/schedules": { + "get": { + "summary": "List schedules", + "operationId": "projectsListSchedules", + "tags": [ + "projects" + ], + "description": "Get a list of all the project's schedules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Schedules List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/scheduleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSchedules", + "group": "schedules", + "weight": 412, + "cookies": false, + "type": "", + "demo": "projects\/list-schedules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-schedules.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create schedule", + "operationId": "projectsCreateSchedule", + "tags": [ + "projects" + ], + "description": "Create a new schedule for a resource.", + "responses": { + "201": { + "description": "Schedule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/schedule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSchedule", + "group": "schedules", + "weight": 410, + "cookies": false, + "type": "", + "demo": "projects\/create-schedule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-schedule.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "The resource type for the schedule. Possible values: function, execution, message.", + "x-example": "function", + "enum": [ + "function", + "execution", + "message" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "resourceId": { + "type": "string", + "description": "The resource ID to associate with this schedule.", + "x-example": "<RESOURCE_ID>" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON expression.", + "x-example": null + }, + "active": { + "type": "boolean", + "description": "Whether the schedule is active.", + "x-example": false + }, + "data": { + "type": "object", + "description": "Schedule data as a JSON string. Used to store resource-specific context needed for execution.", + "x-example": "{}" + } + }, + "required": [ + "resourceType", + "resourceId", + "schedule" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/schedules\/{scheduleId}": { + "get": { + "summary": "Get schedule", + "operationId": "projectsGetSchedule", + "tags": [ + "projects" + ], + "description": "Get a schedule by its unique ID.", + "responses": { + "200": { + "description": "Schedule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/schedule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSchedule", + "group": "schedules", + "weight": 411, + "cookies": false, + "type": "", + "demo": "projects\/get-schedule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-schedule.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "scheduleId", + "description": "Schedule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SCHEDULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/team": { + "patch": { + "summary": "Update project team", + "operationId": "projectsUpdateTeam", + "tags": [ + "projects" + ], + "description": "Update the team ID of a project allowing for it to be transferred to another team.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "projects", + "weight": 409, + "cookies": false, + "type": "", + "demo": "projects\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer project to.", + "x-example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/proxy\/rules": { + "get": { + "summary": "List rules", + "operationId": "proxyListRules", + "tags": [ + "proxy" + ], + "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rule List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRuleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRules", + "group": null, + "weight": 521, + "cookies": false, + "type": "", + "demo": "proxy\/list-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/proxy\/rules\/api": { + "post": { + "summary": "Create API rule", + "operationId": "proxyCreateAPIRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for serving Appwrite's API on custom domain.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAPIRule", + "group": null, + "weight": 516, + "cookies": false, + "type": "", + "demo": "proxy\/create-api-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + } + }, + "required": [ + "domain" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/function": { + "post": { + "summary": "Create function rule", + "operationId": "proxyCreateFunctionRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for executing Appwrite Function on custom domain.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFunctionRule", + "group": null, + "weight": 518, + "cookies": false, + "type": "", + "demo": "proxy\/create-function-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + }, + "functionId": { + "type": "string", + "description": "ID of function to be executed.", + "x-example": "<FUNCTION_ID>" + }, + "branch": { + "type": "string", + "description": "Name of VCS branch to deploy changes automatically", + "x-example": "<BRANCH>" + } + }, + "required": [ + "domain", + "functionId" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/redirect": { + "post": { + "summary": "Create Redirect rule", + "operationId": "proxyCreateRedirectRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for to redirect from custom domain to another domain.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRedirectRule", + "group": null, + "weight": 519, + "cookies": false, + "type": "", + "demo": "proxy\/create-redirect-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + }, + "url": { + "type": "string", + "description": "Target URL of redirection", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "statusCode": { + "type": "string", + "description": "Status code of redirection", + "x-example": "301", + "enum": [ + "301", + "302", + "307", + "308" + ], + "x-enum-name": null, + "x-enum-keys": [ + "Moved Permanently 301", + "Found 302", + "Temporary Redirect 307", + "Permanent Redirect 308" + ] + }, + "resourceId": { + "type": "string", + "description": "ID of parent resource.", + "x-example": "<RESOURCE_ID>" + }, + "resourceType": { + "type": "string", + "description": "Type of parent resource.", + "x-example": "site", + "enum": [ + "site", + "function" + ], + "x-enum-name": "ProxyResourceType", + "x-enum-keys": [ + "Site", + "Function" + ] + } + }, + "required": [ + "domain", + "url", + "statusCode", + "resourceId", + "resourceType" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/site": { + "post": { + "summary": "Create site rule", + "operationId": "proxyCreateSiteRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for serving Appwrite Site on custom domain.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSiteRule", + "group": null, + "weight": 517, + "cookies": false, + "type": "", + "demo": "proxy\/create-site-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + }, + "siteId": { + "type": "string", + "description": "ID of site to be executed.", + "x-example": "<SITE_ID>" + }, + "branch": { + "type": "string", + "description": "Name of VCS branch to deploy changes automatically", + "x-example": "<BRANCH>" + } + }, + "required": [ + "domain", + "siteId" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/{ruleId}": { + "get": { + "summary": "Get rule", + "operationId": "proxyGetRule", + "tags": [ + "proxy" + ], + "description": "Get a proxy rule by its unique ID.", + "responses": { + "200": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRule", + "group": null, + "weight": 520, + "cookies": false, + "type": "", + "demo": "proxy\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RULE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete rule", + "operationId": "proxyDeleteRule", + "tags": [ + "proxy" + ], + "description": "Delete a proxy rule by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRule", + "group": null, + "weight": 522, + "cookies": false, + "type": "", + "demo": "proxy\/delete-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/proxy\/rules\/{ruleId}\/verification": { + "patch": { + "summary": "Update rule verification status", + "operationId": "proxyUpdateRuleVerification", + "tags": [ + "proxy" + ], + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", + "responses": { + "200": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRuleVerification", + "group": null, + "weight": 523, + "cookies": false, + "type": "", + "demo": "proxy\/update-rule-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites": { + "get": { + "summary": "List sites", + "operationId": "sitesList", + "tags": [ + "sites" + ], + "description": "Get a list of all the project's sites. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Sites List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/siteList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "sites", + "weight": 476, + "cookies": false, + "type": "", + "demo": "sites\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create site", + "operationId": "sitesCreate", + "tags": [ + "sites" + ], + "description": "Create a new site.", + "responses": { + "201": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "sites", + "weight": 474, + "cookies": false, + "type": "", + "demo": "sites\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "siteId": { + "type": "string", + "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<SITE_ID>" + }, + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "x-example": "<FALLBACK_FILE>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "siteId", + "name", + "framework", + "buildRuntime" + ] + } + } + } + } + } + }, + "\/sites\/frameworks": { + "get": { + "summary": "List frameworks", + "operationId": "sitesListFrameworks", + "tags": [ + "sites" + ], + "description": "Get a list of all frameworks that are currently available on the server instance.", + "responses": { + "200": { + "description": "Frameworks List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/frameworkList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFrameworks", + "group": "frameworks", + "weight": 479, + "cookies": false, + "type": "", + "demo": "sites\/list-frameworks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "sitesListSpecifications", + "tags": [ + "sites" + ], + "description": "List allowed site specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "frameworks", + "weight": 502, + "cookies": false, + "type": "", + "demo": "sites\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/templates": { + "get": { + "summary": "List templates", + "operationId": "sitesListTemplates", + "tags": [ + "sites" + ], + "description": "List available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", + "responses": { + "200": { + "description": "Site Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateSiteList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTemplates", + "group": "templates", + "weight": 498, + "cookies": false, + "type": "", + "demo": "sites\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "frameworks", + "description": "List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "portfolio", + "starter", + "events", + "ecommerce", + "documentation", + "blog", + "ai", + "forms", + "dashboard" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/sites\/templates\/{templateId}": { + "get": { + "summary": "Get site template", + "operationId": "sitesGetTemplate", + "tags": [ + "sites" + ], + "description": "Get a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", + "responses": { + "200": { + "description": "Template Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateSite" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTemplate", + "group": "templates", + "weight": 499, + "cookies": false, + "type": "", + "demo": "sites\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEMPLATE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/usage": { + "get": { + "summary": "Get sites usage", + "operationId": "sitesListUsage", + "tags": [ + "sites" + ], + "description": "Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageSites", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageSites" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 500, + "cookies": false, + "type": "", + "demo": "sites\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}": { + "get": { + "summary": "Get site", + "operationId": "sitesGet", + "tags": [ + "sites" + ], + "description": "Get a site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "sites", + "weight": 475, + "cookies": false, + "type": "", + "demo": "sites\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update site", + "operationId": "sitesUpdate", + "tags": [ + "sites" + ], + "description": "Update site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "sites", + "weight": 477, + "cookies": false, + "type": "", + "demo": "sites\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "x-example": "<FALLBACK_FILE>" + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name", + "framework" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete site", + "operationId": "sitesDelete", + "tags": [ + "sites" + ], + "description": "Delete a site by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "sites", + "weight": 478, + "cookies": false, + "type": "", + "demo": "sites\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployment": { + "patch": { + "summary": "Update site's deployment", + "operationId": "sitesUpdateSiteDeployment", + "tags": [ + "sites" + ], + "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSiteDeployment", + "group": "sites", + "weight": 485, + "cookies": false, + "type": "", + "demo": "sites\/update-site-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "sitesListDeployments", + "tags": [ + "sites" + ], + "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deploymentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 484, + "cookies": false, + "type": "", + "demo": "sites\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "sitesCreateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 480, + "cookies": false, + "type": "upload", + "demo": "sites\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "installCommand": { + "type": "string", + "description": "Install Commands.", + "x-example": "<INSTALL_COMMAND>", + "x-nullable": true + }, + "buildCommand": { + "type": "string", + "description": "Build Commands.", + "x-example": "<BUILD_COMMAND>", + "x-nullable": true + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory.", + "x-example": "<OUTPUT_DIRECTORY>", + "x-nullable": true + }, + "code": { + "type": "string", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "x-example": null, + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "code" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "sitesCreateDuplicateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 488, + "cookies": false, + "type": "", + "demo": "sites\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "sitesCreateTemplateDeployment", + "tags": [ + "sites" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 481, + "cookies": false, + "type": "", + "demo": "sites\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to site code in the template repo.", + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "sitesCreateVcsDeployment", + "tags": [ + "sites" + ], + "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 482, + "cookies": false, + "type": "", + "demo": "sites\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "sitesGetDeployment", + "tags": [ + "sites" + ], + "description": "Get a site deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 483, + "cookies": false, + "type": "", + "demo": "sites\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "sitesDeleteDeployment", + "tags": [ + "sites" + ], + "description": "Delete a site deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 486, + "cookies": false, + "type": "", + "demo": "sites\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "sitesGetDeploymentDownload", + "tags": [ + "sites" + ], + "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 487, + "cookies": false, + "type": "location", + "demo": "sites\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source" + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "sitesUpdateDeploymentStatus", + "tags": [ + "sites" + ], + "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 489, + "cookies": false, + "type": "", + "demo": "sites\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/logs": { + "get": { + "summary": "List logs", + "operationId": "sitesListLogs", + "tags": [ + "sites" + ], + "description": "Get a list of all site logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 491, + "cookies": false, + "type": "", + "demo": "sites\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/logs\/{logId}": { + "get": { + "summary": "Get log", + "operationId": "sitesGetLog", + "tags": [ + "sites" + ], + "description": "Get a site request log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getLog", + "group": "logs", + "weight": 490, + "cookies": false, + "type": "", + "demo": "sites\/get-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<LOG_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete log", + "operationId": "sitesDeleteLog", + "tags": [ + "sites" + ], + "description": "Delete a site log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteLog", + "group": "logs", + "weight": 492, + "cookies": false, + "type": "", + "demo": "sites\/delete-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<LOG_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/usage": { + "get": { + "summary": "Get site usage", + "operationId": "sitesGetUsage", + "tags": [ + "sites" + ], + "description": "Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageSite", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageSite" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 501, + "cookies": false, + "type": "", + "demo": "sites\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "sitesListVariables", + "tags": [ + "sites" + ], + "description": "Get a list of all variables of a specific site.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 495, + "cookies": false, + "type": "", + "demo": "sites\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "sitesCreateVariable", + "tags": [ + "sites" + ], + "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 493, + "cookies": false, + "type": "", + "demo": "sites\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "sitesGetVariable", + "tags": [ + "sites" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 494, + "cookies": false, + "type": "", + "demo": "sites\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "sitesUpdateVariable", + "tags": [ + "sites" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 496, + "cookies": false, + "type": "", + "demo": "sites\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "sitesDeleteVariable", + "tags": [ + "sites" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 497, + "cookies": false, + "type": "", + "demo": "sites\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "tags": [ + "storage" + ], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucketList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBuckets", + "group": "buckets", + "weight": 545, + "cookies": false, + "type": "", + "demo": "storage\/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", + "tags": [ + "storage" + ], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBucket", + "group": "buckets", + "weight": 543, + "cookies": false, + "type": "", + "demo": "storage\/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<BUCKET_ID>" + }, + "name": { + "type": "string", + "description": "Bucket name", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "x-example": false + } + }, + "required": [ + "bucketId", + "name" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}": { + "get": { + "summary": "Get bucket", + "operationId": "storageGetBucket", + "tags": [ + "storage" + ], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBucket", + "group": "buckets", + "weight": 544, + "cookies": false, + "type": "", + "demo": "storage\/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update bucket", + "operationId": "storageUpdateBucket", + "tags": [ + "storage" + ], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBucket", + "group": "buckets", + "weight": 546, + "cookies": false, + "type": "", + "demo": "storage\/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Bucket name", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete bucket", + "operationId": "storageDeleteBucket", + "tags": [ + "storage" + ], + "description": "Delete a storage bucket by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBucket", + "group": "buckets", + "weight": 547, + "cookies": false, + "type": "", + "demo": "storage\/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/fileList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "weight": 550, + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "weight": 548, + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<FILE_ID>", + "x-upload-id": true + }, + "file": { + "type": "string", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "x-example": null, + "format": "binary" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + }, + "required": [ + "fileId", + "file" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFile", + "group": "files", + "weight": 549, + "cookies": false, + "type": "", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFile", + "group": "files", + "weight": 551, + "cookies": false, + "type": "", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "weight": 552, + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileDownload", + "group": "files", + "weight": 554, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFilePreview", + "group": "files", + "weight": 553, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "schema": { + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "default": "center" + }, + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0 + }, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileView", + "group": "files", + "weight": 555, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/usage": { + "get": { + "summary": "Get storage usage stats", + "operationId": "storageGetUsage", + "tags": [ + "storage" + ], + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, 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.\n", + "responses": { + "200": { + "description": "StorageUsage", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageStorage" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 557, + "cookies": false, + "type": "", + "demo": "storage\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/storage\/{bucketId}\/usage": { + "get": { + "summary": "Get bucket usage stats", + "operationId": "storageGetBucketUsage", + "tags": [ + "storage" + ], + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, 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.\n", + "responses": { + "200": { + "description": "UsageBuckets", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageBuckets" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBucketUsage", + "group": null, + "weight": 558, + "cookies": false, + "type": "", + "demo": "storage\/get-bucket-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 265, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 261, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 332, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 328, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 329, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 330, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 331, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 333, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBListUsage", + "tags": [ + "tablesDB" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 267, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tablesdb\/list-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 262, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 263, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 264, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 272, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 268, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TABLE_ID>" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 269, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 270, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 271, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 277, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 278, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 279, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 280, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 281, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 282, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 283, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 284, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 285, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 286, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 287, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 288, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 289, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 290, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 291, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { + "post": { + "summary": "Create line column", + "operationId": "tablesDBCreateLineColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric line column.", + "responses": { + "202": { + "description": "ColumnLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLine" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLineColumn", + "group": "columns", + "weight": 292, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { + "patch": { + "summary": "Update line column", + "operationId": "tablesDBUpdateLineColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a line column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLine" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLineColumn", + "group": "columns", + "weight": 293, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + "post": { + "summary": "Create longtext column", + "operationId": "tablesDBCreateLongtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a longtext column.\n", + "responses": { + "202": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextColumn", + "group": "columns", + "weight": 310, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { + "patch": { + "summary": "Update longtext column", + "operationId": "tablesDBUpdateLongtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextColumn", + "group": "columns", + "weight": 311, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { + "post": { + "summary": "Create mediumtext column", + "operationId": "tablesDBCreateMediumtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a mediumtext column.\n", + "responses": { + "202": { + "description": "ColumnMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextColumn", + "group": "columns", + "weight": 308, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext column", + "operationId": "tablesDBUpdateMediumtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextColumn", + "group": "columns", + "weight": 309, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { + "post": { + "summary": "Create point column", + "operationId": "tablesDBCreatePointColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric point column.", + "responses": { + "202": { + "description": "ColumnPoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPoint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPointColumn", + "group": "columns", + "weight": 294, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { + "patch": { + "summary": "Update point column", + "operationId": "tablesDBUpdatePointColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a point column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPoint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePointColumn", + "group": "columns", + "weight": 295, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { + "post": { + "summary": "Create polygon column", + "operationId": "tablesDBCreatePolygonColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric polygon column.", + "responses": { + "202": { + "description": "ColumnPolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPolygon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPolygonColumn", + "group": "columns", + "weight": 296, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { + "patch": { + "summary": "Update polygon column", + "operationId": "tablesDBUpdatePolygonColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPolygon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePolygonColumn", + "group": "columns", + "weight": 297, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 298, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "<RELATED_TABLE_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 300, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "deprecated": { + "since": "1.9.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for text columns, in number of characters.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 301, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { + "post": { + "summary": "Create text column", + "operationId": "tablesDBCreateTextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a text column.\n", + "responses": { + "202": { + "description": "ColumnText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextColumn", + "group": "columns", + "weight": 306, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { + "patch": { + "summary": "Update text column", + "operationId": "tablesDBUpdateTextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextColumn", + "group": "columns", + "weight": 307, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 302, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 303, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { + "post": { + "summary": "Create varchar column", + "operationId": "tablesDBCreateVarcharColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a varchar column.\n", + "responses": { + "202": { + "description": "ColumnVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharColumn", + "group": "columns", + "weight": 304, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { + "patch": { + "summary": "Update varchar column", + "operationId": "tablesDBUpdateVarcharColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharColumn", + "group": "columns", + "weight": 305, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar column.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 275, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 276, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 299, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [], + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 315, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 312, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "TablesDBIndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 313, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 314, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDBListTableLogs", + "tags": [ + "tablesDB" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 273, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 324, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 316, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<ROW_ID>" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 321, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 319, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 323, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 317, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 320, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 318, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 322, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDBListRowLogs", + "tags": [ + "tablesDB" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 325, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 327, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 326, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDBGetTableUsage", + "tags": [ + "tablesDB" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 274, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBGetUsage", + "tags": [ + "tablesDB" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 266, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tablesdb\/get-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/teamList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "teams", + "weight": 526, + "cookies": false, + "type": "", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "weight": 524, + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TEAM_ID>" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "weight": 525, + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "weight": 528, + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "weight": 527, + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/logs": { + "get": { + "summary": "List team logs", + "operationId": "teamsListLogs", + "tags": [ + "teams" + ], + "description": "Get the team 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": 537, + "cookies": false, + "type": "", + "demo": "teams\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 533, + "cookies": false, + "type": "", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMembership", + "group": "memberships", + "weight": 531, + "cookies": false, + "type": "", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMembership", + "group": "memberships", + "weight": 532, + "cookies": false, + "type": "", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "weight": 534, + "cookies": false, + "type": "", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "weight": 535, + "cookies": false, + "type": "", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipStatus", + "group": "memberships", + "weight": 536, + "cookies": false, + "type": "", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "teams", + "weight": 529, + "cookies": false, + "type": "", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "teams", + "weight": 530, + "cookies": false, + "type": "", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "List tokens", + "operationId": "tokensList", + "tags": [ + "tokens" + ], + "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Resource Tokens List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceTokenList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "files", + "weight": 540, + "cookies": false, + "type": "", + "demo": "tokens\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file token", + "operationId": "tokensCreateFileToken", + "tags": [ + "tokens" + ], + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", + "responses": { + "201": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFileToken", + "group": "files", + "weight": 538, + "cookies": false, + "type": "", + "demo": "tokens\/create-file-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "Token expiry date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tokens\/{tokenId}": { + "get": { + "summary": "Get token", + "operationId": "tokensGet", + "tags": [ + "tokens" + ], + "description": "Get a token by its unique ID.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tokens", + "weight": 539, + "cookies": false, + "type": "", + "demo": "tokens\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update token", + "operationId": "tokensUpdate", + "tags": [ + "tokens" + ], + "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tokens", + "weight": 541, + "cookies": false, + "type": "", + "demo": "tokens\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "File token expiry date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete token", + "operationId": "tokensDelete", + "tags": [ + "tokens" + ], + "description": "Delete a token by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tokens", + "weight": 542, + "cookies": false, + "type": "", + "demo": "tokens\/delete.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users": { + "get": { + "summary": "List users", + "operationId": "usersList", + "tags": [ + "users" + ], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/userList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "users", + "weight": 71, + "cookies": false, + "type": "", + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user", + "operationId": "usersCreate", + "tags": [ + "users" + ], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "users", + "weight": 62, + "cookies": false, + "type": "", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + } + } + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArgon2User", + "group": "users", + "weight": 65, + "cookies": false, + "type": "", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Argon2.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBcryptUser", + "group": "users", + "weight": 63, + "cookies": false, + "type": "", + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Bcrypt.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 79, + "cookies": false, + "type": "", + "demo": "users\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 103, + "cookies": false, + "type": "", + "demo": "users\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<IDENTITY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMD5User", + "group": "users", + "weight": 64, + "cookies": false, + "type": "", + "demo": "users\/create-md-5-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using MD5.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPHPassUser", + "group": "users", + "weight": 67, + "cookies": false, + "type": "", + "demo": "users\/create-ph-pass-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using PHPass.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptUser", + "group": "users", + "weight": 68, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt.", + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "x-example": null, + "format": "int32" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + } + } + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptModifiedUser", + "group": "users", + "weight": 69, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-modified-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt Modified.", + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + } + } + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSHAUser", + "group": "users", + "weight": 66, + "cookies": false, + "type": "", + "demo": "users\/create-sha-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using SHA.", + "x-example": "password", + "format": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/usage": { + "get": { + "summary": "Get users usage stats", + "operationId": "usersGetUsage", + "tags": [ + "users" + ], + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. 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.\n", + "responses": { + "200": { + "description": "UsageUsers", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageUsers" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 105, + "cookies": false, + "type": "", + "demo": "users\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}": { + "get": { + "summary": "Get user", + "operationId": "usersGet", + "tags": [ + "users" + ], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "users", + "weight": 72, + "cookies": false, + "type": "", + "demo": "users\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user", + "operationId": "usersDelete", + "tags": [ + "users" + ], + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "users", + "weight": 101, + "cookies": false, + "type": "", + "demo": "users\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", + "tags": [ + "users" + ], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "users", + "weight": 86, + "cookies": false, + "type": "", + "demo": "users\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/impersonator": { + "patch": { + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", + "tags": [ + "users" + ], + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateImpersonator", + "group": "users", + "weight": 82, + "cookies": false, + "type": "", + "demo": "users\/update-impersonator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "x-example": false + } + }, + "required": [ + "impersonator" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "sessions", + "weight": 104, + "cookies": false, + "type": "", + "demo": "users\/create-jwt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": "users", + "weight": 81, + "cookies": false, + "type": "", + "demo": "users\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "tags": [ + "users" + ], + "description": "Get the user 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": 77, + "cookies": false, + "type": "", + "demo": "users\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "tags": [ + "users" + ], + "description": "Get the user membership list by its unique ID.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 76, + "cookies": false, + "type": "", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfa", + "group": "users", + "weight": 91, + "cookies": false, + "type": "", + "demo": "users\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 96, + "cookies": false, + "type": "", + "demo": "users\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 92, + "cookies": false, + "type": "", + "demo": "users\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 93, + "cookies": false, + "type": "", + "demo": "users\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 95, + "cookies": false, + "type": "", + "demo": "users\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 94, + "cookies": false, + "type": "", + "demo": "users\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", + "tags": [ + "users" + ], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "users", + "weight": 84, + "cookies": false, + "type": "", + "demo": "users\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/password": { + "patch": { + "summary": "Update password", + "operationId": "usersUpdatePassword", + "tags": [ + "users" + ], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "users", + "weight": 85, + "cookies": false, + "type": "", + "demo": "users\/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": null + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "users", + "weight": 87, + "cookies": false, + "type": "", + "demo": "users\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "number" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "users", + "weight": 73, + "cookies": false, + "type": "", + "demo": "users\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user preferences", + "operationId": "usersUpdatePrefs", + "tags": [ + "users" + ], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "users", + "weight": 89, + "cookies": false, + "type": "", + "demo": "users\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/sessions": { + "get": { + "summary": "List user sessions", + "operationId": "usersListSessions", + "tags": [ + "users" + ], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 75, + "cookies": false, + "type": "", + "demo": "users\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.read", + "sessions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 97, + "cookies": false, + "type": "", + "demo": "users\/create-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", + "tags": [ + "users" + ], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 100, + "cookies": false, + "type": "", + "demo": "users\/delete-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/sessions\/{sessionId}": { + "delete": { + "summary": "Delete user session", + "operationId": "usersDeleteSession", + "tags": [ + "users" + ], + "description": "Delete a user sessions by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 99, + "cookies": false, + "type": "", + "demo": "users\/delete-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SESSION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/status": { + "patch": { + "summary": "Update user status", + "operationId": "usersUpdateStatus", + "tags": [ + "users" + ], + "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "users", + "weight": 80, + "cookies": false, + "type": "", + "demo": "users\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "x-example": false + } + }, + "required": [ + "status" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "targets", + "weight": 78, + "cookies": false, + "type": "", + "demo": "users\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTarget", + "group": "targets", + "weight": 70, + "cookies": false, + "type": "", + "demo": "users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTarget", + "group": "targets", + "weight": 74, + "cookies": false, + "type": "", + "demo": "users\/get-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTarget", + "group": "targets", + "weight": 90, + "cookies": false, + "type": "", + "demo": "users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "x-example": "<NAME>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTarget", + "group": "targets", + "weight": 102, + "cookies": false, + "type": "", + "demo": "users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createToken", + "group": "sessions", + "weight": 98, + "cookies": false, + "type": "", + "demo": "users\/create-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "x-example": 4, + "format": "int32" + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "users", + "weight": 88, + "cookies": false, + "type": "", + "demo": "users\/update-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "users", + "weight": 83, + "cookies": false, + "type": "", + "demo": "users\/update-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + } + } + } + }, + "\/vcs\/github\/installations\/{installationId}\/detections": { + "post": { + "summary": "Create repository detection", + "operationId": "vcsCreateRepositoryDetection", + "tags": [ + "vcs" + ], + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "DetectionRuntime, or DetectionFramework", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/detectionRuntime" + }, + { + "$ref": "#\/components\/schemas\/detectionFramework" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/components\/schemas\/detectionRuntime", + "framework": "#\/components\/schemas\/detectionFramework" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRepositoryDetection", + "group": "repositories", + "weight": 570, + "cookies": false, + "type": "", + "demo": "vcs\/create-repository-detection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerRepositoryId": { + "type": "string", + "description": "Repository Id", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "type": { + "type": "string", + "description": "Detector type. Must be one of the following: runtime, framework", + "x-example": "runtime", + "enum": [ + "runtime", + "framework" + ], + "x-enum-name": "VCSDetectionType", + "x-enum-keys": [] + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to Root Directory", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + } + }, + "required": [ + "providerRepositoryId", + "type" + ] + } + } + } + } + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { + "get": { + "summary": "List repositories", + "operationId": "vcsListRepositories", + "tags": [ + "vcs" + ], + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", + "responses": { + "200": { + "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/providerRepositoryRuntimeList" + }, + { + "$ref": "#\/components\/schemas\/providerRepositoryFrameworkList" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/components\/schemas\/providerRepositoryRuntimeList", + "framework": "#\/components\/schemas\/providerRepositoryFrameworkList" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRepositories", + "group": "repositories", + "weight": 567, + "cookies": false, + "type": "", + "demo": "vcs\/list-repositories.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Detector type. Must be one of the following: runtime, framework", + "required": true, + "schema": { + "type": "string", + "x-example": "runtime", + "enum": [ + "runtime", + "framework" + ], + "x-enum-name": "VCSDetectionType", + "x-enum-keys": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "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" + } + ] + }, + "post": { + "summary": "Create repository", + "operationId": "vcsCreateRepository", + "tags": [ + "vcs" + ], + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", + "responses": { + "200": { + "description": "ProviderRepository", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerRepository" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRepository", + "group": "repositories", + "weight": 565, + "cookies": false, + "type": "", + "demo": "vcs\/create-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name (slug)", + "x-example": "<NAME>" + }, + "private": { + "type": "boolean", + "description": "Mark repository public or private", + "x-example": false + } + }, + "required": [ + "name", + "private" + ] + } + } + } + } + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { + "get": { + "summary": "Get repository", + "operationId": "vcsGetRepository", + "tags": [ + "vcs" + ], + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", + "responses": { + "200": { + "description": "ProviderRepository", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerRepository" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRepository", + "group": "repositories", + "weight": 566, + "cookies": false, + "type": "", + "demo": "vcs\/get-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { + "get": { + "summary": "List repository branches", + "operationId": "vcsListRepositoryBranches", + "tags": [ + "vcs" + ], + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", + "responses": { + "200": { + "description": "Branches List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/branchList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRepositoryBranches", + "group": "repositories", + "weight": 568, + "cookies": false, + "type": "", + "demo": "vcs\/list-repository-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { + "get": { + "summary": "Get files and directories of a VCS repository", + "operationId": "vcsGetRepositoryContents", + "tags": [ + "vcs" + ], + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "VCS Content List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vcsContentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRepositoryContents", + "group": "repositories", + "weight": 569, + "cookies": false, + "type": "", + "demo": "vcs\/get-repository-contents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "in": "path" + }, + { + "name": "providerRootDirectory", + "description": "Path to get contents of nested directory", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ROOT_DIRECTORY>", + "default": "" + }, + "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROVIDER_REFERENCE>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { + "patch": { + "summary": "Update external deployment (authorize)", + "operationId": "vcsUpdateExternalDeployments", + "tags": [ + "vcs" + ], + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateExternalDeployments", + "group": "repositories", + "weight": 561, + "cookies": false, + "type": "", + "demo": "vcs\/update-external-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "repositoryId", + "description": "VCS Repository Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<REPOSITORY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerPullRequestId": { + "type": "string", + "description": "GitHub Pull Request Id", + "x-example": "<PROVIDER_PULL_REQUEST_ID>" + } + }, + "required": [ + "providerPullRequestId" + ] + } + } + } + } + } + }, + "\/vcs\/installations": { + "get": { + "summary": "List installations", + "operationId": "vcsListInstallations", + "tags": [ + "vcs" + ], + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", + "responses": { + "200": { + "description": "Installations List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/installationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": "installations", + "weight": 563, + "cookies": false, + "type": "", + "demo": "vcs\/list-installations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/vcs\/installations\/{installationId}": { + "get": { + "summary": "Get installation", + "operationId": "vcsGetInstallation", + "tags": [ + "vcs" + ], + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", + "responses": { + "200": { + "description": "Installation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/installation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": "installations", + "weight": 562, + "cookies": false, + "type": "", + "demo": "vcs\/get-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete installation", + "operationId": "vcsDeleteInstallation", + "tags": [ + "vcs" + ], + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": "installations", + "weight": 564, + "cookies": false, + "type": "", + "demo": "vcs\/delete-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb": { + "get": { + "summary": "List databases", + "operationId": "vectorsDBList", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "vectorsdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "vectorsdb", + "weight": 368, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/vectorsdb\/embeddings\/text": { + "post": { + "summary": "Create Text Embeddings", + "operationId": "vectorsDBCreateTextEmbeddings", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "200": { + "description": "Embedding list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/embeddingList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextEmbeddings", + "group": "documents", + "weight": 394, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createTextEmbeddings", + "namespace": "vectorsDB", + "desc": "Create Text Embedding", + "auth": { + "Project": [] + }, + "parameters": [ + "texts", + "model" + ], + "required": [ + "texts" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/embeddingList" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-text-embeddings.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "texts": { + "type": "array", + "description": "Array of text to generate embeddings.", + "x-example": null, + "items": { + "type": "string" + } + }, + "model": { + "type": "string", + "description": "The embedding model to use for generating vector embeddings.", + "x-example": "embeddinggemma", + "enum": [ + "embeddinggemma" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "texts" + ] + } + } + } + } + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 399, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 395, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 396, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 397, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 398, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 400, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/vectorsdb\/usage": { + "get": { + "summary": "Get VectorsDB usage stats", + "operationId": "vectorsDBListUsage", + "tags": [ + "vectorsDB" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageVectorsDBs", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageVectorsDBs" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-usage.md", + "methods": [ + { + "name": "listUsage", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageVectorsDBs" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "vectorsdb\/list-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/vectorsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "vectorsDBGet", + "tags": [ + "vectorsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "vectorsdb", + "weight": 369, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", + "tags": [ + "vectorsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "vectorsdb", + "weight": 370, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", + "tags": [ + "vectorsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "vectorsdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "vectorsDBListCollections", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "VectorsDB Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollectionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 379, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "vectorsDBCreateCollection", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 375, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "collectionId", + "name", + "dimension" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", + "tags": [ + "vectorsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 376, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", + "tags": [ + "vectorsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 377, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimensions.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", + "tags": [ + "vectorsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 378, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 389, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 385, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 392, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 391, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 393, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 388, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 387, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 386, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 390, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", + "tags": [ + "vectorsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 384, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", + "tags": [ + "vectorsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 381, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "hnsw_euclidean", + "enum": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ], + "x-enum-name": "VectorsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", + "tags": [ + "vectorsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 382, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "vectorsDBDeleteIndex", + "tags": [ + "vectorsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 383, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "vectorsDBGetCollectionUsage", + "tags": [ + "vectorsDB" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollectionUsage", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/usage": { + "get": { + "summary": "Get VectorsDB usage stats", + "operationId": "vectorsDBGetUsage", + "tags": [ + "vectorsDB" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageVectorsDB", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageVectorsDB" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-database-usage.md", + "methods": [ + { + "name": "getUsage", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageVectorsDB" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "vectorsdb\/get-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "webhooksList", + "tags": [ + "webhooks" + ], + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Webhooks List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhookList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 573, + "cookies": false, + "type": "", + "demo": "webhooks\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create webhook", + "operationId": "webhooksCreate", + "tags": [ + "webhooks" + ], + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", + "responses": { + "201": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 572, + "cookies": false, + "type": "", + "demo": "webhooks\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "webhookId": { + "type": "string", + "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<WEBHOOK_ID>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "x-example": null + }, + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "x-example": "<AUTH_PASSWORD>" + }, + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "x-example": "<SECRET>", + "x-nullable": true + } + }, + "required": [ + "webhookId", + "url", + "name", + "events" + ] + } + } + } + } + } + }, + "\/webhooks\/{webhookId}": { + "get": { + "summary": "Get webhook", + "operationId": "webhooksGet", + "tags": [ + "webhooks" + ], + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 574, + "cookies": false, + "type": "", + "demo": "webhooks\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update webhook", + "operationId": "webhooksUpdate", + "tags": [ + "webhooks" + ], + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 576, + "cookies": false, + "type": "", + "demo": "webhooks\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "x-example": null + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "x-example": "<AUTH_PASSWORD>" + } + }, + "required": [ + "name", + "url", + "events" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete webhook", + "operationId": "webhooksDelete", + "tags": [ + "webhooks" + ], + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 575, + "cookies": false, + "type": "", + "demo": "webhooks\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + } + }, + "\/webhooks\/{webhookId}\/secret": { + "patch": { + "summary": "Update webhook secret key", + "operationId": "webhooksUpdateSecret", + "tags": [ + "webhooks" + ], + "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSecret", + "group": null, + "weight": 577, + "cookies": false, + "type": "", + "demo": "webhooks\/update-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "x-example": "<SECRET>", + "x-nullable": true + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + } + ], + "components": { + "schemas": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "error": { + "description": "Error", + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message.", + "x-example": "Not found" + }, + "code": { + "type": "string", + "description": "Error code.", + "x-example": "404" + }, + "type": { + "type": "string", + "description": "Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes", + "x-example": "not_found" + }, + "version": { + "type": "string", + "description": "Server version number.", + "x-example": "1.0" + } + }, + "required": [ + "message", + "code", + "type", + "version" + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "$ref": "#\/components\/schemas\/document" + }, + "x-example": "" + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "$ref": "#\/components\/schemas\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ], + "example": { + "total": 5, + "tables": "" + } + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/collection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/database" + }, + "x-example": "" + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users that matched your query.", + "x-example": 5, + "format": "int32" + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { + "$ref": "#\/components\/schemas\/user" + }, + "x-example": "" + } + }, + "required": [ + "total", + "users" + ], + "example": { + "total": 5, + "users": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "$ref": "#\/components\/schemas\/session" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "$ref": "#\/components\/schemas\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "$ref": "#\/components\/schemas\/log" + }, + "x-example": "" + } + }, + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "$ref": "#\/components\/schemas\/file" + }, + "x-example": "" + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "$ref": "#\/components\/schemas\/bucket" + }, + "x-example": "" + } + }, + "required": [ + "total", + "buckets" + ], + "example": { + "total": 5, + "buckets": "" + } + }, + "resourceTokenList": { + "description": "Resource Tokens List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/resourceToken" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "$ref": "#\/components\/schemas\/team" + }, + "x-example": "" + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "$ref": "#\/components\/schemas\/membership" + }, + "x-example": "" + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "siteList": { + "description": "Sites List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sites that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "List of sites.", + "items": { + "$ref": "#\/components\/schemas\/site" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sites" + ], + "example": { + "total": 5, + "sites": "" + } + }, + "templateSiteList": { + "description": "Site Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/templateSite" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "$ref": "#\/components\/schemas\/function" + }, + "x-example": "" + } + }, + "required": [ + "total", + "functions" + ], + "example": { + "total": 5, + "functions": "" + } + }, + "templateFunctionList": { + "description": "Function Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/templateFunction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "installationList": { + "description": "Installations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/installation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "providerRepositoryFrameworkList": { + "description": "Framework Provider Repositories List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworkProviderRepositories that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworkProviderRepositories": { + "type": "array", + "description": "List of frameworkProviderRepositories.", + "items": { + "$ref": "#\/components\/schemas\/providerRepositoryFramework" + }, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Provider repository list type.", + "x-example": "framework" + } + }, + "required": [ + "total", + "frameworkProviderRepositories", + "type" + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "", + "type": "framework" + } + }, + "providerRepositoryRuntimeList": { + "description": "Runtime Provider Repositories List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimeProviderRepositories that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimeProviderRepositories": { + "type": "array", + "description": "List of runtimeProviderRepositories.", + "items": { + "$ref": "#\/components\/schemas\/providerRepositoryRuntime" + }, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Provider repository list type.", + "x-example": "runtime" + } + }, + "required": [ + "total", + "runtimeProviderRepositories", + "type" + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "", + "type": "runtime" + } + }, + "branchList": { + "description": "Branches List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of branches that matched your query.", + "x-example": 5, + "format": "int32" + }, + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "$ref": "#\/components\/schemas\/branch" + }, + "x-example": "" + } + }, + "required": [ + "total", + "branches" + ], + "example": { + "total": 5, + "branches": "" + } + }, + "frameworkList": { + "description": "Frameworks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks.", + "items": { + "$ref": "#\/components\/schemas\/framework" + }, + "x-example": "" + } + }, + "required": [ + "total", + "frameworks" + ], + "example": { + "total": 5, + "frameworks": "" + } + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { + "$ref": "#\/components\/schemas\/runtime" + }, + "x-example": "" + } + }, + "required": [ + "total", + "runtimes" + ], + "example": { + "total": 5, + "runtimes": "" + } + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments that matched your query.", + "x-example": 5, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { + "$ref": "#\/components\/schemas\/deployment" + }, + "x-example": "" + } + }, + "required": [ + "total", + "deployments" + ], + "example": { + "total": 5, + "deployments": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "$ref": "#\/components\/schemas\/execution" + }, + "x-example": "" + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "projectList": { + "description": "Projects List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of projects that matched your query.", + "x-example": 5, + "format": "int32" + }, + "projects": { + "type": "array", + "description": "List of projects.", + "items": { + "$ref": "#\/components\/schemas\/project" + }, + "x-example": "" + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { + "$ref": "#\/components\/schemas\/webhook" + }, + "x-example": "" + } + }, + "required": [ + "total", + "webhooks" + ], + "example": { + "total": 5, + "webhooks": "" + } + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/key" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } + }, + "devKeyList": { + "description": "Dev Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of devKeys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "devKeys": { + "type": "array", + "description": "List of devKeys.", + "items": { + "$ref": "#\/components\/schemas\/devKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "devKeys" + ], + "example": { + "total": 5, + "devKeys": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "$ref": "#\/components\/schemas\/country" + }, + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "$ref": "#\/components\/schemas\/continent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "$ref": "#\/components\/schemas\/language" + }, + "x-example": "" + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "$ref": "#\/components\/schemas\/currency" + }, + "x-example": "" + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "$ref": "#\/components\/schemas\/phone" + }, + "x-example": "" + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ], + "example": { + "total": 5, + "variables": "" + } + }, + "mockNumberList": { + "description": "Mock Numbers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of mockNumbers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "mockNumbers": { + "type": "array", + "description": "List of mockNumbers.", + "items": { + "$ref": "#\/components\/schemas\/mockNumber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "mockNumbers" + ], + "example": { + "total": 5, + "mockNumbers": "" + } + }, + "policyList": { + "description": "Policies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies in the given project.", + "x-example": 9, + "format": "int32" + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "policies" + ], + "example": { + "total": 9, + "policies": "" + } + }, + "emailTemplateList": { + "description": "Email Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/emailTemplate" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "healthStatusList": { + "description": "Status List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of statuses that matched your query.", + "x-example": 5, + "format": "int32" + }, + "statuses": { + "type": "array", + "description": "List of statuses.", + "items": { + "$ref": "#\/components\/schemas\/healthStatus" + }, + "x-example": "" + } + }, + "required": [ + "total", + "statuses" + ], + "example": { + "total": 5, + "statuses": "" + } + }, + "proxyRuleList": { + "description": "Rule List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/proxyRule" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rules" + ], + "example": { + "total": 5, + "rules": "" + } + }, + "scheduleList": { + "description": "Schedules List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of schedules that matched your query.", + "x-example": 5, + "format": "int32" + }, + "schedules": { + "type": "array", + "description": "List of schedules.", + "items": { + "$ref": "#\/components\/schemas\/schedule" + }, + "x-example": "" + } + }, + "required": [ + "total", + "schedules" + ], + "example": { + "total": 5, + "schedules": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "$ref": "#\/components\/schemas\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "$ref": "#\/components\/schemas\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "$ref": "#\/components\/schemas\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ], + "example": { + "total": 5, + "messages": "" + } + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "$ref": "#\/components\/schemas\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ], + "example": { + "total": 5, + "topics": "" + } + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "$ref": "#\/components\/schemas\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ], + "example": { + "total": 5, + "subscribers": "" + } + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ], + "example": { + "total": 5, + "targets": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "$ref": "#\/components\/schemas\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "migrationList": { + "description": "Migrations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of migrations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "migrations": { + "type": "array", + "description": "List of migrations.", + "items": { + "$ref": "#\/components\/schemas\/migration" + }, + "x-example": "" + } + }, + "required": [ + "total", + "migrations" + ], + "example": { + "total": 5, + "migrations": "" + } + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "$ref": "#\/components\/schemas\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ], + "example": { + "total": 5, + "specifications": "" + } + }, + "vcsContentList": { + "description": "VCS Content List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of contents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "contents": { + "type": "array", + "description": "List of contents.", + "items": { + "$ref": "#\/components\/schemas\/vcsContent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "contents" + ], + "example": { + "total": 5, + "contents": "" + } + }, + "vectorsdbCollectionList": { + "description": "VectorsDB Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "embeddingList": { + "description": "Embedding list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of embeddings that matched your query.", + "x-example": 5, + "format": "int32" + }, + "embeddings": { + "type": "array", + "description": "List of embeddings.", + "items": { + "$ref": "#\/components\/schemas\/embedding" + }, + "x-example": "" + } + }, + "required": [ + "total", + "embeddings" + ], + "example": { + "total": 5, + "embeddings": "" + } + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb", + "documentsdb", + "vectorsdb" + ] + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } + }, + "embedding": { + "description": "Embedding", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Embedding model used to generate embeddings.", + "x-example": "embeddinggemma" + }, + "dimension": { + "type": "integer", + "description": "Number of dimensions for each embedding vector.", + "x-example": 768, + "format": "int32" + }, + "embedding": { + "type": "array", + "description": "Embedding vector values. If an error occurs, this will be an empty array.", + "items": { + "type": "number", + "format": "double" + }, + "x-example": [ + 0.01, + 0.02, + 0.03 + ] + }, + "error": { + "type": "string", + "description": "Error message if embedding generation fails. Empty string if no error.", + "x-example": "Error message" + } + }, + "required": [ + "model", + "dimension", + "embedding", + "error" + ], + "example": { + "model": "embeddinggemma", + "dimension": 768, + "embedding": [ + 0.01, + 0.02, + 0.03 + ], + "error": "Error message" + } + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributePoint" + }, + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship", + "point": "#\/components\/schemas\/attributePoint", + "linestring": "#\/components\/schemas\/attributeLine", + "polygon": "#\/components\/schemas\/attributePolygon", + "varchar": "#\/components\/schemas\/attributeVarchar", + "text": "#\/components\/schemas\/attributeText", + "mediumtext": "#\/components\/schemas\/attributeMediumtext", + "longtext": "#\/components\/schemas\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributePoint": { + "type": "point" + }, + "#\/components\/schemas\/attributeLine": { + "type": "linestring" + }, + "#\/components\/schemas\/attributePolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/attributeVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/attributeText": { + "type": "text" + }, + "#\/components\/schemas\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/attributeLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "x-example": 5, + "format": "int32" + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributePoint" + }, + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship", + "point": "#\/components\/schemas\/attributePoint", + "linestring": "#\/components\/schemas\/attributeLine", + "polygon": "#\/components\/schemas\/attributePolygon", + "varchar": "#\/components\/schemas\/attributeVarchar", + "text": "#\/components\/schemas\/attributeText", + "mediumtext": "#\/components\/schemas\/attributeMediumtext", + "longtext": "#\/components\/schemas\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributePoint": { + "type": "point" + }, + "#\/components\/schemas\/attributeLine": { + "type": "linestring" + }, + "#\/components\/schemas\/attributePolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/attributeVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/attributeText": { + "type": "text" + }, + "#\/components\/schemas\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/attributeLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "attributes" + ], + "example": { + "total": 5, + "attributes": "" + } + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "attributePoint": { + "description": "AttributePoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + 0, + 0 + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "attributeLine": { + "description": "AttributeLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "attributePolygon": { + "description": "AttributePolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "attributeVarchar": { + "description": "AttributeVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeText": { + "description": "AttributeText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeMediumtext": { + "description": "AttributeMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeLongtext": { + "description": "AttributeLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "usageDocumentsDB": { + "description": "UsageDocumentsDB", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of database reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of database writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "documents", + "storage", + "databaseReads", + "databaseWrites" + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "documentsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "documents": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } + }, + "vectorsdbCollection": { + "description": "VectorsDB Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeObject" + }, + { + "$ref": "#\/components\/schemas\/attributeVector" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "object": "#\/components\/schemas\/attributeObject", + "vector": "#\/components\/schemas\/attributeVector" + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed", + "dimension" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500, + "dimension": 1536 + } + }, + "attributeObject": { + "description": "AttributeObject", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeVector": { + "description": "AttributeVector", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Vector dimensions.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 1536 + } + }, + "usageVectorsDBs": { + "description": "UsageVectorsDBs", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB databases.", + "x-example": 0, + "format": "int32" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated storage in bytes.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of database reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of database writes.", + "x-example": 0, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "Aggregated number of databases per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage in bytes per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "databasesTotal", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "databases", + "collections", + "documents", + "storage", + "databasesReads", + "databasesWrites" + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "documentsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "documents": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } + }, + "usageVectorsDB": { + "description": "UsageVectorsDB", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of database reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of database writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "documents", + "storage", + "databaseReads", + "databaseWrites" + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "documentsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "documents": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } + }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship", + "point": "#\/components\/schemas\/columnPoint", + "linestring": "#\/components\/schemas\/columnLine", + "polygon": "#\/components\/schemas\/columnPolygon", + "varchar": "#\/components\/schemas\/columnVarchar", + "text": "#\/components\/schemas\/columnText", + "mediumtext": "#\/components\/schemas\/columnMediumtext", + "longtext": "#\/components\/schemas\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnPoint": { + "type": "point" + }, + "#\/components\/schemas\/columnLine": { + "type": "linestring" + }, + "#\/components\/schemas\/columnPolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/columnVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/columnText": { + "type": "text" + }, + "#\/components\/schemas\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/columnLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum row size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used row size in bytes based on defined columns.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship", + "point": "#\/components\/schemas\/columnPoint", + "linestring": "#\/components\/schemas\/columnLine", + "polygon": "#\/components\/schemas\/columnPolygon", + "varchar": "#\/components\/schemas\/columnVarchar", + "text": "#\/components\/schemas\/columnText", + "mediumtext": "#\/components\/schemas\/columnMediumtext", + "longtext": "#\/components\/schemas\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnPoint": { + "type": "point" + }, + "#\/components\/schemas\/columnLine": { + "type": "linestring" + }, + "#\/components\/schemas\/columnPolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/columnVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/columnText": { + "type": "text" + }, + "#\/components\/schemas\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/columnLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ], + "example": { + "total": 5, + "columns": "" + } + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "columnPoint": { + "description": "ColumnPoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + 0, + 0 + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "columnLine": { + "description": "ColumnLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "columnPolygon": { + "description": "ColumnPolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "columnVarchar": { + "description": "ColumnVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnText": { + "description": "ColumnText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnMediumtext": { + "description": "ColumnMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnLongtext": { + "description": "ColumnLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "index": { + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index attributes length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } + }, + "columnIndex": { + "description": "Index", + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "columns", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Presence sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "userInternalId": { + "type": "string", + "description": "User internal ID.", + "x-example": "1" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "additionalProperties": true, + "x-additional-properties-key": "metadata", + "required": [ + "$id", + "$sequence", + "$createdAt", + "$updatedAt", + "$permissions", + "userInternalId", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userInternalId": "1", + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/algoArgon2" + }, + { + "$ref": "#\/components\/schemas\/algoScrypt" + }, + { + "$ref": "#\/components\/schemas\/algoScryptModified" + }, + { + "$ref": "#\/components\/schemas\/algoBcrypt" + }, + { + "$ref": "#\/components\/schemas\/algoPhpass" + }, + { + "$ref": "#\/components\/schemas\/algoSha" + }, + { + "$ref": "#\/components\/schemas\/algoMd5" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/components\/schemas\/algoArgon2", + "scrypt": "#\/components\/schemas\/algoScrypt", + "scryptMod": "#\/components\/schemas\/algoScryptModified", + "bcrypt": "#\/components\/schemas\/algoBcrypt", + "phpass": "#\/components\/schemas\/algoPhpass", + "sha": "#\/components\/schemas\/algoSha", + "md5": "#\/components\/schemas\/algoMd5" + } + } + }, + "nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "x-example": 100, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { + "type": "string" + }, + "x-example": [ + "jpg", + "png" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Image transformations are enabled.", + "x-example": false + }, + "totalSize": { + "type": "integer", + "description": "Total size of this bucket in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus", + "transformations", + "totalSize" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false, + "transformations": false, + "totalSize": 128 + } + }, + "resourceToken": { + "description": "ResourceToken", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "files" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "resourceId", + "resourceType", + "expire", + "secret", + "accessedAt" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } + }, + "site": { + "description": "Site", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Site ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Site creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Site update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Site name.", + "x-example": "My Site" + }, + "enabled": { + "type": "boolean", + "description": "Site enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "framework": { + "type": "string", + "description": "Site framework.", + "x-example": "react" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Site's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "deploymentScreenshotLight": { + "type": "string", + "description": "Screenshot of active deployment with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentScreenshotDark": { + "type": "string", + "description": "Screenshot of active deployment with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentId": { + "type": "string", + "description": "Site's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "vars": { + "type": "array", + "description": "Site variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] + }, + "timeout": { + "type": "integer", + "description": "Site request timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the site dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the site.", + "x-example": "npm run build" + }, + "startCommand": { + "type": "string", + "description": "Custom command to use when starting site runtime.", + "x-example": "node custom-server.mjs" + }, + "outputDirectory": { + "type": "string", + "description": "The directory where the site build output is located.", + "x-example": "build" + }, + "installationId": { + "type": "string", + "description": "Site VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "x-example": "sites\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for SSR executions.", + "x-example": "s-1vcpu-512mb" + }, + "buildRuntime": { + "type": "string", + "description": "Site build runtime.", + "x-example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework adapter.", + "x-example": "static" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "enabled", + "live", + "logging", + "framework", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "deploymentScreenshotLight", + "deploymentScreenshotDark", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "vars", + "timeout", + "installCommand", + "buildCommand", + "startCommand", + "outputDirectory", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "startCommand": "node custom-server.mjs", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } + }, + "templateSite": { + "description": "Template Site", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Site Template ID.", + "x-example": "starter" + }, + "name": { + "type": "string", + "description": "Site Template Name.", + "x-example": "Starter site" + }, + "tagline": { + "type": "string", + "description": "Short description of template", + "x-example": "Minimal web app integrating with Appwrite." + }, + "demoUrl": { + "type": "string", + "description": "URL hosting a template demo.", + "x-example": "https:\/\/nextjs-starter.appwrite.network\/" + }, + "screenshotDark": { + "type": "string", + "description": "File URL with preview screenshot in dark theme preference.", + "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png" + }, + "screenshotLight": { + "type": "string", + "description": "File URL with preview screenshot in light theme preference.", + "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png" + }, + "useCases": { + "type": "array", + "description": "Site use cases.", + "items": { + "type": "string" + }, + "x-example": "Starter" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks that can be used with this template.", + "items": { + "$ref": "#\/components\/schemas\/templateFramework" + }, + "x-example": [] + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "x-example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "x-example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "x-example": "main" + }, + "variables": { + "type": "array", + "description": "Site variables.", + "items": { + "$ref": "#\/components\/schemas\/templateVariable" + }, + "x-example": [] + } + }, + "required": [ + "key", + "name", + "tagline", + "demoUrl", + "screenshotDark", + "screenshotLight", + "useCases", + "frameworks", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables" + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } + }, + "templateFramework": { + "description": "Template Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parent framework key.", + "x-example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "x-example": "SvelteKit" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "The output directory to store the build output.", + "x-example": ".\/build" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "x-example": ".\/svelte-kit\/starter" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime used during build step of template.", + "x-example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework runtime", + "x-example": "ssr" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for SPA. Only relevant for static serve runtime.", + "x-example": "index.html" + } + }, + "required": [ + "key", + "name", + "installCommand", + "buildCommand", + "outputDirectory", + "providerRootDirectory", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution and build runtime.", + "x-example": "python-3.8" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentId": { + "type": "string", + "description": "Function's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb" + } + }, + "templateFunction": { + "description": "Template Function", + "type": "object", + "properties": { + "icon": { + "type": "string", + "description": "Function Template Icon.", + "x-example": "icon-lightning-bolt" + }, + "id": { + "type": "string", + "description": "Function Template ID.", + "x-example": "starter" + }, + "name": { + "type": "string", + "description": "Function Template Name.", + "x-example": "Starter function" + }, + "tagline": { + "type": "string", + "description": "Function Template Tagline.", + "x-example": "A simple function to get started." + }, + "permissions": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "any" + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "cron": { + "type": "string", + "description": "Function execution schedult in CRON format.", + "x-example": "0 0 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "useCases": { + "type": "array", + "description": "Function use cases.", + "items": { + "type": "string" + }, + "x-example": "Starter" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes that can be used with this template.", + "items": { + "$ref": "#\/components\/schemas\/templateRuntime" + }, + "x-example": [] + }, + "instructions": { + "type": "string", + "description": "Function Template Instructions.", + "x-example": "For documentation and instructions check out <link>." + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "x-example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "x-example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "x-example": "main" + }, + "variables": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/templateVariable" + }, + "x-example": [] + }, + "scopes": { + "type": "array", + "description": "Function scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + } + }, + "required": [ + "icon", + "id", + "name", + "tagline", + "permissions", + "events", + "cron", + "timeout", + "useCases", + "runtimes", + "instructions", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables", + "scopes" + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out <link>.", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } + }, + "templateRuntime": { + "description": "Template Runtime", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "node-19.0" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "node\/starter" + } + }, + "required": [ + "name", + "commands", + "entrypoint", + "providerRootDirectory" + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } + }, + "templateVariable": { + "description": "Template Variable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Variable Name.", + "x-example": "APPWRITE_DATABASE_ID" + }, + "description": { + "type": "string", + "description": "Variable Description.", + "x-example": "The ID of the Appwrite database that contains the collection to sync." + }, + "value": { + "type": "string", + "description": "Variable Value.", + "x-example": "512" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false + }, + "placeholder": { + "type": "string", + "description": "Variable Placeholder.", + "x-example": "64a55...7b912" + }, + "required": { + "type": "boolean", + "description": "Is the variable required?", + "x-example": false + }, + "type": { + "type": "string", + "description": "Variable Type.", + "x-example": "password" + } + }, + "required": [ + "name", + "description", + "value", + "secret", + "placeholder", + "required", + "type" + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } + }, + "installation": { + "description": "Installation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name.", + "x-example": "appwrite" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "5322" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "provider", + "organization", + "providerInstallationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } + }, + "providerRepository": { + "description": "ProviderRepository", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "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" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "x-example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "x-example": [ + "PORT", + "NODE_ENV" + ] + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ] + } + }, + "providerRepositoryFramework": { + "description": "ProviderRepositoryFramework", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "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" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "x-example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "x-example": [ + "PORT", + "NODE_ENV" + ] + }, + "framework": { + "type": "string", + "description": "Auto-detected framework. Empty if type is not \"framework\".", + "x-example": "nextjs" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables", + "framework" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ], + "framework": "nextjs" + } + }, + "providerRepositoryRuntime": { + "description": "ProviderRepositoryRuntime", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "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" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "x-example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "x-example": [ + "PORT", + "NODE_ENV" + ] + }, + "runtime": { + "type": "string", + "description": "Auto-detected runtime. Empty if type is not \"runtime\".", + "x-example": "node-22" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables", + "runtime" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ], + "runtime": "node-22" + } + }, + "detectionFramework": { + "description": "DetectionFramework", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Repository detection type.", + "x-example": "framework", + "enum": [ + "framework" + ] + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "$ref": "#\/components\/schemas\/detectionVariable" + }, + "x-example": {}, + "nullable": true + }, + "framework": { + "type": "string", + "description": "Framework", + "x-example": "nuxt" + }, + "installCommand": { + "type": "string", + "description": "Site Install Command", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Site Build Command", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Site Output Directory", + "x-example": "dist" + } + }, + "required": [ + "type", + "framework", + "installCommand", + "buildCommand", + "outputDirectory" + ], + "example": { + "type": "framework", + "variables": {}, + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } + }, + "detectionRuntime": { + "description": "DetectionRuntime", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Repository detection type.", + "x-example": "runtime", + "enum": [ + "runtime" + ] + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "$ref": "#\/components\/schemas\/detectionVariable" + }, + "x-example": {}, + "nullable": true + }, + "runtime": { + "type": "string", + "description": "Runtime", + "x-example": "node" + }, + "entrypoint": { + "type": "string", + "description": "Function Entrypoint", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "Function install and build commands", + "x-example": "npm install && npm run build" + } + }, + "required": [ + "type", + "runtime", + "entrypoint", + "commands" + ], + "example": { + "type": "runtime", + "variables": {}, + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } + }, + "detectionVariable": { + "description": "DetectionVariable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of environment variable", + "x-example": "NODE_ENV" + }, + "value": { + "type": "string", + "description": "Value of environment variable", + "x-example": "production" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "NODE_ENV", + "value": "production" + } + }, + "vcsContent": { + "description": "VcsContents", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", + "x-example": 1523, + "format": "int32", + "nullable": true + }, + "isDirectory": { + "type": "boolean", + "description": "If a content is a directory. Directories can be used to check nested contents.", + "x-example": true, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of directory or file.", + "x-example": "Main.java" + } + }, + "required": [ + "name" + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } + }, + "branch": { + "description": "Branch", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Branch Name.", + "x-example": "main" + } + }, + "required": [ + "name" + ], + "example": { + "name": "main" + } + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "x-example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "x-example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { + "type": "string" + }, + "x-example": "amd64" + } + }, + "required": [ + "$id", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } + }, + "framework": { + "description": "Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Framework key.", + "x-example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "x-example": "SvelteKit" + }, + "buildRuntime": { + "type": "string", + "description": "Default runtime version.", + "x-example": "node-22" + }, + "runtimes": { + "type": "array", + "description": "List of supported runtime versions.", + "items": { + "type": "string" + }, + "x-example": [ + "static-1", + "node-22" + ] + }, + "adapters": { + "type": "array", + "description": "List of supported adapters.", + "items": { + "$ref": "#\/components\/schemas\/frameworkAdapter" + }, + "x-example": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "required": [ + "key", + "name", + "buildRuntime", + "runtimes", + "adapters" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "frameworkAdapter": { + "description": "Framework Adapter", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Adapter key.", + "x-example": "static" + }, + "installCommand": { + "type": "string", + "description": "Default command to download dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Default command to build site into output directory.", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Default output directory of build.", + "x-example": ".\/dist" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "key", + "installCommand", + "buildCommand", + "outputDirectory", + "fallbackFile" + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "sourceSize": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output size in bytes.", + "x-example": 128, + "format": "int32" + }, + "totalSize": { + "type": "integer", + "description": "The total size in bytes (source and build output).", + "x-example": 128, + "format": "int32" + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "screenshotLight": { + "type": "string", + "description": "Screenshot with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "screenshotDark": { + "type": "string", + "description": "Screenshot with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "canceled", + "failed" + ] + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildDuration": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "sourceSize", + "buildSize", + "totalSize", + "buildId", + "activate", + "screenshotLight", + "screenshotDark", + "status", + "buildLogs", + "buildDuration", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranch", + "providerBranchUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Project creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Project update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Project name.", + "x-example": "New Project" + }, + "description": { + "type": "string", + "description": "Project description.", + "x-example": "This is a new project." + }, + "teamId": { + "type": "string", + "description": "Project team ID.", + "x-example": "1592981250" + }, + "logo": { + "type": "string", + "description": "Project logo file ID.", + "x-example": "5f5c451b403cb" + }, + "url": { + "type": "string", + "description": "Project website URL.", + "x-example": "5f5c451b403cb" + }, + "legalName": { + "type": "string", + "description": "Company legal name.", + "x-example": "Company LTD." + }, + "legalCountry": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", + "x-example": "US" + }, + "legalState": { + "type": "string", + "description": "State name.", + "x-example": "New York" + }, + "legalCity": { + "type": "string", + "description": "City name.", + "x-example": "New York City." + }, + "legalAddress": { + "type": "string", + "description": "Company Address.", + "x-example": "620 Eighth Avenue, New York, NY 10018" + }, + "legalTaxId": { + "type": "string", + "description": "Company Tax ID.", + "x-example": "131102020" + }, + "authDuration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 60, + "format": "int32" + }, + "authLimit": { + "type": "integer", + "description": "Max users allowed. 0 is unlimited.", + "x-example": 100, + "format": "int32" + }, + "authSessionsLimit": { + "type": "integer", + "description": "Max sessions allowed per user. 100 maximum.", + "x-example": 10, + "format": "int32" + }, + "authPasswordHistory": { + "type": "integer", + "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", + "x-example": 5, + "format": "int32" + }, + "authPasswordDictionary": { + "type": "boolean", + "description": "Whether or not to check user's password against most commonly used passwords.", + "x-example": true + }, + "authPersonalDataCheck": { + "type": "boolean", + "description": "Whether or not to check the user password for similarity with their personal data.", + "x-example": true + }, + "authDisposableEmails": { + "type": "boolean", + "description": "Whether or not to disallow disposable email addresses during signup and email updates.", + "x-example": true + }, + "authCanonicalEmails": { + "type": "boolean", + "description": "Whether or not to require canonical email addresses during signup and email updates.", + "x-example": true + }, + "authFreeEmails": { + "type": "boolean", + "description": "Whether or not to disallow free email addresses during signup and email updates.", + "x-example": true + }, + "authMockNumbers": { + "type": "array", + "description": "An array of mock numbers and their corresponding verification codes (OTPs).", + "items": { + "$ref": "#\/components\/schemas\/mockNumber" + }, + "x-example": [ + {} + ] + }, + "authSessionAlerts": { + "type": "boolean", + "description": "Whether or not to send session alert emails to users.", + "x-example": true + }, + "authMembershipsUserName": { + "type": "boolean", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "authMembershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "authMembershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", + "x-example": true + }, + "authMembershipsUserId": { + "type": "boolean", + "description": "Whether or not to show user IDs in the teams membership response.", + "x-example": true + }, + "authMembershipsUserPhone": { + "type": "boolean", + "description": "Whether or not to show user phone numbers in the teams membership response.", + "x-example": true + }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, + "oAuthProviders": { + "type": "array", + "description": "List of Auth Providers.", + "items": { + "$ref": "#\/components\/schemas\/authProvider" + }, + "x-example": [ + {} + ] + }, + "platforms": { + "type": "array", + "description": "List of Platforms.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + }, + "x-example": {} + }, + "webhooks": { + "type": "array", + "description": "List of Webhooks.", + "items": { + "$ref": "#\/components\/schemas\/webhook" + }, + "x-example": {} + }, + "keys": { + "type": "array", + "description": "List of API Keys.", + "items": { + "$ref": "#\/components\/schemas\/key" + }, + "x-example": {} + }, + "devKeys": { + "type": "array", + "description": "List of dev keys.", + "items": { + "$ref": "#\/components\/schemas\/devKey" + }, + "x-example": {} + }, + "smtpEnabled": { + "type": "boolean", + "description": "Status for custom SMTP", + "x-example": false + }, + "smtpSenderName": { + "type": "string", + "description": "SMTP sender name", + "x-example": "John Appwrite" + }, + "smtpSenderEmail": { + "type": "string", + "description": "SMTP sender email", + "x-example": "john@appwrite.io" + }, + "smtpReplyToName": { + "type": "string", + "description": "SMTP reply to name", + "x-example": "Support Team" + }, + "smtpReplyToEmail": { + "type": "string", + "description": "SMTP reply to email", + "x-example": "support@appwrite.io" + }, + "smtpHost": { + "type": "string", + "description": "SMTP server host name", + "x-example": "mail.appwrite.io" + }, + "smtpPort": { + "type": "integer", + "description": "SMTP server port", + "x-example": 25, + "format": "int32" + }, + "smtpUsername": { + "type": "string", + "description": "SMTP server username", + "x-example": "emailuser" + }, + "smtpPassword": { + "type": "string", + "description": "SMTP server password. This property is write-only and always returned empty.", + "x-example": "" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "x-example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "labels": { + "type": "array", + "description": "Labels for the project.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "status": { + "type": "string", + "description": "Project status.", + "x-example": "active" + }, + "authEmailPassword": { + "type": "boolean", + "description": "Email\/Password auth method status", + "x-example": true + }, + "authUsersAuthMagicURL": { + "type": "boolean", + "description": "Magic URL auth method status", + "x-example": true + }, + "authEmailOtp": { + "type": "boolean", + "description": "Email (OTP) auth method status", + "x-example": true + }, + "authAnonymous": { + "type": "boolean", + "description": "Anonymous auth method status", + "x-example": true + }, + "authInvites": { + "type": "boolean", + "description": "Invites auth method status", + "x-example": true + }, + "authJWT": { + "type": "boolean", + "description": "JWT auth method status", + "x-example": true + }, + "authPhone": { + "type": "boolean", + "description": "Phone auth method status", + "x-example": true + }, + "serviceStatusForAccount": { + "type": "boolean", + "description": "Account service status", + "x-example": true + }, + "serviceStatusForAvatars": { + "type": "boolean", + "description": "Avatars service status", + "x-example": true + }, + "serviceStatusForDatabases": { + "type": "boolean", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTablesdb": { + "type": "boolean", + "description": "TablesDB service status", + "x-example": true + }, + "serviceStatusForLocale": { + "type": "boolean", + "description": "Locale service status", + "x-example": true + }, + "serviceStatusForHealth": { + "type": "boolean", + "description": "Health service status", + "x-example": true + }, + "serviceStatusForProject": { + "type": "boolean", + "description": "Project service status", + "x-example": true + }, + "serviceStatusForStorage": { + "type": "boolean", + "description": "Storage service status", + "x-example": true + }, + "serviceStatusForTeams": { + "type": "boolean", + "description": "Teams service status", + "x-example": true + }, + "serviceStatusForUsers": { + "type": "boolean", + "description": "Users service status", + "x-example": true + }, + "serviceStatusForVcs": { + "type": "boolean", + "description": "VCS service status", + "x-example": true + }, + "serviceStatusForSites": { + "type": "boolean", + "description": "Sites service status", + "x-example": true + }, + "serviceStatusForFunctions": { + "type": "boolean", + "description": "Functions service status", + "x-example": true + }, + "serviceStatusForProxy": { + "type": "boolean", + "description": "Proxy service status", + "x-example": true + }, + "serviceStatusForGraphql": { + "type": "boolean", + "description": "GraphQL service status", + "x-example": true + }, + "serviceStatusForMigrations": { + "type": "boolean", + "description": "Migrations service status", + "x-example": true + }, + "serviceStatusForMessaging": { + "type": "boolean", + "description": "Messaging service status", + "x-example": true + }, + "protocolStatusForRest": { + "type": "boolean", + "description": "REST protocol status", + "x-example": true + }, + "protocolStatusForGraphql": { + "type": "boolean", + "description": "GraphQL protocol status", + "x-example": true + }, + "protocolStatusForWebsocket": { + "type": "boolean", + "description": "Websocket protocol status", + "x-example": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "logo", + "url", + "legalName", + "legalCountry", + "legalState", + "legalCity", + "legalAddress", + "legalTaxId", + "authDuration", + "authLimit", + "authSessionsLimit", + "authPasswordHistory", + "authPasswordDictionary", + "authPersonalDataCheck", + "authDisposableEmails", + "authCanonicalEmails", + "authFreeEmails", + "authMockNumbers", + "authSessionAlerts", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", + "authMembershipsUserId", + "authMembershipsUserPhone", + "authInvalidateSessions", + "oAuthProviders", + "platforms", + "webhooks", + "keys", + "devKeys", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyToName", + "smtpReplyToEmail", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "labels", + "status", + "authEmailPassword", + "authUsersAuthMagicURL", + "authEmailOtp", + "authAnonymous", + "authInvites", + "authJWT", + "authPhone", + "serviceStatusForAccount", + "serviceStatusForAvatars", + "serviceStatusForDatabases", + "serviceStatusForTablesdb", + "serviceStatusForLocale", + "serviceStatusForHealth", + "serviceStatusForProject", + "serviceStatusForStorage", + "serviceStatusForTeams", + "serviceStatusForUsers", + "serviceStatusForVcs", + "serviceStatusForSites", + "serviceStatusForFunctions", + "serviceStatusForProxy", + "serviceStatusForGraphql", + "serviceStatusForMigrations", + "serviceStatusForMessaging", + "protocolStatusForRest", + "protocolStatusForGraphql", + "protocolStatusForWebsocket" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authMembershipsUserId": true, + "authMembershipsUserPhone": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyToName": "Support Team", + "smtpReplyToEmail": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [ + "vip" + ], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true + } + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Webhook creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Webhook update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "x-example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "x-example": "https:\/\/example.com\/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { + "type": "string" + }, + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] + }, + "tls": { + "type": "boolean", + "description": "Indicates if SSL \/ TLS certificate verification is enabled.", + "x-example": true + }, + "authUsername": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "authPassword": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + }, + "secret": { + "type": "string", + "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", + "x-example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "x-example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "x-example": "Failed to connect to remote server." + }, + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "url", + "events", + "tls", + "authUsername", + "authPassword", + "secret", + "enabled", + "logs", + "attempts" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "ephemeralKey": { + "description": "Ephemeral Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "devKey": { + "description": "DevKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "Dev API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "mockNumber": { + "description": "Mock Number", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "x-example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "x-example": "123456" + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "number", + "otp", + "$createdAt", + "$updatedAt" + ], + "example": { + "number": "+1612842323", + "otp": "123456", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oAuth2Github": { + "description": "OAuth2GitHub", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", + "x-example": "e4d87900000000540733" + }, + "clientSecret": { + "type": "string", + "description": "GitHub OAuth2 client secret.", + "x-example": "5e07c00000000000000000000000000000198bcc" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "e4d87900000000540733", + "clientSecret": "5e07c00000000000000000000000000000198bcc" + } + }, + "oAuth2Discord": { + "description": "OAuth2Discord", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Discord OAuth2 client ID.", + "x-example": "950722000000343754" + }, + "clientSecret": { + "type": "string", + "description": "Discord OAuth2 client secret.", + "x-example": "YmPXnM000000000000000000002zFg5D" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "950722000000343754", + "clientSecret": "YmPXnM000000000000000000002zFg5D" + } + }, + "oAuth2Figma": { + "description": "OAuth2Figma", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Figma OAuth2 client ID.", + "x-example": "byay5H0000000000VtiI40" + }, + "clientSecret": { + "type": "string", + "description": "Figma OAuth2 client secret.", + "x-example": "yEpOYn0000000000000000004iIsU5" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "byay5H0000000000VtiI40", + "clientSecret": "yEpOYn0000000000000000004iIsU5" + } + }, + "oAuth2Dropbox": { + "description": "OAuth2Dropbox", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appKey": { + "type": "string", + "description": "Dropbox OAuth2 app key.", + "x-example": "jl000000000009t" + }, + "appSecret": { + "type": "string", + "description": "Dropbox OAuth2 app secret.", + "x-example": "g200000000000vw" + } + }, + "required": [ + "$id", + "enabled", + "appKey", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appKey": "jl000000000009t", + "appSecret": "g200000000000vw" + } + }, + "oAuth2Dailymotion": { + "description": "OAuth2Dailymotion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Dailymotion OAuth2 API key.", + "x-example": "07a9000000000000067f" + }, + "apiSecret": { + "type": "string", + "description": "Dailymotion OAuth2 API secret.", + "x-example": "a399a90000000000000000000000000000d90639" + } + }, + "required": [ + "$id", + "enabled", + "apiKey", + "apiSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "apiKey": "07a9000000000000067f", + "apiSecret": "a399a90000000000000000000000000000d90639" + } + }, + "oAuth2Bitbucket": { + "description": "OAuth2Bitbucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "key": { + "type": "string", + "description": "Bitbucket OAuth2 key.", + "x-example": "Knt70000000000ByRc" + }, + "secret": { + "type": "string", + "description": "Bitbucket OAuth2 secret.", + "x-example": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "required": [ + "$id", + "enabled", + "key", + "secret" + ], + "example": { + "$id": "github", + "enabled": false, + "key": "Knt70000000000ByRc", + "secret": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "oAuth2Bitly": { + "description": "OAuth2Bitly", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Bitly OAuth2 client ID.", + "x-example": "d95151000000000000000000000000000067af9b" + }, + "clientSecret": { + "type": "string", + "description": "Bitly OAuth2 client secret.", + "x-example": "a13e250000000000000000000000000000d73095" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "d95151000000000000000000000000000067af9b", + "clientSecret": "a13e250000000000000000000000000000d73095" + } + }, + "oAuth2Box": { + "description": "OAuth2Box", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Box OAuth2 client ID.", + "x-example": "deglcs00000000000000000000x2og6y" + }, + "clientSecret": { + "type": "string", + "description": "Box OAuth2 client secret.", + "x-example": "OKM1f100000000000000000000eshEif" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "deglcs00000000000000000000x2og6y", + "clientSecret": "OKM1f100000000000000000000eshEif" + } + }, + "oAuth2Autodesk": { + "description": "OAuth2Autodesk", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Autodesk OAuth2 client ID.", + "x-example": "5zw90v00000000000000000000kVYXN7" + }, + "clientSecret": { + "type": "string", + "description": "Autodesk OAuth2 client secret.", + "x-example": "7I000000000000MW" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "5zw90v00000000000000000000kVYXN7", + "clientSecret": "7I000000000000MW" + } + }, + "oAuth2Google": { + "description": "OAuth2Google", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Google OAuth2 client ID.", + "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + }, + "clientSecret": { + "type": "string", + "description": "Google OAuth2 client secret.", + "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "oAuth2Zoom": { + "description": "OAuth2Zoom", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoom OAuth2 client ID.", + "x-example": "QMAC00000000000000w0AQ" + }, + "clientSecret": { + "type": "string", + "description": "Zoom OAuth2 client secret.", + "x-example": "GAWsG4000000000000000000007U01ON" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "QMAC00000000000000w0AQ", + "clientSecret": "GAWsG4000000000000000000007U01ON" + } + }, + "oAuth2Zoho": { + "description": "OAuth2Zoho", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoho OAuth2 client ID.", + "x-example": "1000.83C178000000000000000000RPNX0B" + }, + "clientSecret": { + "type": "string", + "description": "Zoho OAuth2 client secret.", + "x-example": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "1000.83C178000000000000000000RPNX0B", + "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "oAuth2Yandex": { + "description": "OAuth2Yandex", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yandex OAuth2 client ID.", + "x-example": "6a8a6a0000000000000000000091483c" + }, + "clientSecret": { + "type": "string", + "description": "Yandex OAuth2 client secret.", + "x-example": "bbf98500000000000000000000c75a63" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a8a6a0000000000000000000091483c", + "clientSecret": "bbf98500000000000000000000c75a63" + } + }, + "oAuth2X": { + "description": "OAuth2X", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "X OAuth2 customer key.", + "x-example": "slzZV0000000000000NFLaWT" + }, + "secretKey": { + "type": "string", + "description": "X OAuth2 secret key.", + "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "slzZV0000000000000NFLaWT", + "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "oAuth2WordPress": { + "description": "OAuth2WordPress", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "WordPress OAuth2 client ID.", + "x-example": "130005" + }, + "clientSecret": { + "type": "string", + "description": "WordPress OAuth2 client secret.", + "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "130005", + "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "oAuth2Twitch": { + "description": "OAuth2Twitch", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Twitch OAuth2 client ID.", + "x-example": "vvi0in000000000000000000ikmt9p" + }, + "clientSecret": { + "type": "string", + "description": "Twitch OAuth2 client secret.", + "x-example": "pmapue000000000000000000zylw3v" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "vvi0in000000000000000000ikmt9p", + "clientSecret": "pmapue000000000000000000zylw3v" + } + }, + "oAuth2Stripe": { + "description": "OAuth2Stripe", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Stripe OAuth2 client ID.", + "x-example": "ca_UKibXX0000000000000000000006byvR" + }, + "apiSecretKey": { + "type": "string", + "description": "Stripe OAuth2 API secret key.", + "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "apiSecretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "ca_UKibXX0000000000000000000006byvR", + "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "oAuth2Spotify": { + "description": "OAuth2Spotify", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Spotify OAuth2 client ID.", + "x-example": "6ec271000000000000000000009beace" + }, + "clientSecret": { + "type": "string", + "description": "Spotify OAuth2 client secret.", + "x-example": "db068a000000000000000000008b5b9f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6ec271000000000000000000009beace", + "clientSecret": "db068a000000000000000000008b5b9f" + } + }, + "oAuth2Slack": { + "description": "OAuth2Slack", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Slack OAuth2 client ID.", + "x-example": "23000000089.15000000000023" + }, + "clientSecret": { + "type": "string", + "description": "Slack OAuth2 client secret.", + "x-example": "81656000000000000000000000f3d2fd" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "23000000089.15000000000023", + "clientSecret": "81656000000000000000000000f3d2fd" + } + }, + "oAuth2Podio": { + "description": "OAuth2Podio", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Podio OAuth2 client ID.", + "x-example": "appwrite-oauth-test-app" + }, + "clientSecret": { + "type": "string", + "description": "Podio OAuth2 client secret.", + "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-oauth-test-app", + "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "oAuth2Notion": { + "description": "OAuth2Notion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauthClientId": { + "type": "string", + "description": "Notion OAuth2 client ID.", + "x-example": "341d8700-0000-0000-0000-000000446ee3" + }, + "oauthClientSecret": { + "type": "string", + "description": "Notion OAuth2 client secret.", + "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "required": [ + "$id", + "enabled", + "oauthClientId", + "oauthClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", + "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "oAuth2Salesforce": { + "description": "OAuth2Salesforce", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "Salesforce OAuth2 consumer key.", + "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + }, + "customerSecret": { + "type": "string", + "description": "Salesforce OAuth2 consumer secret.", + "x-example": "3w000000000000e2" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "customerSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "customerSecret": "3w000000000000e2" + } + }, + "oAuth2Yahoo": { + "description": "OAuth2Yahoo", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yahoo OAuth2 client ID.", + "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" + }, + "clientSecret": { + "type": "string", + "description": "Yahoo OAuth2 client secret.", + "x-example": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "clientSecret": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "oAuth2Linkedin": { + "description": "OAuth2Linkedin", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "LinkedIn OAuth2 client ID.", + "x-example": "770000000000dv" + }, + "primaryClientSecret": { + "type": "string", + "description": "LinkedIn OAuth2 primary client secret.", + "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "primaryClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "770000000000dv", + "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "oAuth2Disqus": { + "description": "OAuth2Disqus", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "publicKey": { + "type": "string", + "description": "Disqus OAuth2 public key.", + "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + }, + "secretKey": { + "type": "string", + "description": "Disqus OAuth2 secret key.", + "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "required": [ + "$id", + "enabled", + "publicKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "oAuth2Amazon": { + "description": "OAuth2Amazon", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Amazon OAuth2 client ID.", + "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" + }, + "clientSecret": { + "type": "string", + "description": "Amazon OAuth2 client secret.", + "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "oAuth2Etsy": { + "description": "OAuth2Etsy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "keyString": { + "type": "string", + "description": "Etsy OAuth2 keystring.", + "x-example": "nsgzxh0000000000008j85a2" + }, + "sharedSecret": { + "type": "string", + "description": "Etsy OAuth2 shared secret.", + "x-example": "tp000000ru" + } + }, + "required": [ + "$id", + "enabled", + "keyString", + "sharedSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "keyString": "nsgzxh0000000000008j85a2", + "sharedSecret": "tp000000ru" + } + }, + "oAuth2Facebook": { + "description": "OAuth2Facebook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appId": { + "type": "string", + "description": "Facebook OAuth2 app ID.", + "x-example": "260600000007694" + }, + "appSecret": { + "type": "string", + "description": "Facebook OAuth2 app secret.", + "x-example": "2d0b2800000000000000000000d38af4" + } + }, + "required": [ + "$id", + "enabled", + "appId", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appId": "260600000007694", + "appSecret": "2d0b2800000000000000000000d38af4" + } + }, + "oAuth2Tradeshift": { + "description": "OAuth2Tradeshift", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauth2ClientId": { + "type": "string", + "description": "Tradeshift OAuth2 client ID.", + "x-example": "appwrite-test-org.appwrite-test-app" + }, + "oauth2ClientSecret": { + "type": "string", + "description": "Tradeshift OAuth2 client secret.", + "x-example": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "required": [ + "$id", + "enabled", + "oauth2ClientId", + "oauth2ClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauth2ClientId": "appwrite-test-org.appwrite-test-app", + "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "oAuth2Paypal": { + "description": "OAuth2Paypal", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "PayPal OAuth2 client ID.", + "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" + }, + "secretKey": { + "type": "string", + "description": "PayPal OAuth2 secret key.", + "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "oAuth2Gitlab": { + "description": "OAuth2Gitlab", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "GitLab OAuth2 application ID.", + "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" + }, + "secret": { + "type": "string", + "description": "GitLab OAuth2 secret.", + "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" + }, + "endpoint": { + "type": "string", + "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", + "x-example": "https:\/\/gitlab.com" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "secret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "endpoint": "https:\/\/gitlab.com" + } + }, + "oAuth2Authentik": { + "description": "OAuth2Authentik", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Authentik OAuth2 client ID.", + "x-example": "dTKOPa0000000000000000000000000000e7G8hv" + }, + "clientSecret": { + "type": "string", + "description": "Authentik OAuth2 client secret.", + "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" + }, + "endpoint": { + "type": "string", + "description": "Authentik OAuth2 endpoint domain.", + "x-example": "example.authentik.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dTKOPa0000000000000000000000000000e7G8hv", + "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "endpoint": "example.authentik.com" + } + }, + "oAuth2Auth0": { + "description": "OAuth2Auth0", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Auth0 OAuth2 client ID.", + "x-example": "OaOkIA000000000000000000005KLSYq" + }, + "clientSecret": { + "type": "string", + "description": "Auth0 OAuth2 client secret.", + "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" + }, + "endpoint": { + "type": "string", + "description": "Auth0 OAuth2 endpoint domain.", + "x-example": "example.us.auth0.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "OaOkIA000000000000000000005KLSYq", + "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "endpoint": "example.us.auth0.com" + } + }, + "oAuth2FusionAuth": { + "description": "OAuth2FusionAuth", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "FusionAuth OAuth2 client ID.", + "x-example": "b2222c00-0000-0000-0000-000000862097" + }, + "clientSecret": { + "type": "string", + "description": "FusionAuth OAuth2 client secret.", + "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" + }, + "endpoint": { + "type": "string", + "description": "FusionAuth OAuth2 endpoint domain.", + "x-example": "example.fusionauth.io" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "b2222c00-0000-0000-0000-000000862097", + "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", + "endpoint": "example.fusionauth.io" + } + }, + "oAuth2Keycloak": { + "description": "OAuth2Keycloak", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Keycloak OAuth2 client ID.", + "x-example": "appwrite-o0000000st-app" + }, + "clientSecret": { + "type": "string", + "description": "Keycloak OAuth2 client secret.", + "x-example": "jdjrJd00000000000000000000HUsaZO" + }, + "endpoint": { + "type": "string", + "description": "Keycloak OAuth2 endpoint domain.", + "x-example": "keycloak.example.com" + }, + "realmName": { + "type": "string", + "description": "Keycloak OAuth2 realm name.", + "x-example": "appwrite-realm" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint", + "realmName" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-o0000000st-app", + "clientSecret": "jdjrJd00000000000000000000HUsaZO", + "endpoint": "keycloak.example.com", + "realmName": "appwrite-realm" + } + }, + "oAuth2Oidc": { + "description": "OAuth2Oidc", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "OpenID Connect OAuth2 client ID.", + "x-example": "qibI2x0000000000000000000000000006L2YFoG" + }, + "clientSecret": { + "type": "string", + "description": "OpenID Connect OAuth2 client secret.", + "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", + "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/token" + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "wellKnownURL", + "authorizationURL", + "tokenUrl", + "userInfoUrl" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "qibI2x0000000000000000000000000006L2YFoG", + "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", + "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", + "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", + "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "oAuth2Okta": { + "description": "OAuth2Okta", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Okta OAuth2 client ID.", + "x-example": "0oa00000000000000698" + }, + "clientSecret": { + "type": "string", + "description": "Okta OAuth2 client secret.", + "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" + }, + "domain": { + "type": "string", + "description": "Okta OAuth2 domain.", + "x-example": "trial-6400025.okta.com" + }, + "authorizationServerId": { + "type": "string", + "description": "Okta OAuth2 authorization server ID.", + "x-example": "aus000000000000000h7z" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "domain", + "authorizationServerId" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "0oa00000000000000698", + "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "domain": "trial-6400025.okta.com", + "authorizationServerId": "aus000000000000000h7z" + } + }, + "oAuth2Kick": { + "description": "OAuth2Kick", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Kick OAuth2 client ID.", + "x-example": "01KQ7C00000000000001MFHS32" + }, + "clientSecret": { + "type": "string", + "description": "Kick OAuth2 client secret.", + "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "01KQ7C00000000000001MFHS32", + "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "oAuth2Apple": { + "description": "OAuth2Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "apple" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "serviceId": { + "type": "string", + "description": "Apple OAuth2 service ID.", + "x-example": "ip.appwrite.app.web" + }, + "keyId": { + "type": "string", + "description": "Apple OAuth2 key ID.", + "x-example": "P4000000N8" + }, + "teamId": { + "type": "string", + "description": "Apple OAuth2 team ID.", + "x-example": "D4000000R6" + }, + "p8File": { + "type": "string", + "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", + "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "required": [ + "$id", + "enabled", + "serviceId", + "keyId", + "teamId", + "p8File" + ], + "example": { + "$id": "apple", + "enabled": false, + "serviceId": "ip.appwrite.app.web", + "keyId": "P4000000N8", + "teamId": "D4000000R6", + "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "oAuth2Microsoft": { + "description": "OAuth2Microsoft", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "Microsoft OAuth2 application ID.", + "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" + }, + "applicationSecret": { + "type": "string", + "description": "Microsoft OAuth2 application secret.", + "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", + "x-example": "common" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "applicationSecret", + "tenant" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", + "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "tenant": "common" + } + }, + "oAuth2ProviderList": { + "description": "OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers in the given project.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of OAuth2 providers.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "policyPasswordDictionary": { + "description": "Policy Password Dictionary", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password dictionary policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordHistory": { + "description": "Policy Password History", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Password history length. A value of 0 means the policy is disabled.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 5 + } + }, + "policyPasswordPersonalData": { + "description": "Policy Password Personal Data", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password personal data policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionAlert": { + "description": "Policy Session Alert", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session alert policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionDuration": { + "description": "Policy Session Duration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "duration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 3600, + "format": "int32" + } + }, + "required": [ + "$id", + "duration" + ], + "example": { + "$id": "password-dictionary", + "duration": 3600 + } + }, + "policySessionInvalidation": { + "description": "Policy Session Invalidation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session invalidation policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionLimit": { + "description": "Policy Session Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 10 + } + }, + "policyUserLimit": { + "description": "Policy User Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "x-example": 100, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 100 + } + }, + "policyMembershipPrivacy": { + "description": "Policy Membership Privacy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "userId": { + "type": "boolean", + "description": "Whether user ID is visible in memberships.", + "x-example": true + }, + "userEmail": { + "type": "boolean", + "description": "Whether user email is visible in memberships.", + "x-example": true + }, + "userPhone": { + "type": "boolean", + "description": "Whether user phone is visible in memberships.", + "x-example": true + }, + "userName": { + "type": "boolean", + "description": "Whether user name is visible in memberships.", + "x-example": true + }, + "userMFA": { + "type": "boolean", + "description": "Whether user MFA status is visible in memberships.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "userEmail", + "userPhone", + "userName", + "userMFA" + ], + "example": { + "$id": "password-dictionary", + "userId": true, + "userEmail": true, + "userPhone": true, + "userName": true, + "userMFA": true + } + }, + "authProvider": { + "description": "AuthProvider", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Auth Provider.", + "x-example": "github" + }, + "name": { + "type": "string", + "description": "Auth Provider name.", + "x-example": "GitHub" + }, + "appId": { + "type": "string", + "description": "OAuth 2.0 application ID.", + "x-example": "259125845563242502" + }, + "secret": { + "type": "string", + "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Auth Provider is active and can be used to create session.", + "x-example": "" + } + }, + "required": [ + "key", + "name", + "appId", + "secret", + "enabled" + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "", + "enabled": "" + } + }, + "platformWeb": { + "description": "Platform Web", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": "app.example.com" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "hostname", + "key" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" + } + }, + "platformApple": { + "description": "Platform Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "bundleIdentifier" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" + } + }, + "platformAndroid": { + "description": "Platform Android", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "applicationId": { + "type": "string", + "description": "Android application ID.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "applicationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" + } + }, + "platformWindows": { + "description": "Platform Windows", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageIdentifierName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" + } + }, + "platformLinux": { + "description": "Platform Linux", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageName": { + "type": "string", + "description": "Linux package name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" + } + }, + "platformList": { + "description": "Platforms List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of platforms in the given project.", + "x-example": 5, + "format": "int32" + }, + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "platforms" + ], + "example": { + "total": 5, + "platforms": "" + } + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "secret", + "resourceType", + "resourceId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "healthAntivirus": { + "description": "Health Antivirus", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Antivirus version.", + "x-example": "1.0.0" + }, + "status": { + "type": "string", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] + } + }, + "required": [ + "version", + "status" + ], + "example": { + "version": "1.0.0", + "status": "online" + } + }, + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": [ + "size" + ], + "example": { + "size": 8 + } + }, + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "ping": { + "type": "integer", + "description": "Duration in milliseconds how long the health check took.", + "x-example": 128, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" + } + }, + "required": [ + "name", + "ping", + "status" + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } + }, + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } + }, + "healthTime": { + "description": "Health Time", + "type": "object", + "properties": { + "remoteTime": { + "type": "integer", + "description": "Current unix timestamp on trustful remote server.", + "x-example": 1639490751, + "format": "int32" + }, + "localTime": { + "type": "integer", + "description": "Current unix timestamp of local server where Appwrite runs.", + "x-example": 1639490844, + "format": "int32" + }, + "diff": { + "type": "integer", + "description": "Difference of unix remote and local timestamps in milliseconds.", + "x-example": 93, + "format": "int32" + } + }, + "required": [ + "remoteTime", + "localTime", + "diff" + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } + }, + "metric": { + "description": "Metric", + "type": "object", + "properties": { + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" + }, + "date": { + "type": "string", + "description": "The date at which this metric was aggregated in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "value", + "date" + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } + }, + "metricBreakdown": { + "description": "Metric Breakdown", + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c16897e", + "nullable": true + }, + "name": { + "type": "string", + "description": "Resource name.", + "x-example": "Documents" + }, + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "The estimated value of this metric at the end of the period.", + "x-example": 1, + "format": "double", + "nullable": true + } + }, + "required": [ + "name", + "value" + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } + }, + "usageDatabases": { + "description": "UsageDatabases", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of databases.", + "x-example": 0, + "format": "int32" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated number of total databases storage in bytes.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "Aggregated number of databases per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "An array of the aggregated number of databases storage in bytes per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "databasesTotal", + "collectionsTotal", + "tablesTotal", + "documentsTotal", + "rowsTotal", + "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "databases", + "collections", + "tables", + "documents", + "rows", + "storage", + "databasesReads", + "databasesWrites" + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } + }, + "usageDatabase": { + "description": "UsageDatabase", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated number of total storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "tablesTotal", + "documentsTotal", + "rowsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "tables", + "documents", + "rows", + "storage", + "databaseReads", + "databaseWrites" + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } + }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } + }, + "usageCollection": { + "description": "UsageCollection", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of of documents.", + "x-example": 0, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "documentsTotal", + "documents" + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } + }, + "usageUsers": { + "description": "UsageUsers", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of statistics of users.", + "x-example": 0, + "format": "int32" + }, + "sessionsTotal": { + "type": "integer", + "description": "Total aggregated number of active sessions.", + "x-example": 0, + "format": "int32" + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "sessions": { + "type": "array", + "description": "Aggregated number of active sessions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "usersTotal", + "sessionsTotal", + "users", + "sessions" + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } + }, + "usagePresence": { + "description": "UsagePresence", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "usersOnlineTotal": { + "type": "integer", + "description": "Current total number of online users.", + "x-example": 0, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "Aggregated number of online users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "usersOnlineTotal", + "presences" + ], + "example": { + "range": "30d", + "usersOnlineTotal": 0, + "presences": [] + } + }, + "usageStorage": { + "description": "StorageUsage", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "bucketsTotal": { + "type": "integer", + "description": "Total aggregated number of buckets", + "x-example": 0, + "format": "int32" + }, + "filesTotal": { + "type": "integer", + "description": "Total aggregated number of files.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated number of files storage (in bytes).", + "x-example": 0, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "Aggregated number of buckets per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "files": { + "type": "array", + "description": "Aggregated number of files per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated number of files storage (in bytes) per period .", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "bucketsTotal", + "filesTotal", + "filesStorageTotal", + "buckets", + "files", + "storage" + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } + }, + "usageBuckets": { + "description": "UsageBuckets", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "filesTotal": { + "type": "integer", + "description": "Total aggregated number of bucket files.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated number of bucket files storage (in bytes).", + "x-example": 0, + "format": "int32" + }, + "files": { + "type": "array", + "description": "Aggregated number of bucket files per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated number of bucket storage files (in bytes) per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformations": { + "type": "array", + "description": "Aggregated number of files transformations per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformationsTotal": { + "type": "integer", + "description": "Total aggregated number of files transformations.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "range", + "filesTotal", + "filesStorageTotal", + "files", + "storage", + "imageTransformations", + "imageTransformationsTotal" + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } + }, + "usageFunctions": { + "description": "UsageFunctions", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "functionsTotal": { + "type": "integer", + "description": "Total aggregated number of functions.", + "x-example": 0, + "format": "int32" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of functions deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of functions deployment storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of functions build.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of functions build storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of functions build compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of functions build mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of functions execution.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of functions execution compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of functions execution mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "Aggregated number of functions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": 0 + }, + "deployments": { + "type": "array", + "description": "Aggregated number of functions deployment per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of functions deployment storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed function builds.", + "x-example": 0, + "format": "int32" + }, + "builds": { + "type": "array", + "description": "Aggregated number of functions build per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of functions build storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of functions build compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated sum of functions build mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of functions execution per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of functions execution compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of functions mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful function builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed function builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "functionsTotal", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "functions", + "deployments", + "deploymentsStorage", + "buildsSuccessTotal", + "buildsFailedTotal", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed" + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } + }, + "usageFunction": { + "description": "UsageFunction", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of function deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of function deployments storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of function builds storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeAverage": { + "type": "integer", + "description": "Average builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "Aggregated number of function deployments per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of function deployments storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "builds": { + "type": "array", + "description": "Aggregated number of function builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of function builds storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of function builds compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated number of function builds mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of function executions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of function executions compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of function mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsSuccessTotal", + "buildsFailedTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsTimeAverage", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "deployments", + "deploymentsStorage", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed" + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } + }, + "usageSites": { + "description": "UsageSites", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "sitesTotal": { + "type": "integer", + "description": "Total aggregated number of sites.", + "x-example": 0, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "Aggregated number of sites per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of sites deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of sites deployment storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of sites build.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of sites build storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of sites build compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of sites build mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of sites execution.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of sites execution compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of sites execution mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "requestsTotal": { + "type": "integer", + "description": "Total aggregated number of requests.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "inboundTotal": { + "type": "integer", + "description": "Total aggregated inbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "inbound": { + "type": "array", + "description": "Aggregated number of inbound bandwidth per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "outboundTotal": { + "type": "integer", + "description": "Total aggregated outbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "outbound": { + "type": "array", + "description": "Aggregated number of outbound bandwidth per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "deployments": { + "type": "array", + "description": "Aggregated number of sites deployment per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of sites deployment storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful site builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed site builds.", + "x-example": 0, + "format": "int32" + }, + "builds": { + "type": "array", + "description": "Aggregated number of sites build per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of sites build storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of sites build compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated sum of sites build mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of sites execution per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of sites execution compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of sites mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful site builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed site builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "sitesTotal", + "sites", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "requestsTotal", + "requests", + "inboundTotal", + "inbound", + "outboundTotal", + "outbound", + "deployments", + "deploymentsStorage", + "buildsSuccessTotal", + "buildsFailedTotal", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed" + ], + "example": { + "range": "30d", + "sitesTotal": 0, + "sites": [], + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [], + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } + }, + "usageSite": { + "description": "UsageSite", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of function deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of function deployments storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of function builds storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeAverage": { + "type": "integer", + "description": "Average builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "Aggregated number of function deployments per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of function deployments storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "builds": { + "type": "array", + "description": "Aggregated number of function builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of function builds storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of function builds compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated number of function builds mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of function executions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of function executions compute time per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of function mbSeconds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed builds per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "requestsTotal": { + "type": "integer", + "description": "Total aggregated number of requests.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "inboundTotal": { + "type": "integer", + "description": "Total aggregated inbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "inbound": { + "type": "array", + "description": "Aggregated number of inbound bandwidth per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "outboundTotal": { + "type": "integer", + "description": "Total aggregated outbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "outbound": { + "type": "array", + "description": "Aggregated number of outbound bandwidth per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsSuccessTotal", + "buildsFailedTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsTimeAverage", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "deployments", + "deploymentsStorage", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed", + "requestsTotal", + "requests", + "inboundTotal", + "inbound", + "outboundTotal", + "outbound" + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } + }, + "usageProject": { + "description": "UsageProject", + "type": "object", + "properties": { + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents in legacy\/tablesdb.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDocumentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents in documentsdb.", + "x-example": 0, + "format": "int32" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of databases.", + "x-example": 0, + "format": "int32" + }, + "documentsdbTotal": { + "type": "integer", + "description": "Total aggregated number of documentsdb.", + "x-example": 0, + "format": "int32" + }, + "databasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of databases storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of documentsdb databases storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of users.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of files storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "functionsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of functions storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of builds storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of deployments storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "bucketsTotal": { + "type": "integer", + "description": "Total aggregated number of buckets.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesReadsTotal": { + "type": "integer", + "description": "Total number of documentsdb databases reads.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesWritesTotal": { + "type": "integer", + "description": "Total number of documentsdb databases writes.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "network": { + "type": "array", + "description": "Aggregated number of consumed bandwidth per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of executions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of executions by functions.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "bucketsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of usage by buckets.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "databasesStorageBreakdown": { + "type": "array", + "description": "An array of the aggregated breakdown of storage usage by databases.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "executionsMbSecondsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "buildsMbSecondsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of build mbSeconds by functions.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "functionsStorageBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of functions storage size (in bytes).", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "authPhoneTotal": { + "type": "integer", + "description": "Total aggregated number of phone auth.", + "x-example": 0, + "format": "int32" + }, + "authPhoneEstimate": { + "type": "number", + "description": "Estimated total aggregated cost of phone auth.", + "x-example": 0, + "format": "double" + }, + "authPhoneCountryBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of phone auth by country.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesReads": { + "type": "array", + "description": "An array of aggregated number of documentsdb database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesWrites": { + "type": "array", + "description": "An array of aggregated number of documentsdb database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesStorage": { + "type": "array", + "description": "An array of aggregated sum of documentsdb databases storage size (in bytes) per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformations": { + "type": "array", + "description": "An array of aggregated number of image transformations.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformationsTotal": { + "type": "integer", + "description": "Total aggregated number of image transformations.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB databases.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbCollectionsTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB collections.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDocumentsTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB documents.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesStorageTotal": { + "type": "integer", + "description": "Total aggregated VectorsDB storage (bytes).", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesReadsTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB reads.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesWritesTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB writes.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabases": { + "type": "array", + "description": "Aggregated VectorsDB databases per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "vectorsdbCollections": { + "type": "array", + "description": "Aggregated VectorsDB collections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "vectorsdbDocuments": { + "type": "array", + "description": "Aggregated VectorsDB documents per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesStorage": { + "type": "array", + "description": "Aggregated VectorsDB storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesReads": { + "type": "array", + "description": "Aggregated VectorsDB reads per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesWrites": { + "type": "array", + "description": "Aggregated VectorsDB writes per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "embeddingsText": { + "type": "object", + "description": "Aggregated number of text embedding calls per period.", + "x-example": [], + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextTokens": { + "type": "object", + "description": "Aggregated number of tokens processed by text embeddings per period.", + "x-example": [], + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextDuration": { + "type": "object", + "description": "Aggregated duration spent generating text embeddings per period.", + "x-example": [], + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextErrors": { + "type": "object", + "description": "Aggregated number of errors while generating text embeddings per period.", + "x-example": [], + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextTotal": { + "type": "object", + "description": "Total aggregated number of text embedding calls.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextTokensTotal": { + "type": "object", + "description": "Total aggregated number of tokens processed by text.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextDurationTotal": { + "type": "object", + "description": "Total aggregated duration spent generating text embeddings.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + }, + "embeddingsTextErrorsTotal": { + "type": "object", + "description": "Total aggregated number of errors while generating text embeddings.", + "x-example": 0, + "items": { + "$ref": "#\/components\/schemas\/metric" + } + } + }, + "required": [ + "executionsTotal", + "documentsTotal", + "documentsdbDocumentsTotal", + "rowsTotal", + "databasesTotal", + "documentsdbTotal", + "databasesStorageTotal", + "documentsdbDatabasesStorageTotal", + "usersTotal", + "filesStorageTotal", + "functionsStorageTotal", + "buildsStorageTotal", + "deploymentsStorageTotal", + "bucketsTotal", + "executionsMbSecondsTotal", + "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "documentsdbDatabasesReadsTotal", + "documentsdbDatabasesWritesTotal", + "requests", + "network", + "users", + "executions", + "executionsBreakdown", + "bucketsBreakdown", + "databasesStorageBreakdown", + "executionsMbSecondsBreakdown", + "buildsMbSecondsBreakdown", + "functionsStorageBreakdown", + "authPhoneTotal", + "authPhoneEstimate", + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites", + "documentsdbDatabasesReads", + "documentsdbDatabasesWrites", + "documentsdbDatabasesStorage", + "imageTransformations", + "imageTransformationsTotal", + "vectorsdbDatabasesTotal", + "vectorsdbCollectionsTotal", + "vectorsdbDocumentsTotal", + "vectorsdbDatabasesStorageTotal", + "vectorsdbDatabasesReadsTotal", + "vectorsdbDatabasesWritesTotal", + "vectorsdbDatabases", + "vectorsdbCollections", + "vectorsdbDocuments", + "vectorsdbDatabasesStorage", + "vectorsdbDatabasesReads", + "vectorsdbDatabasesWrites", + "embeddingsText", + "embeddingsTextTokens", + "embeddingsTextDuration", + "embeddingsTextErrors", + "embeddingsTextTotal", + "embeddingsTextTokensTotal", + "embeddingsTextDurationTotal", + "embeddingsTextErrorsTotal" + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "documentsdbDocumentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "documentsdbTotal": 0, + "databasesStorageTotal": 0, + "documentsdbDatabasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "documentsdbDatabasesReadsTotal": 0, + "documentsdbDatabasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "documentsdbDatabasesReads": [], + "documentsdbDatabasesWrites": [], + "documentsdbDatabasesStorage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0, + "vectorsdbDatabasesTotal": 0, + "vectorsdbCollectionsTotal": 0, + "vectorsdbDocumentsTotal": 0, + "vectorsdbDatabasesStorageTotal": 0, + "vectorsdbDatabasesReadsTotal": 0, + "vectorsdbDatabasesWritesTotal": 0, + "vectorsdbDatabases": [], + "vectorsdbCollections": [], + "vectorsdbDocuments": [], + "vectorsdbDatabasesStorage": [], + "vectorsdbDatabasesReads": [], + "vectorsdbDatabasesWrites": [], + "embeddingsText": [], + "embeddingsTextTokens": [], + "embeddingsTextDuration": [], + "embeddingsTextErrors": [], + "embeddingsTextTotal": 0, + "embeddingsTextTokensTotal": 0, + "embeddingsTextDurationTotal": 0, + "embeddingsTextErrorsTotal": 0 + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } + }, + "proxyRule": { + "description": "Rule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Rule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Rule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": "appwrite.company.com" + }, + "type": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", + "x-example": "deployment" + }, + "trigger": { + "type": "string", + "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", + "x-example": "manual" + }, + "redirectUrl": { + "type": "string", + "description": "URL to redirect to. Used if type is \"redirect\"", + "x-example": "https:\/\/appwrite.io\/docs" + }, + "redirectStatusCode": { + "type": "integer", + "description": "Status code to apply during redirect. Used if type is \"redirect\"", + "x-example": 301, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "ID of deployment. Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" + }, + "deploymentResourceType": { + "type": "string", + "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "x-example": "function", + "enum": [ + "function", + "site" + ], + "nullable": true + }, + "deploymentResourceId": { + "type": "string", + "description": "ID deployment's resource. Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" + }, + "deploymentVcsProviderBranch": { + "type": "string", + "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", + "x-example": "main" + }, + "status": { + "type": "string", + "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] + }, + "logs": { + "type": "string", + "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", + "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + }, + "renewAt": { + "type": "string", + "description": "Certificate auto-renewal date in ISO 8601 format.", + "x-example": "datetime" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "type", + "trigger", + "redirectUrl", + "redirectStatusCode", + "deploymentId", + "deploymentResourceId", + "deploymentVcsProviderBranch", + "status", + "logs", + "renewAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "main", + "status": "verified", + "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", + "renewAt": "datetime" + } + }, + "schedule": { + "description": "Schedule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Schedule ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Schedule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Schedule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type associated with this schedule.", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "The resource ID associated with this schedule.", + "x-example": "5e5ea5c16897e" + }, + "resourceUpdatedAt": { + "type": "string", + "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { + "type": "string", + "description": "The project ID associated with this schedule.", + "x-example": "5e5ea5c16897e" + }, + "schedule": { + "type": "string", + "description": "The CRON schedule expression.", + "x-example": "5 4 * * *" + }, + "data": { + "type": "object", + "description": "Schedule data used to store resource-specific context needed for execution.", + "x-example": [] + }, + "active": { + "type": "boolean", + "description": "Whether the schedule is active.", + "x-example": true + }, + "region": { + "type": "string", + "description": "The region where the schedule is deployed.", + "x-example": "fra" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "resourceType", + "resourceId", + "resourceUpdatedAt", + "projectId", + "schedule", + "data", + "active", + "region" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "function", + "resourceId": "5e5ea5c16897e", + "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "schedule": "5 4 * * *", + "data": [], + "active": true, + "region": "fra" + } + }, + "emailTemplate": { + "description": "EmailTemplate", + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Template type", + "x-example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." + }, + "senderName": { + "type": "string", + "description": "Name of the sender", + "x-example": "My User" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "x-example": "mail@appwrite.io" + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" + }, + "replyToName": { + "type": "string", + "description": "Reply to name", + "x-example": "Support Team" + }, + "subject": { + "type": "string", + "description": "Email subject", + "x-example": "Please verify your email address" + } + }, + "required": [ + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" + ], + "example": { + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" + } + }, + "consoleVariables": { + "description": "Console Variables", + "type": "object", + "properties": { + "_APP_DOMAIN_TARGET_CNAME": { + "type": "string", + "description": "CNAME target for your Appwrite custom domains.", + "x-example": "appwrite.io" + }, + "_APP_DOMAIN_TARGET_A": { + "type": "string", + "description": "A target for your Appwrite custom domains.", + "x-example": "127.0.0.1" + }, + "_APP_COMPUTE_BUILD_TIMEOUT": { + "type": "integer", + "description": "Maximum build timeout in seconds.", + "x-example": 900, + "format": "int32" + }, + "_APP_DOMAIN_TARGET_AAAA": { + "type": "string", + "description": "AAAA target for your Appwrite custom domains.", + "x-example": "::1" + }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, + "_APP_STORAGE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for file upload in bytes.", + "x-example": "30000000", + "format": "int32" + }, + "_APP_COMPUTE_SIZE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for deployment in bytes.", + "x-example": "30000000", + "format": "int32" + }, + "_APP_USAGE_STATS": { + "type": "string", + "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", + "x-example": "enabled" + }, + "_APP_VCS_ENABLED": { + "type": "boolean", + "description": "Defines if VCS (Version Control System) is enabled.", + "x-example": true + }, + "_APP_DOMAIN_ENABLED": { + "type": "boolean", + "description": "Defines if main domain is configured. If so, custom domains can be created.", + "x-example": true + }, + "_APP_ASSISTANT_ENABLED": { + "type": "boolean", + "description": "Defines if AI assistant is enabled.", + "x-example": true + }, + "_APP_DOMAIN_SITES": { + "type": "string", + "description": "A comma separated list of domains to use for site URLs.", + "x-example": "sites.localhost,sites.example.com" + }, + "_APP_DOMAIN_FUNCTIONS": { + "type": "string", + "description": "A domain to use for function URLs.", + "x-example": "functions.localhost" + }, + "_APP_OPTIONS_FORCE_HTTPS": { + "type": "string", + "description": "Defines if HTTPS is enforced for all requests.", + "x-example": "enabled" + }, + "_APP_DOMAINS_NAMESERVERS": { + "type": "string", + "description": "Comma-separated list of nameservers.", + "x-example": "ns1.example.com,ns2.example.com" + }, + "_APP_DB_ADAPTER": { + "type": "string", + "description": "Database adapter in use.", + "x-example": "mysql" + }, + "supportForRelationships": { + "type": "boolean", + "description": "Whether the database adapter supports relationships.", + "x-example": true + }, + "supportForOperators": { + "type": "boolean", + "description": "Whether the database adapter supports operators.", + "x-example": true + }, + "supportForSpatials": { + "type": "boolean", + "description": "Whether the database adapter supports spatial attributes.", + "x-example": true + }, + "supportForSpatialIndexNull": { + "type": "boolean", + "description": "Whether the database adapter supports spatial indexes on nullable columns.", + "x-example": false + }, + "supportForFulltextWildcard": { + "type": "boolean", + "description": "Whether the database adapter supports fulltext wildcard search.", + "x-example": true + }, + "supportForMultipleFulltextIndexes": { + "type": "boolean", + "description": "Whether the database adapter supports multiple fulltext indexes per collection.", + "x-example": true + }, + "supportForAttributeResizing": { + "type": "boolean", + "description": "Whether the database adapter supports resizing attributes.", + "x-example": true + }, + "supportForSchemas": { + "type": "boolean", + "description": "Whether the database adapter supports fixed schemas with row width limits.", + "x-example": true + }, + "maxIndexLength": { + "type": "integer", + "description": "Maximum index length supported by the database adapter.", + "x-example": 768, + "format": "int32" + }, + "supportForIntegerIds": { + "type": "boolean", + "description": "Whether the database adapter uses integer sequence IDs.", + "x-example": true + } + }, + "required": [ + "_APP_DOMAIN_TARGET_CNAME", + "_APP_DOMAIN_TARGET_A", + "_APP_COMPUTE_BUILD_TIMEOUT", + "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", + "_APP_STORAGE_LIMIT", + "_APP_COMPUTE_SIZE_LIMIT", + "_APP_USAGE_STATS", + "_APP_VCS_ENABLED", + "_APP_DOMAIN_ENABLED", + "_APP_ASSISTANT_ENABLED", + "_APP_DOMAIN_SITES", + "_APP_DOMAIN_FUNCTIONS", + "_APP_OPTIONS_FORCE_HTTPS", + "_APP_DOMAINS_NAMESERVERS", + "_APP_DB_ADAPTER", + "supportForRelationships", + "supportForOperators", + "supportForSpatials", + "supportForSpatialIndexNull", + "supportForFulltextWildcard", + "supportForMultipleFulltextIndexes", + "supportForAttributeResizing", + "supportForSchemas", + "maxIndexLength", + "supportForIntegerIds" + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_COMPUTE_BUILD_TIMEOUT": 900, + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", + "_APP_DB_ADAPTER": "mysql", + "supportForRelationships": true, + "supportForOperators": true, + "supportForSpatials": true, + "supportForSpatialIndexNull": false, + "supportForFulltextWildcard": true, + "supportForMultipleFulltextIndexes": true, + "supportForAttributeResizing": true, + "supportForSchemas": true, + "maxIndexLength": 768, + "supportForIntegerIds": true + } + }, + "consoleOAuth2ProviderParameter": { + "description": "Console OAuth2 Provider Parameter", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", + "x-example": "clientId" + }, + "name": { + "type": "string", + "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", + "x-example": "Client ID or App ID" + }, + "example": { + "type": "string", + "description": "Example value for this parameter.", + "x-example": "e4d87900000000540733" + }, + "hint": { + "type": "string", + "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", + "x-example": "Example of wrong value: 370006" + } + }, + "required": [ + "$id", + "name", + "example", + "hint" + ], + "example": { + "$id": "clientId", + "name": "Client ID or App ID", + "example": "e4d87900000000540733", + "hint": "Example of wrong value: 370006" + } + }, + "consoleOAuth2Provider": { + "description": "Console OAuth2 Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "parameters": { + "type": "array", + "description": "List of parameters required to configure this OAuth2 provider.", + "items": { + "$ref": "#\/components\/schemas\/consoleOAuth2ProviderParameter" + }, + "x-example": "" + } + }, + "required": [ + "$id", + "parameters" + ], + "example": { + "$id": "github", + "parameters": "" + } + }, + "consoleOAuth2ProviderList": { + "description": "Console OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers exposed by the server.", + "x-example": 5, + "format": "int32" + }, + "oAuth2Providers": { + "type": "array", + "description": "List of OAuth2 providers, each with the parameters required to configure it.", + "items": { + "$ref": "#\/components\/schemas\/consoleOAuth2Provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "oAuth2Providers" + ], + "example": { + "total": 5, + "oAuth2Providers": "" + } + }, + "consoleKeyScope": { + "description": "Console Key Scope", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Scope ID.", + "x-example": "users.read" + }, + "description": { + "type": "string", + "description": "Scope description.", + "x-example": "Access to read your project's users" + }, + "category": { + "type": "string", + "description": "Scope category.", + "x-example": "Auth" + }, + "deprecated": { + "type": "boolean", + "description": "Scope is deprecated.", + "x-example": true + } + }, + "required": [ + "$id", + "description", + "category", + "deprecated" + ], + "example": { + "$id": "users.read", + "description": "Access to read your project's users", + "category": "Auth", + "deprecated": true + } + }, + "consoleKeyScopeList": { + "description": "Console Key Scopes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of key scopes exposed by the server.", + "x-example": 5, + "format": "int32" + }, + "scopes": { + "type": "array", + "description": "List of key scopes, each with its ID and description.", + "items": { + "$ref": "#\/components\/schemas\/consoleKeyScope" + }, + "x-example": "" + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + }, + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "processing", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "processing" + } + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "$ref": "#\/components\/schemas\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + }, + "migration": { + "description": "Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Migration ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Migration creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Migration status ( pending, processing, failed, completed ) ", + "x-example": "pending" + }, + "stage": { + "type": "string", + "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", + "x-example": "init" + }, + "source": { + "type": "string", + "description": "A string containing the type of source of the migration.", + "x-example": "Appwrite" + }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, + "resources": { + "type": "array", + "description": "Resources to migrate.", + "items": { + "type": "string" + }, + "x-example": [ + "user" + ] + }, + "resourceId": { + "type": "string", + "description": "Id of the resource to migrate.", + "x-example": "databaseId:collectionId" + }, + "statusCounters": { + "type": "object", + "description": "A group of counters that represent the total progress of the migration.", + "x-example": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}" + }, + "resourceData": { + "type": "object", + "description": "An array of objects containing the report data of the resources that were migrated.", + "x-example": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]" + }, + "errors": { + "type": "array", + "description": "All errors that occurred during the migration process.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "options": { + "type": "object", + "description": "Migration options used during the migration process.", + "x-example": "{\"bucketId\": \"exports\", \"notify\": false}" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "stage", + "source", + "destination", + "resources", + "resourceId", + "statusCounters", + "resourceData", + "errors", + "options" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [], + "options": "{\"bucketId\": \"exports\", \"notify\": false}" + } + }, + "migrationReport": { + "description": "Migration Report", + "type": "object", + "properties": { + "user": { + "type": "integer", + "description": "Number of users to be migrated.", + "x-example": 20, + "format": "int32" + }, + "team": { + "type": "integer", + "description": "Number of teams to be migrated.", + "x-example": 20, + "format": "int32" + }, + "database": { + "type": "integer", + "description": "Number of databases to be migrated.", + "x-example": 20, + "format": "int32" + }, + "row": { + "type": "integer", + "description": "Number of rows to be migrated.", + "x-example": 20, + "format": "int32" + }, + "file": { + "type": "integer", + "description": "Number of files to be migrated.", + "x-example": 20, + "format": "int32" + }, + "bucket": { + "type": "integer", + "description": "Number of buckets to be migrated.", + "x-example": 20, + "format": "int32" + }, + "function": { + "type": "integer", + "description": "Number of functions to be migrated.", + "x-example": 20, + "format": "int32" + }, + "site": { + "type": "integer", + "description": "Number of sites to be migrated.", + "x-example": 5, + "format": "int32" + }, + "provider": { + "type": "integer", + "description": "Number of providers to be migrated.", + "x-example": 5, + "format": "int32" + }, + "topic": { + "type": "integer", + "description": "Number of topics to be migrated.", + "x-example": 10, + "format": "int32" + }, + "subscriber": { + "type": "integer", + "description": "Number of subscribers to be migrated.", + "x-example": 100, + "format": "int32" + }, + "message": { + "type": "integer", + "description": "Number of messages to be migrated.", + "x-example": 50, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of files to be migrated in mb.", + "x-example": 30000, + "format": "int32" + }, + "version": { + "type": "string", + "description": "Version of the Appwrite instance to be migrated.", + "x-example": "1.4.0" + } + }, + "required": [ + "user", + "team", + "database", + "row", + "file", + "bucket", + "function", + "site", + "provider", + "topic", + "subscriber", + "message", + "size", + "version" + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "site": 5, + "provider": 5, + "topic": 10, + "subscriber": 100, + "message": 50, + "size": 30000, + "version": "1.4.0" + } + } + }, + "securitySchemes": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_PROJECT_ID>" + } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Mode": { + "type": "apiKey", + "name": "X-Appwrite-Mode", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "" + } + }, + "Cookie": { + "type": "apiKey", + "name": "Cookie", + "description": "The user cookie to authenticate with", + "in": "header" + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json new file mode 100644 index 0000000000..24e8d94371 --- /dev/null +++ b/app/config/specs/open-api3-latest-server.json @@ -0,0 +1,68884 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.9.3", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, + { + "url": "https:\/\/<REGION>.cloud.appwrite.io\/v1" + } + ], + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "account", + "weight": 9, + "cookies": false, + "type": "", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "account", + "weight": 8, + "cookies": false, + "type": "", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "account", + "weight": 34, + "cookies": false, + "type": "", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<IDENTITY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "tokens", + "weight": 29, + "cookies": false, + "type": "", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 31, + "cookies": false, + "type": "", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "weight": 166, + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaType" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaAuthenticator", + "group": "mfa", + "weight": 168, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaAuthenticator", + "group": "mfa", + "weight": 169, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 170, + "cookies": false, + "type": "", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaChallenge" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaChallenge", + "group": "mfa", + "weight": 174, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + } + } + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaChallenge", + "group": "mfa", + "weight": 175, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + } + } + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 167, + "cookies": false, + "type": "", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 173, + "cookies": false, + "type": "", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 171, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 172, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "account", + "weight": 32, + "cookies": false, + "type": "", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "account", + "weight": 33, + "cookies": false, + "type": "", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "account", + "weight": 35, + "cookies": false, + "type": "", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + } + } + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "account", + "weight": 30, + "cookies": false, + "type": "", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "account", + "weight": 36, + "cookies": false, + "type": "", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecovery", + "group": "recovery", + "weight": 39, + "cookies": false, + "type": "", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "x-example": "<SECRET>" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 11, + "cookies": false, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 12, + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "weight": 17, + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "tags": [ + "account" + ], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailPasswordSession", + "group": "sessions", + "weight": 16, + "cookies": false, + "type": "", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMagicURLSession", + "group": "sessions", + "weight": 26, + "cookies": false, + "type": "", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "weight": 27, + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 18, + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "weight": 13, + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SESSION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "weight": 15, + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SESSION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 14, + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SESSION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "account", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailToken", + "group": "tokens", + "weight": 25, + "cookies": false, + "type": "", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMagicURLToken", + "group": "tokens", + "weight": 24, + "cookies": false, + "type": "", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Token", + "group": "tokens", + "weight": 23, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneToken", + "group": "tokens", + "weight": 28, + "cookies": false, + "type": "", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + } + } + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailVerification", + "group": "verification", + "weight": 40, + "cookies": false, + "type": "", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "verification", + "weight": 41, + "cookies": false, + "type": "", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneVerification", + "group": "verification", + "weight": 42, + "cookies": false, + "type": "", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "verification", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "weight": 177, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "schema": { + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "weight": 176, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "schema": { + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "weight": 180, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "weight": 178, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "weight": 179, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "weight": 182, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<NAME>", + "default": "" + }, + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "weight": 181, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEXT>" + }, + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400 + }, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "weight": 183, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "schema": { + "type": "object", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + "default": {} + }, + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280 + }, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720 + }, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "2", + "default": 1 + }, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "schema": { + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "light" + }, + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "" + }, + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "en-US", + "default": "" + }, + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "america\/new_york", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "" + }, + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0 + }, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0 + }, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "100", + "default": 0 + }, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [] + }, + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0 + }, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "list", + "group": "databases", + "weight": 191, + "cookies": false, + "type": "", + "demo": "databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "queries", + "search", + "total" + ], + "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.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "create", + "group": "databases", + "weight": 187, + "cookies": false, + "type": "", + "demo": "databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 259, + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 255, + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 256, + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 257, + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 258, + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 260, + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "get", + "group": "databases", + "weight": 188, + "cookies": false, + "type": "", + "demo": "databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "update", + "group": "databases", + "weight": 189, + "cookies": false, + "type": "", + "demo": "databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "delete", + "group": "databases", + "weight": 190, + "cookies": false, + "type": "", + "demo": "databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 199, + "cookies": false, + "type": "", + "demo": "databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collections", + "operationId": "databasesCreateCollection", + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 195, + "cookies": false, + "type": "", + "demo": "databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "tags": [ + "databases" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 196, + "cookies": false, + "type": "", + "demo": "databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 197, + "cookies": false, + "type": "", + "demo": "databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "tags": [ + "databases" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 198, + "cookies": false, + "type": "", + "demo": "databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listAttributes", + "group": "attributes", + "weight": 216, + "cookies": false, + "type": "", + "demo": "databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createBooleanAttribute", + "group": "attributes", + "weight": 217, + "cookies": false, + "type": "", + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateBooleanAttribute", + "group": "attributes", + "weight": 218, + "cookies": false, + "type": "", + "demo": "databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDatetimeAttribute", + "group": "attributes", + "weight": 219, + "cookies": false, + "type": "", + "demo": "databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update datetime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "group": "attributes", + "weight": 220, + "cookies": false, + "type": "", + "demo": "databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEmailAttribute", + "group": "attributes", + "weight": 221, + "cookies": false, + "type": "", + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEmailAttribute", + "group": "attributes", + "weight": 222, + "cookies": false, + "type": "", + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEnumAttribute", + "group": "attributes", + "weight": 223, + "cookies": false, + "type": "", + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEnumAttribute", + "group": "attributes", + "weight": 224, + "cookies": false, + "type": "", + "demo": "databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFloatAttribute", + "group": "attributes", + "weight": 225, + "cookies": false, + "type": "", + "demo": "databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFloatAttribute", + "group": "attributes", + "weight": 226, + "cookies": false, + "type": "", + "demo": "databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateFloatColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIntegerAttribute", + "group": "attributes", + "weight": 227, + "cookies": false, + "type": "", + "demo": "databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIntegerColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIntegerAttribute", + "group": "attributes", + "weight": 228, + "cookies": false, + "type": "", + "demo": "databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIntegerColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIpAttribute", + "group": "attributes", + "weight": 229, + "cookies": false, + "type": "", + "demo": "databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIpColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIpAttribute", + "group": "attributes", + "weight": 230, + "cookies": false, + "type": "", + "demo": "databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIpColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric line attribute.", + "responses": { + "202": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createLineAttribute", + "group": "attributes", + "weight": 231, + "cookies": false, + "type": "", + "demo": "databases\/create-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLineColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", + "tags": [ + "databases" + ], + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateLineAttribute", + "group": "attributes", + "weight": 232, + "cookies": false, + "type": "", + "demo": "databases\/update-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLineColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a longtext attribute.\n", + "responses": { + "202": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextAttribute", + "group": "attributes", + "weight": 249, + "cookies": false, + "type": "", + "demo": "databases\/create-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextAttribute", + "group": "attributes", + "weight": 250, + "cookies": false, + "type": "", + "demo": "databases\/update-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a mediumtext attribute.\n", + "responses": { + "202": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextAttribute", + "group": "attributes", + "weight": 247, + "cookies": false, + "type": "", + "demo": "databases\/create-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextAttribute", + "group": "attributes", + "weight": 248, + "cookies": false, + "type": "", + "demo": "databases\/update-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric point attribute.", + "responses": { + "202": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPointAttribute", + "group": "attributes", + "weight": 233, + "cookies": false, + "type": "", + "demo": "databases\/create-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPointColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", + "tags": [ + "databases" + ], + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePointAttribute", + "group": "attributes", + "weight": 234, + "cookies": false, + "type": "", + "demo": "databases\/update-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePointColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric polygon attribute.", + "responses": { + "202": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPolygonAttribute", + "group": "attributes", + "weight": 235, + "cookies": false, + "type": "", + "demo": "databases\/create-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPolygonColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePolygonAttribute", + "group": "attributes", + "weight": 236, + "cookies": false, + "type": "", + "demo": "databases\/update-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePolygonColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createRelationshipAttribute", + "group": "attributes", + "weight": 237, + "cookies": false, + "type": "", + "demo": "databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRelationshipColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID.", + "x-example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "group": "attributes", + "weight": 238, + "cookies": false, + "type": "", + "demo": "databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRelationshipColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringAttribute", + "group": "attributes", + "weight": 239, + "cookies": false, + "type": "", + "demo": "databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createStringColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringAttribute", + "group": "attributes", + "weight": 240, + "cookies": false, + "type": "", + "demo": "databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateStringColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { + "post": { + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", + "tags": [ + "databases" + ], + "description": "Create a text attribute.\n", + "responses": { + "202": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextAttribute", + "group": "attributes", + "weight": 245, + "cookies": false, + "type": "", + "demo": "databases\/create-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { + "patch": { + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", + "tags": [ + "databases" + ], + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextAttribute", + "group": "attributes", + "weight": 246, + "cookies": false, + "type": "", + "demo": "databases\/update-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createUrlAttribute", + "group": "attributes", + "weight": 241, + "cookies": false, + "type": "", + "demo": "databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createUrlColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateUrlAttribute", + "group": "attributes", + "weight": 242, + "cookies": false, + "type": "", + "demo": "databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateUrlColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "post": { + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Create a varchar attribute.\n", + "responses": { + "202": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharAttribute", + "group": "attributes", + "weight": 243, + "cookies": false, + "type": "", + "demo": "databases\/create-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { + "patch": { + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharAttribute", + "group": "attributes", + "weight": 244, + "cookies": false, + "type": "", + "demo": "databases\/update-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar attribute.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getAttribute", + "group": "attributes", + "weight": 214, + "cookies": false, + "type": "", + "demo": "databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteAttribute", + "group": "attributes", + "weight": 215, + "cookies": false, + "type": "", + "demo": "databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 210, + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 202, + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "desc": "Create documents", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", + "tags": [ + "databases" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 207, + "cookies": false, + "type": "", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 205, + "cookies": false, + "type": "", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRows" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 209, + "cookies": false, + "type": "", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRows" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 203, + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 206, + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 204, + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 208, + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 213, + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 212, + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 254, + "cookies": false, + "type": "", + "demo": "databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listIndexes" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 251, + "cookies": false, + "type": "", + "demo": "databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "DatabasesIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "tags": [ + "databases" + ], + "description": "Get an index by its unique ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 252, + "cookies": false, + "type": "", + "demo": "databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 253, + "cookies": false, + "type": "", + "demo": "databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "documentsdb", + "weight": 338, + "cookies": false, + "type": "", + "demo": "documentsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "documentsDBCreate", + "tags": [ + "documentsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "documentsdb", + "weight": 334, + "cookies": false, + "type": "", + "demo": "documentsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 366, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 362, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 363, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 364, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 365, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "tags": [ + "documentsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 367, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", + "tags": [ + "documentsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "documentsdb", + "weight": 335, + "cookies": false, + "type": "", + "demo": "documentsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", + "tags": [ + "documentsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "documentsdb", + "weight": 336, + "cookies": false, + "type": "", + "demo": "documentsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", + "tags": [ + "documentsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "documentsdb", + "weight": 337, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 345, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "documentsDBCreateCollection", + "tags": [ + "documentsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 341, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "documentsDBGetCollection", + "tags": [ + "documentsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 342, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", + "tags": [ + "documentsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 343, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", + "tags": [ + "documentsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 344, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 359, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 351, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "documentsDBUpsertDocuments", + "tags": [ + "documentsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 356, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "documentsDBUpdateDocuments", + "tags": [ + "documentsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 354, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "documentsDBDeleteDocuments", + "tags": [ + "documentsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 358, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 352, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 355, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 353, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 357, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 361, + "cookies": false, + "type": "", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 360, + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "documentsDBListIndexes", + "tags": [ + "documentsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 350, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "documentsDBCreateIndex", + "tags": [ + "documentsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 347, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "DocumentsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "documentsDBGetIndex", + "tags": [ + "documentsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 348, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "documentsDBDeleteIndex", + "tags": [ + "documentsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 349, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/functions": { + "get": { + "summary": "List functions", + "operationId": "functionsList", + "tags": [ + "functions" + ], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/functionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "functions", + "weight": 422, + "cookies": false, + "type": "", + "demo": "functions\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create function", + "operationId": "functionsCreate", + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "functions", + "weight": 419, + "cookies": false, + "type": "", + "demo": "functions\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<FUNCTION_ID>" + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Function maximum execution time in seconds.", + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "functionId", + "name", + "runtime" + ] + } + } + } + } + } + }, + "\/functions\/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "tags": [ + "functions" + ], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/runtimeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRuntimes", + "group": "runtimes", + "weight": 424, + "cookies": false, + "type": "", + "demo": "functions\/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "runtimes", + "weight": 425, + "cookies": false, + "type": "", + "demo": "functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/{functionId}": { + "get": { + "summary": "Get function", + "operationId": "functionsGet", + "tags": [ + "functions" + ], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "functions", + "weight": 420, + "cookies": false, + "type": "", + "demo": "functions\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", + "tags": [ + "functions" + ], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "functions", + "weight": 421, + "cookies": false, + "type": "", + "demo": "functions\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Maximum execution time in seconds.", + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", + "tags": [ + "functions" + ], + "description": "Delete a function by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "functions", + "weight": 423, + "cookies": false, + "type": "", + "demo": "functions\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", + "tags": [ + "functions" + ], + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFunctionDeployment", + "group": "functions", + "weight": 428, + "cookies": false, + "type": "", + "demo": "functions\/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "functionsListDeployments", + "tags": [ + "functions" + ], + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deploymentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 429, + "cookies": false, + "type": "", + "demo": "functions\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "functionsCreateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 426, + "cookies": false, + "type": "upload", + "demo": "functions\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "entrypoint": { + "type": "string", + "description": "Entrypoint File.", + "x-example": "<ENTRYPOINT>", + "x-nullable": true + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "x-example": "<COMMANDS>", + "x-nullable": true + }, + "code": { + "type": "string", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "x-example": null, + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "code", + "activate" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 434, + "cookies": false, + "type": "", + "demo": "functions\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + }, + "buildId": { + "type": "string", + "description": "Build unique ID.", + "x-example": "<BUILD_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", + "tags": [ + "functions" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 431, + "cookies": false, + "type": "", + "demo": "functions\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "commit", + "enum": [ + "commit", + "branch", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", + "tags": [ + "functions" + ], + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 432, + "cookies": false, + "type": "", + "demo": "functions\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "functionsGetDeployment", + "tags": [ + "functions" + ], + "description": "Get a function deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 427, + "cookies": false, + "type": "", + "demo": "functions\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", + "tags": [ + "functions" + ], + "description": "Delete a code deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 430, + "cookies": false, + "type": "", + "demo": "functions\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", + "tags": [ + "functions" + ], + "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 433, + "cookies": false, + "type": "location", + "demo": "functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source" + }, + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 435, + "cookies": false, + "type": "", + "demo": "functions\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "weight": 438, + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "content": { + "multipart\/form-data": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "weight": 436, + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": "<SCHEDULED_AT>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getExecution", + "group": "executions", + "weight": 437, + "cookies": false, + "type": "", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<EXECUTION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteExecution", + "group": "executions", + "weight": 439, + "cookies": false, + "type": "", + "demo": "functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<EXECUTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 444, + "cookies": false, + "type": "", + "demo": "functions\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 442, + "cookies": false, + "type": "", + "demo": "functions\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 443, + "cookies": false, + "type": "", + "demo": "functions\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 445, + "cookies": false, + "type": "", + "demo": "functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 446, + "cookies": false, + "type": "", + "demo": "functions\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "weight": 117, + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "mutation", + "group": "graphql", + "weight": 116, + "cookies": false, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/health": { + "get": { + "summary": "Get HTTP", + "operationId": "healthGet", + "tags": [ + "health" + ], + "description": "Check the Appwrite HTTP server is up and responsive.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "health", + "weight": 449, + "cookies": false, + "type": "", + "demo": "health\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/anti-virus": { + "get": { + "summary": "Get antivirus", + "operationId": "healthGetAntivirus", + "tags": [ + "health" + ], + "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Antivirus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthAntivirus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAntivirus", + "group": "health", + "weight": 458, + "cookies": false, + "type": "", + "demo": "health\/get-antivirus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/cache": { + "get": { + "summary": "Get cache", + "operationId": "healthGetCache", + "tags": [ + "health" + ], + "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCache", + "group": "health", + "weight": 452, + "cookies": false, + "type": "", + "demo": "health\/get-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthCertificate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCertificate", + "group": "health", + "weight": 455, + "cookies": false, + "type": "", + "demo": "health\/get-certificate.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "schema": { + "type": "string" + }, + "in": "query" + } + ] + } + }, + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDB", + "group": "health", + "weight": 451, + "cookies": false, + "type": "", + "demo": "health\/get-db.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPubSub", + "group": "health", + "weight": 453, + "cookies": false, + "type": "", + "demo": "health\/get-pub-sub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/queue\/audits": { + "get": { + "summary": "Get audits queue", + "operationId": "healthGetQueueAudits", + "tags": [ + "health" + ], + "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueAudits", + "group": "queue", + "weight": 459, + "cookies": false, + "type": "", + "demo": "health\/get-queue-audits.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "tags": [ + "health" + ], + "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueBuilds", + "group": "queue", + "weight": 463, + "cookies": false, + "type": "", + "demo": "health\/get-queue-builds.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/certificates": { + "get": { + "summary": "Get certificates queue", + "operationId": "healthGetQueueCertificates", + "tags": [ + "health" + ], + "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueCertificates", + "group": "queue", + "weight": 462, + "cookies": false, + "type": "", + "demo": "health\/get-queue-certificates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "tags": [ + "health" + ], + "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDatabases", + "group": "queue", + "weight": 464, + "cookies": false, + "type": "", + "demo": "health\/get-queue-databases.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "schema": { + "type": "string", + "x-example": "<NAME>", + "default": "database_db_main" + }, + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDeletes", + "group": "queue", + "weight": 465, + "cookies": false, + "type": "", + "demo": "health\/get-queue-deletes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFailedJobs", + "group": "queue", + "weight": 472, + "cookies": false, + "type": "", + "demo": "health\/get-failed-jobs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "schema": { + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-stats-resources", + "v1-stats-usage", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-screenshots", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "tags": [ + "health" + ], + "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueFunctions", + "group": "queue", + "weight": 469, + "cookies": false, + "type": "", + "demo": "health\/get-queue-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/logs": { + "get": { + "summary": "Get logs queue", + "operationId": "healthGetQueueLogs", + "tags": [ + "health" + ], + "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueLogs", + "group": "queue", + "weight": 461, + "cookies": false, + "type": "", + "demo": "health\/get-queue-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "tags": [ + "health" + ], + "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMails", + "group": "queue", + "weight": 466, + "cookies": false, + "type": "", + "demo": "health\/get-queue-mails.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "tags": [ + "health" + ], + "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMessaging", + "group": "queue", + "weight": 467, + "cookies": false, + "type": "", + "demo": "health\/get-queue-messaging.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "tags": [ + "health" + ], + "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMigrations", + "group": "queue", + "weight": 468, + "cookies": false, + "type": "", + "demo": "health\/get-queue-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-resources": { + "get": { + "summary": "Get stats resources queue", + "operationId": "healthGetQueueStatsResources", + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueStatsResources", + "group": "queue", + "weight": 470, + "cookies": false, + "type": "", + "demo": "health\/get-queue-stats-resources.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-usage": { + "get": { + "summary": "Get stats usage queue", + "operationId": "healthGetQueueUsage", + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueUsage", + "group": "queue", + "weight": 471, + "cookies": false, + "type": "", + "demo": "health\/get-queue-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/queue\/webhooks": { + "get": { + "summary": "Get webhooks queue", + "operationId": "healthGetQueueWebhooks", + "tags": [ + "health" + ], + "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthQueue" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueWebhooks", + "group": "queue", + "weight": 460, + "cookies": false, + "type": "", + "demo": "health\/get-queue-webhooks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5000 + }, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorage", + "group": "storage", + "weight": 457, + "cookies": false, + "type": "", + "demo": "health\/get-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/storage\/local": { + "get": { + "summary": "Get local storage", + "operationId": "healthGetStorageLocal", + "tags": [ + "health" + ], + "description": "Check the Appwrite local storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorageLocal", + "group": "storage", + "weight": 456, + "cookies": false, + "type": "", + "demo": "health\/get-storage-local.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/time": { + "get": { + "summary": "Get time", + "operationId": "healthGetTime", + "tags": [ + "health" + ], + "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "responses": { + "200": { + "description": "Health Time", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthTime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTime", + "group": "health", + "weight": 454, + "cookies": false, + "type": "", + "demo": "health\/get-time.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/locale" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 49, + "cookies": false, + "type": "", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/localeCodeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "weight": 50, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/continentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listContinents", + "group": null, + "weight": 54, + "cookies": false, + "type": "", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "weight": 51, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesEU", + "group": null, + "weight": 52, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/phoneList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "weight": 53, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/currencyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCurrencies", + "group": null, + "weight": 55, + "cookies": false, + "type": "", + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/languageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLanguages", + "group": null, + "weight": 56, + "cookies": false, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/messageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessages", + "group": "messages", + "weight": 158, + "cookies": false, + "type": "", + "demo": "messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmail", + "group": "messages", + "weight": 155, + "cookies": false, + "type": "", + "demo": "messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "messages", + "weight": 162, + "cookies": false, + "type": "", + "demo": "messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false, + "x-nullable": true + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPush", + "group": "messages", + "weight": 157, + "cookies": false, + "type": "", + "demo": "messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "<ID1:ID2>" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null, + "format": "int32" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePush", + "group": "messages", + "weight": 164, + "cookies": false, + "type": "", + "demo": "messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "<TITLE>", + "x-nullable": true + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>", + "x-nullable": true + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>", + "x-nullable": true + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "<ID1:ID2>", + "x-nullable": true + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "x-example": "<ICON>", + "x-nullable": true + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "x-example": "<SOUND>", + "x-nullable": true + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "x-example": "<COLOR>", + "x-nullable": true + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "x-example": "<TAG>", + "x-nullable": true + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [], + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSms", + "group": "messages", + "weight": 156, + "cookies": false, + "type": "", + "demo": "messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSms", + "group": "messages", + "weight": 163, + "cookies": false, + "type": "", + "demo": "messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMessage", + "group": "messages", + "weight": 161, + "cookies": false, + "type": "", + "demo": "messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "messages", + "weight": 165, + "cookies": false, + "type": "", + "demo": "messaging\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessageLogs", + "group": "logs", + "weight": 159, + "cookies": false, + "type": "", + "demo": "messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "messages", + "weight": 160, + "cookies": false, + "type": "", + "demo": "messaging\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MESSAGE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviders", + "group": "providers", + "weight": 129, + "cookies": false, + "type": "", + "demo": "messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createApnsProvider", + "group": "providers", + "weight": 128, + "cookies": false, + "type": "", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateApnsProvider", + "group": "providers", + "weight": 142, + "cookies": false, + "type": "", + "demo": "messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFcmProvider", + "group": "providers", + "weight": 127, + "cookies": false, + "type": "", + "demo": "messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "x-example": "{}", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFcmProvider", + "group": "providers", + "weight": 141, + "cookies": false, + "type": "", + "demo": "messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "x-example": "{}", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMailgunProvider", + "group": "providers", + "weight": 118, + "cookies": false, + "type": "", + "demo": "messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMailgunProvider", + "group": "providers", + "weight": 132, + "cookies": false, + "type": "", + "demo": "messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMsg91Provider", + "group": "providers", + "weight": 122, + "cookies": false, + "type": "", + "demo": "messaging\/create-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMsg91Provider", + "group": "providers", + "weight": 136, + "cookies": false, + "type": "", + "demo": "messaging\/update-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "x-example": "<AUTH_KEY>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Resend provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createResendProvider", + "group": "providers", + "weight": 120, + "cookies": false, + "type": "", + "demo": "messaging\/create-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", + "tags": [ + "messaging" + ], + "description": "Update a Resend provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateResendProvider", + "group": "providers", + "weight": 134, + "cookies": false, + "type": "", + "demo": "messaging\/update-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSendgridProvider", + "group": "providers", + "weight": 119, + "cookies": false, + "type": "", + "demo": "messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSendgridProvider", + "group": "providers", + "weight": 133, + "cookies": false, + "type": "", + "demo": "messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSmtpProvider", + "group": "providers", + "weight": 121, + "cookies": false, + "type": "", + "demo": "messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "x-example": 1, + "format": "int32" + }, + "username": { + "type": "string", + "description": "Authentication username.", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSmtpProvider", + "group": "providers", + "weight": 135, + "cookies": false, + "type": "", + "demo": "messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Authentication username.", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false, + "x-nullable": true + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTelesignProvider", + "group": "providers", + "weight": 123, + "cookies": false, + "type": "", + "demo": "messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTelesignProvider", + "group": "providers", + "weight": 137, + "cookies": false, + "type": "", + "demo": "messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextmagicProvider", + "group": "providers", + "weight": 124, + "cookies": false, + "type": "", + "demo": "messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextmagicProvider", + "group": "providers", + "weight": 138, + "cookies": false, + "type": "", + "demo": "messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTwilioProvider", + "group": "providers", + "weight": 125, + "cookies": false, + "type": "", + "demo": "messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTwilioProvider", + "group": "providers", + "weight": 139, + "cookies": false, + "type": "", + "demo": "messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVonageProvider", + "group": "providers", + "weight": 126, + "cookies": false, + "type": "", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVonageProvider", + "group": "providers", + "weight": 140, + "cookies": false, + "type": "", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getProvider", + "group": "providers", + "weight": 131, + "cookies": false, + "type": "", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteProvider", + "group": "providers", + "weight": 143, + "cookies": false, + "type": "", + "demo": "messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviderLogs", + "group": "providers", + "weight": 130, + "cookies": false, + "type": "", + "demo": "messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscriberLogs", + "group": "subscribers", + "weight": 152, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topicList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopics", + "group": "topics", + "weight": 145, + "cookies": false, + "type": "", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTopic", + "group": "topics", + "weight": 144, + "cookies": false, + "type": "", + "demo": "messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTopic", + "group": "topics", + "weight": 147, + "cookies": false, + "type": "", + "demo": "messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTopic", + "group": "topics", + "weight": 148, + "cookies": false, + "type": "", + "demo": "messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTopic", + "group": "topics", + "weight": 149, + "cookies": false, + "type": "", + "demo": "messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopicLogs", + "group": "topics", + "weight": 146, + "cookies": false, + "type": "", + "demo": "messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscribers", + "group": "subscribers", + "weight": 151, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "weight": 150, + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriber", + "group": "subscribers", + "weight": 153, + "cookies": false, + "type": "", + "demo": "messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "weight": 154, + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesListPresences", + "tags": [ + "presences" + ], + "description": "List presence logs.", + "responses": { + "200": { + "description": "Presences List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presenceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPresences", + "group": "presences", + "weight": 416, + "cookies": false, + "type": "", + "demo": "presences\/list-presences.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGetPresence", + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPresence", + "group": "presences", + "weight": 415, + "cookies": false, + "type": "", + "demo": "presences\/get-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsertPresence", + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertPresence", + "group": "presences", + "weight": 413, + "cookies": false, + "type": "", + "demo": "presences\/upsert-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertPresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "userId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "", + "demo": "presences\/upsert-presence.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "<STATUS>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdatePresence", + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePresence", + "group": "presences", + "weight": 417, + "cookies": false, + "type": "", + "demo": "presences\/update-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updatePresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "expiresAt", + "metadata", + "permissions" + ], + "required": [ + "presenceId", + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "", + "demo": "presences\/update-presence.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "<STATUS>", + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "x-example": "{}", + "x-nullable": true + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDeletePresence", + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePresence", + "group": "presences", + "weight": 418, + "cookies": false, + "type": "", + "demo": "presences\/delete-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project": { + "delete": { + "summary": "Delete project", + "operationId": "projectDelete", + "tags": [ + "project" + ], + "description": "Delete a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 594, + "cookies": false, + "type": "", + "demo": "project\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/auth-methods\/{methodId}": { + "patch": { + "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", + "operationId": "projectUpdateAuthMethod", + "tags": [ + "project" + ], + "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAuthMethod", + "group": null, + "weight": 643, + "cookies": false, + "type": "", + "demo": "project\/update-auth-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "methodId", + "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", + "required": true, + "schema": { + "type": "string", + "x-example": "email-password", + "enum": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Auth method status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/keys": { + "get": { + "summary": "List project keys", + "operationId": "projectListKeys", + "tags": [ + "project" + ], + "description": "Get a list of all API keys from the current project.", + "responses": { + "200": { + "description": "API Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/keyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listKeys", + "group": "keys", + "weight": 610, + "cookies": false, + "type": "", + "demo": "project\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project key", + "operationId": "projectCreateKey", + "tags": [ + "project" + ], + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "responses": { + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createKey", + "group": "keys", + "weight": 608, + "cookies": false, + "type": "", + "demo": "project\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "type": "string", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<KEY_ID>" + }, + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + } + } + } + }, + "\/project\/keys\/ephemeral": { + "post": { + "summary": "Create ephemeral project key", + "operationId": "projectCreateEphemeralKey", + "tags": [ + "project" + ], + "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "responses": { + "201": { + "description": "Ephemeral Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ephemeralKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEphemeralKey", + "group": "keys", + "weight": 609, + "cookies": false, + "type": "", + "demo": "project\/create-ephemeral-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "duration": { + "type": "integer", + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "x-example": 1, + "format": "int32" + } + }, + "required": [ + "scopes", + "duration" + ] + } + } + } + } + } + }, + "\/project\/keys\/{keyId}": { + "get": { + "summary": "Get project key", + "operationId": "projectGetKey", + "tags": [ + "project" + ], + "description": "Get a key by its unique ID. ", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getKey", + "group": "keys", + "weight": 611, + "cookies": false, + "type": "", + "demo": "project\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project key", + "operationId": "projectUpdateKey", + "tags": [ + "project" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateKey", + "group": "keys", + "weight": 613, + "cookies": false, + "type": "", + "demo": "project\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project key", + "operationId": "projectDeleteKey", + "tags": [ + "project" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "weight": 612, + "cookies": false, + "type": "", + "demo": "project\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project\/labels": { + "put": { + "summary": "Update project labels", + "operationId": "projectUpdateLabels", + "tags": [ + "project" + ], + "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": null, + "weight": 595, + "cookies": false, + "type": "", + "demo": "project\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/project\/mock-phones": { + "get": { + "summary": "List project mock phones", + "operationId": "projectListMockPhones", + "tags": [ + "project" + ], + "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", + "responses": { + "200": { + "description": "Mock Numbers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMockPhones", + "group": "mocks", + "weight": 628, + "cookies": false, + "type": "", + "demo": "project\/list-mock-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project mock phone", + "operationId": "projectCreateMockPhone", + "tags": [ + "project" + ], + "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", + "responses": { + "201": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMockPhone", + "group": "mocks", + "weight": 627, + "cookies": false, + "type": "", + "demo": "project\/create-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", + "x-example": "+12065550100", + "format": "phone" + }, + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "x-example": "<OTP>" + } + }, + "required": [ + "number", + "otp" + ] + } + } + } + } + } + }, + "\/project\/mock-phones\/{number}": { + "get": { + "summary": "Get project mock phone", + "operationId": "projectGetMockPhone", + "tags": [ + "project" + ], + "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMockPhone", + "group": "mocks", + "weight": 629, + "cookies": false, + "type": "", + "demo": "project\/get-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "tags": [ + "project" + ], + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMockPhone", + "group": "mocks", + "weight": 630, + "cookies": false, + "type": "", + "demo": "project\/update-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", + "tags": [ + "project" + ], + "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMockPhone", + "group": "mocks", + "weight": 631, + "cookies": false, + "type": "", + "demo": "project\/delete-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" + } + ] + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "tags": [ + "project" + ], + "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2 Providers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2ProviderList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Providers", + "group": "oauth2", + "weight": 644, + "cookies": false, + "type": "", + "demo": "project\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/oauth2\/amazon": { + "patch": { + "summary": "Update project OAuth2 Amazon", + "operationId": "projectUpdateOAuth2Amazon", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Amazon configuration.", + "responses": { + "200": { + "description": "OAuth2Amazon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Amazon", + "group": "oauth2", + "weight": 671, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-amazon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/apple": { + "patch": { + "summary": "Update project OAuth2 Apple", + "operationId": "projectUpdateOAuth2Apple", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Apple configuration.", + "responses": { + "200": { + "description": "OAuth2Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Apple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Apple", + "group": "oauth2", + "weight": 686, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-apple.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "serviceId": { + "type": "string", + "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", + "x-example": "<SERVICE_ID>", + "x-nullable": true + }, + "keyId": { + "type": "string", + "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", + "x-example": "<KEY_ID>", + "x-nullable": true + }, + "teamId": { + "type": "string", + "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", + "x-example": "<TEAM_ID>", + "x-nullable": true + }, + "p8File": { + "type": "string", + "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "x-example": "<P8_FILE>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/auth0": { + "patch": { + "summary": "Update project OAuth2 Auth0", + "operationId": "projectUpdateOAuth2Auth0", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Auth0 configuration.", + "responses": { + "200": { + "description": "OAuth2Auth0", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Auth0", + "group": "oauth2", + "weight": 680, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-auth-0.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Auth0 instance. For example: example.us.auth0.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/authentik": { + "patch": { + "summary": "Update project OAuth2 Authentik", + "operationId": "projectUpdateOAuth2Authentik", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Authentik configuration.", + "responses": { + "200": { + "description": "OAuth2Authentik", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Authentik", + "group": "oauth2", + "weight": 679, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-authentik.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Authentik instance. For example: example.authentik.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/autodesk": { + "patch": { + "summary": "Update project OAuth2 Autodesk", + "operationId": "projectUpdateOAuth2Autodesk", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Autodesk configuration.", + "responses": { + "200": { + "description": "OAuth2Autodesk", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Autodesk", + "group": "oauth2", + "weight": 654, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-autodesk.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/bitbucket": { + "patch": { + "summary": "Update project OAuth2 Bitbucket", + "operationId": "projectUpdateOAuth2Bitbucket", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitbucket configuration.", + "responses": { + "200": { + "description": "OAuth2Bitbucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitbucket", + "group": "oauth2", + "weight": 651, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitbucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", + "x-example": "<KEY>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", + "x-example": "<SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/bitly": { + "patch": { + "summary": "Update project OAuth2 Bitly", + "operationId": "projectUpdateOAuth2Bitly", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitly configuration.", + "responses": { + "200": { + "description": "OAuth2Bitly", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitly", + "group": "oauth2", + "weight": 652, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitly.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/box": { + "patch": { + "summary": "Update project OAuth2 Box", + "operationId": "projectUpdateOAuth2Box", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Box configuration.", + "responses": { + "200": { + "description": "OAuth2Box", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Box" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Box", + "group": "oauth2", + "weight": 653, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-box.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/dailymotion": { + "patch": { + "summary": "Update project OAuth2 Dailymotion", + "operationId": "projectUpdateOAuth2Dailymotion", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dailymotion configuration.", + "responses": { + "200": { + "description": "OAuth2Dailymotion", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dailymotion", + "group": "oauth2", + "weight": 650, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dailymotion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", + "x-example": "<API_KEY>", + "x-nullable": true + }, + "apiSecret": { + "type": "string", + "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", + "x-example": "<API_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/discord": { + "patch": { + "summary": "Update project OAuth2 Discord", + "operationId": "projectUpdateOAuth2Discord", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Discord configuration.", + "responses": { + "200": { + "description": "OAuth2Discord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Discord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Discord", + "group": "oauth2", + "weight": 647, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-discord.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/disqus": { + "patch": { + "summary": "Update project OAuth2 Disqus", + "operationId": "projectUpdateOAuth2Disqus", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Disqus configuration.", + "responses": { + "200": { + "description": "OAuth2Disqus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Disqus", + "group": "oauth2", + "weight": 670, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-disqus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "x-example": "<PUBLIC_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/dropbox": { + "patch": { + "summary": "Update project OAuth2 Dropbox", + "operationId": "projectUpdateOAuth2Dropbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dropbox configuration.", + "responses": { + "200": { + "description": "OAuth2Dropbox", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dropbox", + "group": "oauth2", + "weight": 649, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dropbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appKey": { + "type": "string", + "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", + "x-example": "<APP_KEY>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/etsy": { + "patch": { + "summary": "Update project OAuth2 Etsy", + "operationId": "projectUpdateOAuth2Etsy", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Etsy configuration.", + "responses": { + "200": { + "description": "OAuth2Etsy", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Etsy", + "group": "oauth2", + "weight": 672, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-etsy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyString": { + "type": "string", + "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", + "x-example": "<KEY_STRING>", + "x-nullable": true + }, + "sharedSecret": { + "type": "string", + "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", + "x-example": "<SHARED_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/facebook": { + "patch": { + "summary": "Update project OAuth2 Facebook", + "operationId": "projectUpdateOAuth2Facebook", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Facebook configuration.", + "responses": { + "200": { + "description": "OAuth2Facebook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Facebook", + "group": "oauth2", + "weight": 673, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-facebook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", + "x-example": "<APP_ID>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/figma": { + "patch": { + "summary": "Update project OAuth2 Figma", + "operationId": "projectUpdateOAuth2Figma", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Figma configuration.", + "responses": { + "200": { + "description": "OAuth2Figma", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Figma" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Figma", + "group": "oauth2", + "weight": 648, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-figma.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/fusionauth": { + "patch": { + "summary": "Update project OAuth2 FusionAuth", + "operationId": "projectUpdateOAuth2FusionAuth", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 FusionAuth configuration.", + "responses": { + "200": { + "description": "OAuth2FusionAuth", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2FusionAuth", + "group": "oauth2", + "weight": 681, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-fusion-auth.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/github": { + "patch": { + "summary": "Update project OAuth2 GitHub", + "operationId": "projectUpdateOAuth2GitHub", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 GitHub configuration.", + "responses": { + "200": { + "description": "OAuth2GitHub", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Github" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2GitHub", + "group": "oauth2", + "weight": 646, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-git-hub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/gitlab": { + "patch": { + "summary": "Update project OAuth2 Gitlab", + "operationId": "projectUpdateOAuth2Gitlab", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Gitlab configuration.", + "responses": { + "200": { + "description": "OAuth2Gitlab", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Gitlab", + "group": "oauth2", + "weight": 678, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-gitlab.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "x-example": "<SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/google": { + "patch": { + "summary": "Update project OAuth2 Google", + "operationId": "projectUpdateOAuth2Google", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Google configuration.", + "responses": { + "200": { + "description": "OAuth2Google", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Google" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Google", + "group": "oauth2", + "weight": 655, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-google.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/keycloak": { + "patch": { + "summary": "Update project OAuth2 Keycloak", + "operationId": "projectUpdateOAuth2Keycloak", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Keycloak configuration.", + "responses": { + "200": { + "description": "OAuth2Keycloak", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Keycloak", + "group": "oauth2", + "weight": 682, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-keycloak.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Keycloak instance. For example: keycloak.example.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "realmName": { + "type": "string", + "description": "Keycloak realm name. For example: appwrite-realm", + "x-example": "<REALM_NAME>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/kick": { + "patch": { + "summary": "Update project OAuth2 Kick", + "operationId": "projectUpdateOAuth2Kick", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Kick configuration.", + "responses": { + "200": { + "description": "OAuth2Kick", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Kick" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Kick", + "group": "oauth2", + "weight": 685, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-kick.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/linkedin": { + "patch": { + "summary": "Update project OAuth2 Linkedin", + "operationId": "projectUpdateOAuth2Linkedin", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Linkedin configuration.", + "responses": { + "200": { + "description": "OAuth2Linkedin", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Linkedin", + "group": "oauth2", + "weight": 669, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-linkedin.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "primaryClientSecret": { + "type": "string", + "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", + "x-example": "<PRIMARY_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/microsoft": { + "patch": { + "summary": "Update project OAuth2 Microsoft", + "operationId": "projectUpdateOAuth2Microsoft", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Microsoft configuration.", + "responses": { + "200": { + "description": "OAuth2Microsoft", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Microsoft", + "group": "oauth2", + "weight": 687, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-microsoft.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "applicationSecret": { + "type": "string", + "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "x-example": "<APPLICATION_SECRET>", + "x-nullable": true + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", + "x-example": "<TENANT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/notion": { + "patch": { + "summary": "Update project OAuth2 Notion", + "operationId": "projectUpdateOAuth2Notion", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Notion configuration.", + "responses": { + "200": { + "description": "OAuth2Notion", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Notion" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Notion", + "group": "oauth2", + "weight": 666, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-notion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "oauthClientId": { + "type": "string", + "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", + "x-example": "<OAUTH_CLIENT_ID>", + "x-nullable": true + }, + "oauthClientSecret": { + "type": "string", + "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", + "x-example": "<OAUTH_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/oidc": { + "patch": { + "summary": "Update project OAuth2 Oidc", + "operationId": "projectUpdateOAuth2Oidc", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Oidc configuration.", + "responses": { + "200": { + "description": "OAuth2Oidc", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Oidc", + "group": "oauth2", + "weight": 683, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-oidc.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/okta": { + "patch": { + "summary": "Update project OAuth2 Okta", + "operationId": "projectUpdateOAuth2Okta", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Okta configuration.", + "responses": { + "200": { + "description": "OAuth2Okta", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Okta" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Okta", + "group": "oauth2", + "weight": 684, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-okta.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "domain": { + "type": "string", + "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", + "x-example": null, + "x-nullable": true + }, + "authorizationServerId": { + "type": "string", + "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", + "x-example": "<AUTHORIZATION_SERVER_ID>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/paypal": { + "patch": { + "summary": "Update project OAuth2 Paypal", + "operationId": "projectUpdateOAuth2Paypal", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Paypal configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Paypal", + "group": "oauth2", + "weight": 676, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/paypalSandbox": { + "patch": { + "summary": "Update project OAuth2 PaypalSandbox", + "operationId": "projectUpdateOAuth2PaypalSandbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 PaypalSandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2PaypalSandbox", + "group": "oauth2", + "weight": 677, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/podio": { + "patch": { + "summary": "Update project OAuth2 Podio", + "operationId": "projectUpdateOAuth2Podio", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Podio configuration.", + "responses": { + "200": { + "description": "OAuth2Podio", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Podio" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Podio", + "group": "oauth2", + "weight": 665, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-podio.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/salesforce": { + "patch": { + "summary": "Update project OAuth2 Salesforce", + "operationId": "projectUpdateOAuth2Salesforce", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Salesforce configuration.", + "responses": { + "200": { + "description": "OAuth2Salesforce", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Salesforce", + "group": "oauth2", + "weight": 667, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-salesforce.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "customerSecret": { + "type": "string", + "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", + "x-example": "<CUSTOMER_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/slack": { + "patch": { + "summary": "Update project OAuth2 Slack", + "operationId": "projectUpdateOAuth2Slack", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Slack configuration.", + "responses": { + "200": { + "description": "OAuth2Slack", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Slack" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Slack", + "group": "oauth2", + "weight": 664, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-slack.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/spotify": { + "patch": { + "summary": "Update project OAuth2 Spotify", + "operationId": "projectUpdateOAuth2Spotify", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Spotify configuration.", + "responses": { + "200": { + "description": "OAuth2Spotify", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Spotify", + "group": "oauth2", + "weight": 663, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-spotify.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/stripe": { + "patch": { + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Stripe configuration.", + "responses": { + "200": { + "description": "OAuth2Stripe", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Stripe", + "group": "oauth2", + "weight": 662, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-stripe.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "apiSecretKey": { + "type": "string", + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "x-example": "<API_SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/tradeshift": { + "patch": { + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Tradeshift", + "group": "oauth2", + "weight": 674, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/tradeshiftBox": { + "patch": { + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2TradeshiftSandbox", + "group": "oauth2", + "weight": 675, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/twitch": { + "patch": { + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Twitch configuration.", + "responses": { + "200": { + "description": "OAuth2Twitch", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Twitch", + "group": "oauth2", + "weight": 661, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-twitch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/wordpress": { + "patch": { + "summary": "Update project OAuth2 WordPress", + "operationId": "projectUpdateOAuth2WordPress", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 WordPress configuration.", + "responses": { + "200": { + "description": "OAuth2WordPress", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2WordPress", + "group": "oauth2", + "weight": 660, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-word-press.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/x": { + "patch": { + "summary": "Update project OAuth2 X", + "operationId": "projectUpdateOAuth2X", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 X configuration.", + "responses": { + "200": { + "description": "OAuth2X", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2X" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2X", + "group": "oauth2", + "weight": 659, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2x.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/yahoo": { + "patch": { + "summary": "Update project OAuth2 Yahoo", + "operationId": "projectUpdateOAuth2Yahoo", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yahoo configuration.", + "responses": { + "200": { + "description": "OAuth2Yahoo", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yahoo", + "group": "oauth2", + "weight": 668, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yahoo.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/yandex": { + "patch": { + "summary": "Update project OAuth2 Yandex", + "operationId": "projectUpdateOAuth2Yandex", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yandex configuration.", + "responses": { + "200": { + "description": "OAuth2Yandex", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yandex", + "group": "oauth2", + "weight": 658, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yandex.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/zoho": { + "patch": { + "summary": "Update project OAuth2 Zoho", + "operationId": "projectUpdateOAuth2Zoho", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoho configuration.", + "responses": { + "200": { + "description": "OAuth2Zoho", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoho", + "group": "oauth2", + "weight": 657, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/zoom": { + "patch": { + "summary": "Update project OAuth2 Zoom", + "operationId": "projectUpdateOAuth2Zoom", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoom configuration.", + "responses": { + "200": { + "description": "OAuth2Zoom", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoom", + "group": "oauth2", + "weight": 656, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoom.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/{provider}": { + "get": { + "summary": "Get project OAuth2 provider", + "operationId": "projectGetOAuth2Provider", + "tags": [ + "project" + ], + "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getOAuth2Provider", + "group": "oauth2", + "weight": 645, + "cookies": false, + "type": "", + "demo": "project\/get-o-auth-2-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 provider key. For example: github, google, apple.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER>" + }, + "in": "path" + } + ] + } + }, + "\/project\/platforms": { + "get": { + "summary": "List project platforms", + "operationId": "projectListPlatforms", + "tags": [ + "project" + ], + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", + "responses": { + "200": { + "description": "Platforms List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPlatforms", + "group": "platforms", + "weight": 626, + "cookies": false, + "type": "", + "demo": "project\/list-platforms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/platforms\/android": { + "post": { + "summary": "Create project Android platform", + "operationId": "projectCreateAndroidPlatform", + "tags": [ + "project" + ], + "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Android", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformAndroid" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAndroidPlatform", + "group": "platforms", + "weight": 622, + "cookies": false, + "type": "", + "demo": "project\/create-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "platformId", + "name", + "applicationId" + ] + } + } + } + } + } + }, + "\/project\/platforms\/android\/{platformId}": { + "put": { + "summary": "Update project Android platform", + "operationId": "projectUpdateAndroidPlatform", + "tags": [ + "project" + ], + "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", + "responses": { + "200": { + "description": "Platform Android", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformAndroid" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAndroidPlatform", + "group": "platforms", + "weight": 617, + "cookies": false, + "type": "", + "demo": "project\/update-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "name", + "applicationId" + ] + } + } + } + } + } + }, + "\/project\/platforms\/apple": { + "post": { + "summary": "Create project Apple platform", + "operationId": "projectCreateApplePlatform", + "tags": [ + "project" + ], + "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformApple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createApplePlatform", + "group": "platforms", + "weight": 621, + "cookies": false, + "type": "", + "demo": "project\/create-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "platformId", + "name", + "bundleIdentifier" + ] + } + } + } + } + } + }, + "\/project\/platforms\/apple\/{platformId}": { + "put": { + "summary": "Update project Apple platform", + "operationId": "projectUpdateApplePlatform", + "tags": [ + "project" + ], + "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", + "responses": { + "200": { + "description": "Platform Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformApple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateApplePlatform", + "group": "platforms", + "weight": 616, + "cookies": false, + "type": "", + "demo": "project\/update-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "name", + "bundleIdentifier" + ] + } + } + } + } + } + }, + "\/project\/platforms\/linux": { + "post": { + "summary": "Create project Linux platform", + "operationId": "projectCreateLinuxPlatform", + "tags": [ + "project" + ], + "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Linux", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLinuxPlatform", + "group": "platforms", + "weight": 624, + "cookies": false, + "type": "", + "demo": "project\/create-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/linux\/{platformId}": { + "put": { + "summary": "Update project Linux platform", + "operationId": "projectUpdateLinuxPlatform", + "tags": [ + "project" + ], + "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", + "responses": { + "200": { + "description": "Platform Linux", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLinuxPlatform", + "group": "platforms", + "weight": 619, + "cookies": false, + "type": "", + "demo": "project\/update-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "name", + "packageName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/web": { + "post": { + "summary": "Create project web platform", + "operationId": "projectCreateWebPlatform", + "tags": [ + "project" + ], + "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Web", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWeb" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWebPlatform", + "group": "platforms", + "weight": 620, + "cookies": false, + "type": "", + "demo": "project\/create-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "x-example": "app.example.com" + } + }, + "required": [ + "platformId", + "name", + "hostname" + ] + } + } + } + } + } + }, + "\/project\/platforms\/web\/{platformId}": { + "put": { + "summary": "Update project web platform", + "operationId": "projectUpdateWebPlatform", + "tags": [ + "project" + ], + "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", + "responses": { + "200": { + "description": "Platform Web", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWeb" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWebPlatform", + "group": "platforms", + "weight": 615, + "cookies": false, + "type": "", + "demo": "project\/update-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "x-example": "app.example.com" + } + }, + "required": [ + "name", + "hostname" + ] + } + } + } + } + } + }, + "\/project\/platforms\/windows": { + "post": { + "summary": "Create project Windows platform", + "operationId": "projectCreateWindowsPlatform", + "tags": [ + "project" + ], + "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Windows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWindowsPlatform", + "group": "platforms", + "weight": 623, + "cookies": false, + "type": "", + "demo": "project\/create-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageIdentifierName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/windows\/{platformId}": { + "put": { + "summary": "Update project Windows platform", + "operationId": "projectUpdateWindowsPlatform", + "tags": [ + "project" + ], + "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", + "responses": { + "200": { + "description": "Platform Windows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWindowsPlatform", + "group": "platforms", + "weight": 618, + "cookies": false, + "type": "", + "demo": "project\/update-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "name", + "packageIdentifierName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/{platformId}": { + "get": { + "summary": "Get project platform", + "operationId": "projectGetPlatform", + "tags": [ + "project" + ], + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", + "responses": { + "200": { + "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPlatform", + "group": "platforms", + "weight": 625, + "cookies": false, + "type": "", + "demo": "project\/get-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete project platform", + "operationId": "projectDeletePlatform", + "tags": [ + "project" + ], + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePlatform", + "group": "platforms", + "weight": 614, + "cookies": false, + "type": "", + "demo": "project\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project\/policies": { + "get": { + "summary": "List project policies", + "operationId": "projectListPolicies", + "tags": [ + "project" + ], + "description": "Get a list of all project policies and their current configuration.", + "responses": { + "200": { + "description": "Policies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/policyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPolicies", + "group": "policies", + "weight": 632, + "cookies": false, + "type": "", + "demo": "project\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/policies\/membership-privacy": { + "patch": { + "summary": "Update membership privacy policy", + "operationId": "projectUpdateMembershipPrivacyPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipPrivacyPolicy", + "group": "policies", + "weight": 634, + "cookies": false, + "type": "", + "demo": "project\/update-membership-privacy-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "boolean", + "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true if you want make user email visible to all team members, or false to hide it.", + "x-example": false + }, + "userPhone": { + "type": "boolean", + "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", + "x-example": false + }, + "userName": { + "type": "boolean", + "description": "Set to true if you want make user name visible to all team members, or false to hide it.", + "x-example": false + }, + "userMFA": { + "type": "boolean", + "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/project\/policies\/password-dictionary": { + "patch": { + "summary": "Update password dictionary policy", + "operationId": "projectUpdatePasswordDictionaryPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordDictionaryPolicy", + "group": "policies", + "weight": 635, + "cookies": false, + "type": "", + "demo": "project\/update-password-dictionary-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-history": { + "patch": { + "summary": "Update password history policy", + "operationId": "projectUpdatePasswordHistoryPolicy", + "tags": [ + "project" + ], + "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordHistoryPolicy", + "group": "policies", + "weight": 636, + "cookies": false, + "type": "", + "demo": "project\/update-password-history-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-personal-data": { + "patch": { + "summary": "Update password personal data policy", + "operationId": "projectUpdatePasswordPersonalDataPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordPersonalDataPolicy", + "group": "policies", + "weight": 637, + "cookies": false, + "type": "", + "demo": "project\/update-password-personal-data-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-alert": { + "patch": { + "summary": "Update session alert policy", + "operationId": "projectUpdateSessionAlertPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionAlertPolicy", + "group": "policies", + "weight": 638, + "cookies": false, + "type": "", + "demo": "project\/update-session-alert-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-duration": { + "patch": { + "summary": "Update session duration policy", + "operationId": "projectUpdateSessionDurationPolicy", + "tags": [ + "project" + ], + "description": "Update maximum duration how long sessions created within a project should stay active for.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionDurationPolicy", + "group": "policies", + "weight": 639, + "cookies": false, + "type": "", + "demo": "project\/update-session-duration-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "duration" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-invalidation": { + "patch": { + "summary": "Update session invalidation policy", + "operationId": "projectUpdateSessionInvalidationPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionInvalidationPolicy", + "group": "policies", + "weight": 640, + "cookies": false, + "type": "", + "demo": "project\/update-session-invalidation-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-limit": { + "patch": { + "summary": "Update session limit policy", + "operationId": "projectUpdateSessionLimitPolicy", + "tags": [ + "project" + ], + "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionLimitPolicy", + "group": "policies", + "weight": 641, + "cookies": false, + "type": "", + "demo": "project\/update-session-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/user-limit": { + "patch": { + "summary": "Update user limit policy", + "operationId": "projectUpdateUserLimitPolicy", + "tags": [ + "project" + ], + "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUserLimitPolicy", + "group": "policies", + "weight": 642, + "cookies": false, + "type": "", + "demo": "project\/update-user-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/{policyId}": { + "get": { + "summary": "Get project policy", + "operationId": "projectGetPolicy", + "tags": [ + "project" + ], + "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", + "responses": { + "200": { + "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPolicy", + "group": "policies", + "weight": 633, + "cookies": false, + "type": "", + "demo": "project\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "required": true, + "schema": { + "type": "string", + "x-example": "password-dictionary", + "enum": [ + "password-dictionary", + "password-history", + "password-personal-data", + "session-alert", + "session-duration", + "session-invalidation", + "session-limit", + "user-limit", + "membership-privacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/project\/protocols\/{protocolId}": { + "patch": { + "summary": "Update project protocol", + "operationId": "projectUpdateProtocol", + "tags": [ + "project" + ], + "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateProtocol", + "group": null, + "weight": 596, + "cookies": false, + "type": "", + "demo": "project\/update-protocol.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "protocolId", + "description": "Protocol name. Can be one of: rest, graphql, websocket", + "required": true, + "schema": { + "type": "string", + "x-example": "rest", + "enum": [ + "rest", + "graphql", + "websocket" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Protocol status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/services\/{serviceId}": { + "patch": { + "summary": "Update project service", + "operationId": "projectUpdateService", + "tags": [ + "project" + ], + "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateService", + "group": null, + "weight": 597, + "cookies": false, + "type": "", + "demo": "project\/update-service.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "serviceId", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", + "required": true, + "schema": { + "type": "string", + "x-example": "account", + "enum": [ + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Service status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/smtp": { + "patch": { + "summary": "Update project SMTP configuration", + "operationId": "projectUpdateSMTP", + "tags": [ + "project" + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSMTP", + "group": "smtp", + "weight": 598, + "cookies": false, + "type": "", + "demo": "project\/update-smtp.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "SMTP server hostname (domain)", + "x-example": null, + "x-nullable": true + }, + "port": { + "type": "integer", + "description": "SMTP server port", + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "SMTP server username. Leave empty for no authorization.", + "x-example": "<USERNAME>", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", + "x-example": "<PASSWORD>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email address shown in inbox as the sender of the email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name shown in inbox as the sender of the email.", + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Email used when user replies to the email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Name used when user replies to the email.", + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + }, + "secure": { + "type": "string", + "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": null, + "x-enum-keys": [], + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/smtp\/tests": { + "post": { + "summary": "Create project SMTP test", + "operationId": "projectCreateSMTPTest", + "tags": [ + "project" + ], + "description": "Send a test email to verify SMTP configuration. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSMTPTest", + "group": "smtp", + "weight": 599, + "cookies": false, + "type": "", + "demo": "project\/create-smtp-test.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + } + } + } + } + } + }, + "\/project\/templates\/email": { + "get": { + "summary": "List project email templates", + "operationId": "projectListEmailTemplates", + "tags": [ + "project" + ], + "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", + "responses": { + "200": { + "description": "Email Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplateList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listEmailTemplates", + "group": "templates", + "weight": 600, + "cookies": false, + "type": "", + "demo": "project\/list-email-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "patch": { + "summary": "Update project email template", + "operationId": "projectUpdateEmailTemplate", + "tags": [ + "project" + ], + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailTemplate", + "group": "templates", + "weight": 602, + "cookies": false, + "type": "", + "demo": "project\/update-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [] + }, + "locale": { + "type": "string", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [] + }, + "subject": { + "type": "string", + "description": "Subject of the email template. Can be up to 255 characters.", + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "message": { + "type": "string", + "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", + "x-example": "<MESSAGE>", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name of the email sender.", + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Reply to name.", + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + } + }, + "required": [ + "templateId" + ] + } + } + } + } + } + }, + "\/project\/templates\/email\/{templateId}": { + "get": { + "summary": "Get project email template", + "operationId": "projectGetEmailTemplate", + "tags": [ + "project" + ], + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getEmailTemplate", + "group": "templates", + "weight": 601, + "cookies": false, + "type": "", + "demo": "project\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "required": true, + "schema": { + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [] + }, + "in": "path" + }, + { + "name": "locale", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/project\/variables": { + "get": { + "summary": "List project variables", + "operationId": "projectListVariables", + "tags": [ + "project" + ], + "description": "Get a list of all project environment variables.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 604, + "cookies": false, + "type": "", + "demo": "project\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project variable", + "operationId": "projectCreateVariable", + "tags": [ + "project" + ], + "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 603, + "cookies": false, + "type": "", + "demo": "project\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<VARIABLE_ID>" + }, + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "x-example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + } + } + } + }, + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get project variable", + "operationId": "projectGetVariable", + "tags": [ + "project" + ], + "description": "Get a variable by its unique ID. ", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 605, + "cookies": false, + "type": "", + "demo": "project\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project variable", + "operationId": "projectUpdateVariable", + "tags": [ + "project" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 607, + "cookies": false, + "type": "", + "demo": "project\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete project variable", + "operationId": "projectDeleteVariable", + "tags": [ + "project" + ], + "description": "Delete a variable by its unique ID. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 606, + "cookies": false, + "type": "", + "demo": "project\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites": { + "get": { + "summary": "List sites", + "operationId": "sitesList", + "tags": [ + "sites" + ], + "description": "Get a list of all the project's sites. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Sites List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/siteList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "sites", + "weight": 476, + "cookies": false, + "type": "", + "demo": "sites\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create site", + "operationId": "sitesCreate", + "tags": [ + "sites" + ], + "description": "Create a new site.", + "responses": { + "201": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "sites", + "weight": 474, + "cookies": false, + "type": "", + "demo": "sites\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "siteId": { + "type": "string", + "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<SITE_ID>" + }, + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "x-example": "<FALLBACK_FILE>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "siteId", + "name", + "framework", + "buildRuntime" + ] + } + } + } + } + } + }, + "\/sites\/frameworks": { + "get": { + "summary": "List frameworks", + "operationId": "sitesListFrameworks", + "tags": [ + "sites" + ], + "description": "Get a list of all frameworks that are currently available on the server instance.", + "responses": { + "200": { + "description": "Frameworks List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/frameworkList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFrameworks", + "group": "frameworks", + "weight": 479, + "cookies": false, + "type": "", + "demo": "sites\/list-frameworks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "sitesListSpecifications", + "tags": [ + "sites" + ], + "description": "List allowed site specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "frameworks", + "weight": 502, + "cookies": false, + "type": "", + "demo": "sites\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/{siteId}": { + "get": { + "summary": "Get site", + "operationId": "sitesGet", + "tags": [ + "sites" + ], + "description": "Get a site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "sites", + "weight": 475, + "cookies": false, + "type": "", + "demo": "sites\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update site", + "operationId": "sitesUpdate", + "tags": [ + "sites" + ], + "description": "Update site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "sites", + "weight": 477, + "cookies": false, + "type": "", + "demo": "sites\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "x-example": "<FALLBACK_FILE>" + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name", + "framework" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete site", + "operationId": "sitesDelete", + "tags": [ + "sites" + ], + "description": "Delete a site by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "sites", + "weight": 478, + "cookies": false, + "type": "", + "demo": "sites\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployment": { + "patch": { + "summary": "Update site's deployment", + "operationId": "sitesUpdateSiteDeployment", + "tags": [ + "sites" + ], + "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSiteDeployment", + "group": "sites", + "weight": 485, + "cookies": false, + "type": "", + "demo": "sites\/update-site-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "sitesListDeployments", + "tags": [ + "sites" + ], + "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deploymentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 484, + "cookies": false, + "type": "", + "demo": "sites\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "sitesCreateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 480, + "cookies": false, + "type": "upload", + "demo": "sites\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "installCommand": { + "type": "string", + "description": "Install Commands.", + "x-example": "<INSTALL_COMMAND>", + "x-nullable": true + }, + "buildCommand": { + "type": "string", + "description": "Build Commands.", + "x-example": "<BUILD_COMMAND>", + "x-nullable": true + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory.", + "x-example": "<OUTPUT_DIRECTORY>", + "x-nullable": true + }, + "code": { + "type": "string", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "x-example": null, + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "code" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "sitesCreateDuplicateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 488, + "cookies": false, + "type": "", + "demo": "sites\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "sitesCreateTemplateDeployment", + "tags": [ + "sites" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 481, + "cookies": false, + "type": "", + "demo": "sites\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to site code in the template repo.", + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "sitesCreateVcsDeployment", + "tags": [ + "sites" + ], + "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 482, + "cookies": false, + "type": "", + "demo": "sites\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "sitesGetDeployment", + "tags": [ + "sites" + ], + "description": "Get a site deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 483, + "cookies": false, + "type": "", + "demo": "sites\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "sitesDeleteDeployment", + "tags": [ + "sites" + ], + "description": "Delete a site deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 486, + "cookies": false, + "type": "", + "demo": "sites\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "sitesGetDeploymentDownload", + "tags": [ + "sites" + ], + "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 487, + "cookies": false, + "type": "location", + "demo": "sites\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source" + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "sitesUpdateDeploymentStatus", + "tags": [ + "sites" + ], + "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 489, + "cookies": false, + "type": "", + "demo": "sites\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/logs": { + "get": { + "summary": "List logs", + "operationId": "sitesListLogs", + "tags": [ + "sites" + ], + "description": "Get a list of all site logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 491, + "cookies": false, + "type": "", + "demo": "sites\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/logs\/{logId}": { + "get": { + "summary": "Get log", + "operationId": "sitesGetLog", + "tags": [ + "sites" + ], + "description": "Get a site request log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getLog", + "group": "logs", + "weight": 490, + "cookies": false, + "type": "", + "demo": "sites\/get-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<LOG_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete log", + "operationId": "sitesDeleteLog", + "tags": [ + "sites" + ], + "description": "Delete a site log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteLog", + "group": "logs", + "weight": 492, + "cookies": false, + "type": "", + "demo": "sites\/delete-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<LOG_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "sitesListVariables", + "tags": [ + "sites" + ], + "description": "Get a list of all variables of a specific site.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 495, + "cookies": false, + "type": "", + "demo": "sites\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "sitesCreateVariable", + "tags": [ + "sites" + ], + "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 493, + "cookies": false, + "type": "", + "demo": "sites\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "sitesGetVariable", + "tags": [ + "sites" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 494, + "cookies": false, + "type": "", + "demo": "sites\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "sitesUpdateVariable", + "tags": [ + "sites" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 496, + "cookies": false, + "type": "", + "demo": "sites\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "sitesDeleteVariable", + "tags": [ + "sites" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 497, + "cookies": false, + "type": "", + "demo": "sites\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "tags": [ + "storage" + ], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucketList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBuckets", + "group": "buckets", + "weight": 545, + "cookies": false, + "type": "", + "demo": "storage\/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", + "tags": [ + "storage" + ], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBucket", + "group": "buckets", + "weight": 543, + "cookies": false, + "type": "", + "demo": "storage\/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<BUCKET_ID>" + }, + "name": { + "type": "string", + "description": "Bucket name", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "x-example": false + } + }, + "required": [ + "bucketId", + "name" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}": { + "get": { + "summary": "Get bucket", + "operationId": "storageGetBucket", + "tags": [ + "storage" + ], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBucket", + "group": "buckets", + "weight": 544, + "cookies": false, + "type": "", + "demo": "storage\/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update bucket", + "operationId": "storageUpdateBucket", + "tags": [ + "storage" + ], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBucket", + "group": "buckets", + "weight": 546, + "cookies": false, + "type": "", + "demo": "storage\/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Bucket name", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete bucket", + "operationId": "storageDeleteBucket", + "tags": [ + "storage" + ], + "description": "Delete a storage bucket by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBucket", + "group": "buckets", + "weight": 547, + "cookies": false, + "type": "", + "demo": "storage\/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/fileList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "weight": 550, + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "weight": 548, + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<FILE_ID>", + "x-upload-id": true + }, + "file": { + "type": "string", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "x-example": null, + "format": "binary" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + }, + "required": [ + "fileId", + "file" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFile", + "group": "files", + "weight": 549, + "cookies": false, + "type": "", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFile", + "group": "files", + "weight": 551, + "cookies": false, + "type": "", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "weight": 552, + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileDownload", + "group": "files", + "weight": 554, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFilePreview", + "group": "files", + "weight": 553, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "schema": { + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "default": "center" + }, + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0 + }, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "" + }, + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileView", + "group": "files", + "weight": 555, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 265, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 261, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 332, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 328, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 329, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 330, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 331, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 333, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 262, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 263, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 264, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 272, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 268, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TABLE_ID>" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 269, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 270, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 271, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 277, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 278, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 279, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 280, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 281, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 282, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 283, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 284, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 285, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 286, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 287, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 288, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 289, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 290, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 291, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { + "post": { + "summary": "Create line column", + "operationId": "tablesDBCreateLineColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric line column.", + "responses": { + "202": { + "description": "ColumnLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLine" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLineColumn", + "group": "columns", + "weight": 292, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { + "patch": { + "summary": "Update line column", + "operationId": "tablesDBUpdateLineColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a line column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLine" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLineColumn", + "group": "columns", + "weight": 293, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + "post": { + "summary": "Create longtext column", + "operationId": "tablesDBCreateLongtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a longtext column.\n", + "responses": { + "202": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextColumn", + "group": "columns", + "weight": 310, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { + "patch": { + "summary": "Update longtext column", + "operationId": "tablesDBUpdateLongtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextColumn", + "group": "columns", + "weight": 311, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { + "post": { + "summary": "Create mediumtext column", + "operationId": "tablesDBCreateMediumtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a mediumtext column.\n", + "responses": { + "202": { + "description": "ColumnMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextColumn", + "group": "columns", + "weight": 308, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext column", + "operationId": "tablesDBUpdateMediumtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextColumn", + "group": "columns", + "weight": 309, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { + "post": { + "summary": "Create point column", + "operationId": "tablesDBCreatePointColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric point column.", + "responses": { + "202": { + "description": "ColumnPoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPoint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPointColumn", + "group": "columns", + "weight": 294, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { + "patch": { + "summary": "Update point column", + "operationId": "tablesDBUpdatePointColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a point column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPoint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePointColumn", + "group": "columns", + "weight": 295, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "x-example": "[1, 2]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { + "post": { + "summary": "Create polygon column", + "operationId": "tablesDBCreatePolygonColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric polygon column.", + "responses": { + "202": { + "description": "ColumnPolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPolygon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPolygonColumn", + "group": "columns", + "weight": 296, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { + "patch": { + "summary": "Update polygon column", + "operationId": "tablesDBUpdatePolygonColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPolygon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePolygonColumn", + "group": "columns", + "weight": 297, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "oneOf": [ + { + "type": "array" + } + ] + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 298, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "<RELATED_TABLE_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 300, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "deprecated": { + "since": "1.9.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for text columns, in number of characters.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 301, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { + "post": { + "summary": "Create text column", + "operationId": "tablesDBCreateTextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a text column.\n", + "responses": { + "202": { + "description": "ColumnText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextColumn", + "group": "columns", + "weight": 306, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { + "patch": { + "summary": "Update text column", + "operationId": "tablesDBUpdateTextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextColumn", + "group": "columns", + "weight": 307, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 302, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 303, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { + "post": { + "summary": "Create varchar column", + "operationId": "tablesDBCreateVarcharColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a varchar column.\n", + "responses": { + "202": { + "description": "ColumnVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharColumn", + "group": "columns", + "weight": 304, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { + "patch": { + "summary": "Update varchar column", + "operationId": "tablesDBUpdateVarcharColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharColumn", + "group": "columns", + "weight": 305, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar column.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 275, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 276, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 299, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [], + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 315, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 312, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "TablesDBIndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 313, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 314, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 324, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 316, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<ROW_ID>" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 321, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 319, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 323, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 317, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 320, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 318, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 322, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 327, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 326, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/teamList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "teams", + "weight": 526, + "cookies": false, + "type": "", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "weight": 524, + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TEAM_ID>" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "weight": 525, + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "weight": 528, + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "weight": 527, + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 533, + "cookies": false, + "type": "", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMembership", + "group": "memberships", + "weight": 531, + "cookies": false, + "type": "", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMembership", + "group": "memberships", + "weight": 532, + "cookies": false, + "type": "", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "weight": 534, + "cookies": false, + "type": "", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "weight": 535, + "cookies": false, + "type": "", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipStatus", + "group": "memberships", + "weight": 536, + "cookies": false, + "type": "", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "teams", + "weight": 529, + "cookies": false, + "type": "", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "teams", + "weight": 530, + "cookies": false, + "type": "", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "List tokens", + "operationId": "tokensList", + "tags": [ + "tokens" + ], + "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Resource Tokens List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceTokenList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "files", + "weight": 540, + "cookies": false, + "type": "", + "demo": "tokens\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file token", + "operationId": "tokensCreateFileToken", + "tags": [ + "tokens" + ], + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", + "responses": { + "201": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFileToken", + "group": "files", + "weight": 538, + "cookies": false, + "type": "", + "demo": "tokens\/create-file-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "Token expiry date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/tokens\/{tokenId}": { + "get": { + "summary": "Get token", + "operationId": "tokensGet", + "tags": [ + "tokens" + ], + "description": "Get a token by its unique ID.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tokens", + "weight": 539, + "cookies": false, + "type": "", + "demo": "tokens\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update token", + "operationId": "tokensUpdate", + "tags": [ + "tokens" + ], + "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tokens", + "weight": 541, + "cookies": false, + "type": "", + "demo": "tokens\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "File token expiry date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete token", + "operationId": "tokensDelete", + "tags": [ + "tokens" + ], + "description": "Delete a token by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tokens", + "weight": 542, + "cookies": false, + "type": "", + "demo": "tokens\/delete.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users": { + "get": { + "summary": "List users", + "operationId": "usersList", + "tags": [ + "users" + ], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/userList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "users", + "weight": 71, + "cookies": false, + "type": "", + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user", + "operationId": "usersCreate", + "tags": [ + "users" + ], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "users", + "weight": 62, + "cookies": false, + "type": "", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + } + } + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArgon2User", + "group": "users", + "weight": 65, + "cookies": false, + "type": "", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Argon2.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBcryptUser", + "group": "users", + "weight": 63, + "cookies": false, + "type": "", + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Bcrypt.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 79, + "cookies": false, + "type": "", + "demo": "users\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 103, + "cookies": false, + "type": "", + "demo": "users\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<IDENTITY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMD5User", + "group": "users", + "weight": 64, + "cookies": false, + "type": "", + "demo": "users\/create-md-5-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using MD5.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPHPassUser", + "group": "users", + "weight": 67, + "cookies": false, + "type": "", + "demo": "users\/create-ph-pass-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using PHPass.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptUser", + "group": "users", + "weight": 68, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt.", + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "x-example": null, + "format": "int32" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + } + } + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptModifiedUser", + "group": "users", + "weight": 69, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-modified-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt Modified.", + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + } + } + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSHAUser", + "group": "users", + "weight": 66, + "cookies": false, + "type": "", + "demo": "users\/create-sha-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using SHA.", + "x-example": "password", + "format": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/{userId}": { + "get": { + "summary": "Get user", + "operationId": "usersGet", + "tags": [ + "users" + ], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "users", + "weight": 72, + "cookies": false, + "type": "", + "demo": "users\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user", + "operationId": "usersDelete", + "tags": [ + "users" + ], + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "users", + "weight": 101, + "cookies": false, + "type": "", + "demo": "users\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", + "tags": [ + "users" + ], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "users", + "weight": 86, + "cookies": false, + "type": "", + "demo": "users\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/impersonator": { + "patch": { + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", + "tags": [ + "users" + ], + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateImpersonator", + "group": "users", + "weight": 82, + "cookies": false, + "type": "", + "demo": "users\/update-impersonator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "x-example": false + } + }, + "required": [ + "impersonator" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "sessions", + "weight": 104, + "cookies": false, + "type": "", + "demo": "users\/create-jwt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": "users", + "weight": 81, + "cookies": false, + "type": "", + "demo": "users\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "tags": [ + "users" + ], + "description": "Get the user 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": 77, + "cookies": false, + "type": "", + "demo": "users\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "tags": [ + "users" + ], + "description": "Get the user membership list by its unique ID.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 76, + "cookies": false, + "type": "", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfa", + "group": "users", + "weight": 91, + "cookies": false, + "type": "", + "demo": "users\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 96, + "cookies": false, + "type": "", + "demo": "users\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [] + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 92, + "cookies": false, + "type": "", + "demo": "users\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 93, + "cookies": false, + "type": "", + "demo": "users\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 95, + "cookies": false, + "type": "", + "demo": "users\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 94, + "cookies": false, + "type": "", + "demo": "users\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", + "tags": [ + "users" + ], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "users", + "weight": 84, + "cookies": false, + "type": "", + "demo": "users\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/password": { + "patch": { + "summary": "Update password", + "operationId": "usersUpdatePassword", + "tags": [ + "users" + ], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "users", + "weight": 85, + "cookies": false, + "type": "", + "demo": "users\/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": null + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "users", + "weight": 87, + "cookies": false, + "type": "", + "demo": "users\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "number" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "users", + "weight": 73, + "cookies": false, + "type": "", + "demo": "users\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user preferences", + "operationId": "usersUpdatePrefs", + "tags": [ + "users" + ], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "users", + "weight": 89, + "cookies": false, + "type": "", + "demo": "users\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/sessions": { + "get": { + "summary": "List user sessions", + "operationId": "usersListSessions", + "tags": [ + "users" + ], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 75, + "cookies": false, + "type": "", + "demo": "users\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.read", + "sessions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 97, + "cookies": false, + "type": "", + "demo": "users\/create-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", + "tags": [ + "users" + ], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 100, + "cookies": false, + "type": "", + "demo": "users\/delete-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/sessions\/{sessionId}": { + "delete": { + "summary": "Delete user session", + "operationId": "usersDeleteSession", + "tags": [ + "users" + ], + "description": "Delete a user sessions by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 99, + "cookies": false, + "type": "", + "demo": "users\/delete-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SESSION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/status": { + "patch": { + "summary": "Update user status", + "operationId": "usersUpdateStatus", + "tags": [ + "users" + ], + "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "users", + "weight": 80, + "cookies": false, + "type": "", + "demo": "users\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "x-example": false + } + }, + "required": [ + "status" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "targets", + "weight": 78, + "cookies": false, + "type": "", + "demo": "users\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTarget", + "group": "targets", + "weight": 70, + "cookies": false, + "type": "", + "demo": "users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTarget", + "group": "targets", + "weight": 74, + "cookies": false, + "type": "", + "demo": "users\/get-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTarget", + "group": "targets", + "weight": 90, + "cookies": false, + "type": "", + "demo": "users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "x-example": "<NAME>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTarget", + "group": "targets", + "weight": 102, + "cookies": false, + "type": "", + "demo": "users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createToken", + "group": "sessions", + "weight": 98, + "cookies": false, + "type": "", + "demo": "users\/create-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "x-example": 4, + "format": "int32" + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "users", + "weight": 88, + "cookies": false, + "type": "", + "demo": "users\/update-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "users", + "weight": 83, + "cookies": false, + "type": "", + "demo": "users\/update-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + } + } + } + }, + "\/vectorsdb": { + "get": { + "summary": "List databases", + "operationId": "vectorsDBList", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "vectorsdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "vectorsdb", + "weight": 368, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/vectorsdb\/embeddings\/text": { + "post": { + "summary": "Create Text Embeddings", + "operationId": "vectorsDBCreateTextEmbeddings", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "200": { + "description": "Embedding list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/embeddingList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextEmbeddings", + "group": "documents", + "weight": 394, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createTextEmbeddings", + "namespace": "vectorsDB", + "desc": "Create Text Embedding", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "texts", + "model" + ], + "required": [ + "texts" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/embeddingList" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-text-embeddings.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "texts": { + "type": "array", + "description": "Array of text to generate embeddings.", + "x-example": null, + "items": { + "type": "string" + } + }, + "model": { + "type": "string", + "description": "The embedding model to use for generating vector embeddings.", + "x-example": "embeddinggemma", + "enum": [ + "embeddinggemma" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "texts" + ] + } + } + } + } + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 399, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 395, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 396, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 397, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 398, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 400, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "vectorsDBGet", + "tags": [ + "vectorsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "vectorsdb", + "weight": 369, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", + "tags": [ + "vectorsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "vectorsdb", + "weight": 370, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", + "tags": [ + "vectorsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "vectorsdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "vectorsDBListCollections", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "VectorsDB Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollectionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 379, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "vectorsDBCreateCollection", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 375, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "collectionId", + "name", + "dimension" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", + "tags": [ + "vectorsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 376, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", + "tags": [ + "vectorsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 377, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimensions.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", + "tags": [ + "vectorsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 378, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 389, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 385, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "desc": "Create documents", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 392, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 391, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 393, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 388, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 387, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 386, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 390, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", + "tags": [ + "vectorsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 384, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", + "tags": [ + "vectorsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 381, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "hnsw_euclidean", + "enum": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ], + "x-enum-name": "VectorsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", + "tags": [ + "vectorsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 382, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "vectorsDBDeleteIndex", + "tags": [ + "vectorsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 383, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "webhooksList", + "tags": [ + "webhooks" + ], + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Webhooks List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhookList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 573, + "cookies": false, + "type": "", + "demo": "webhooks\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create webhook", + "operationId": "webhooksCreate", + "tags": [ + "webhooks" + ], + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", + "responses": { + "201": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 572, + "cookies": false, + "type": "", + "demo": "webhooks\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "webhookId": { + "type": "string", + "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<WEBHOOK_ID>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "x-example": null + }, + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "x-example": "<AUTH_PASSWORD>" + }, + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "x-example": "<SECRET>", + "x-nullable": true + } + }, + "required": [ + "webhookId", + "url", + "name", + "events" + ] + } + } + } + } + } + }, + "\/webhooks\/{webhookId}": { + "get": { + "summary": "Get webhook", + "operationId": "webhooksGet", + "tags": [ + "webhooks" + ], + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 574, + "cookies": false, + "type": "", + "demo": "webhooks\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update webhook", + "operationId": "webhooksUpdate", + "tags": [ + "webhooks" + ], + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 576, + "cookies": false, + "type": "", + "demo": "webhooks\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "x-example": null + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "x-example": "<AUTH_PASSWORD>" + } + }, + "required": [ + "name", + "url", + "events" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete webhook", + "operationId": "webhooksDelete", + "tags": [ + "webhooks" + ], + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 575, + "cookies": false, + "type": "", + "demo": "webhooks\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + } + }, + "\/webhooks\/{webhookId}\/secret": { + "patch": { + "summary": "Update webhook secret key", + "operationId": "webhooksUpdateSecret", + "tags": [ + "webhooks" + ], + "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSecret", + "group": null, + "weight": 577, + "cookies": false, + "type": "", + "demo": "webhooks\/update-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "x-example": "<SECRET>", + "x-nullable": true + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + } + ], + "components": { + "schemas": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "error": { + "description": "Error", + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error message.", + "x-example": "Not found" + }, + "code": { + "type": "string", + "description": "Error code.", + "x-example": "404" + }, + "type": { + "type": "string", + "description": "Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes", + "x-example": "not_found" + }, + "version": { + "type": "string", + "description": "Server version number.", + "x-example": "1.0" + } + }, + "required": [ + "message", + "code", + "type", + "version" + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "$ref": "#\/components\/schemas\/document" + }, + "x-example": "" + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "$ref": "#\/components\/schemas\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ], + "example": { + "total": 5, + "tables": "" + } + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/collection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/database" + }, + "x-example": "" + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users that matched your query.", + "x-example": 5, + "format": "int32" + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { + "$ref": "#\/components\/schemas\/user" + }, + "x-example": "" + } + }, + "required": [ + "total", + "users" + ], + "example": { + "total": 5, + "users": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "$ref": "#\/components\/schemas\/session" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "$ref": "#\/components\/schemas\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "$ref": "#\/components\/schemas\/log" + }, + "x-example": "" + } + }, + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "$ref": "#\/components\/schemas\/file" + }, + "x-example": "" + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "$ref": "#\/components\/schemas\/bucket" + }, + "x-example": "" + } + }, + "required": [ + "total", + "buckets" + ], + "example": { + "total": 5, + "buckets": "" + } + }, + "resourceTokenList": { + "description": "Resource Tokens List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/resourceToken" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "$ref": "#\/components\/schemas\/team" + }, + "x-example": "" + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "$ref": "#\/components\/schemas\/membership" + }, + "x-example": "" + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "siteList": { + "description": "Sites List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sites that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "List of sites.", + "items": { + "$ref": "#\/components\/schemas\/site" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sites" + ], + "example": { + "total": 5, + "sites": "" + } + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "$ref": "#\/components\/schemas\/function" + }, + "x-example": "" + } + }, + "required": [ + "total", + "functions" + ], + "example": { + "total": 5, + "functions": "" + } + }, + "frameworkList": { + "description": "Frameworks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks.", + "items": { + "$ref": "#\/components\/schemas\/framework" + }, + "x-example": "" + } + }, + "required": [ + "total", + "frameworks" + ], + "example": { + "total": 5, + "frameworks": "" + } + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { + "$ref": "#\/components\/schemas\/runtime" + }, + "x-example": "" + } + }, + "required": [ + "total", + "runtimes" + ], + "example": { + "total": 5, + "runtimes": "" + } + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments that matched your query.", + "x-example": 5, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { + "$ref": "#\/components\/schemas\/deployment" + }, + "x-example": "" + } + }, + "required": [ + "total", + "deployments" + ], + "example": { + "total": 5, + "deployments": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "$ref": "#\/components\/schemas\/execution" + }, + "x-example": "" + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { + "$ref": "#\/components\/schemas\/webhook" + }, + "x-example": "" + } + }, + "required": [ + "total", + "webhooks" + ], + "example": { + "total": 5, + "webhooks": "" + } + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/key" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "$ref": "#\/components\/schemas\/country" + }, + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "$ref": "#\/components\/schemas\/continent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "$ref": "#\/components\/schemas\/language" + }, + "x-example": "" + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "$ref": "#\/components\/schemas\/currency" + }, + "x-example": "" + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "$ref": "#\/components\/schemas\/phone" + }, + "x-example": "" + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ], + "example": { + "total": 5, + "variables": "" + } + }, + "mockNumberList": { + "description": "Mock Numbers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of mockNumbers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "mockNumbers": { + "type": "array", + "description": "List of mockNumbers.", + "items": { + "$ref": "#\/components\/schemas\/mockNumber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "mockNumbers" + ], + "example": { + "total": 5, + "mockNumbers": "" + } + }, + "policyList": { + "description": "Policies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies in the given project.", + "x-example": 9, + "format": "int32" + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "policies" + ], + "example": { + "total": 9, + "policies": "" + } + }, + "emailTemplateList": { + "description": "Email Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/emailTemplate" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "healthStatusList": { + "description": "Status List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of statuses that matched your query.", + "x-example": 5, + "format": "int32" + }, + "statuses": { + "type": "array", + "description": "List of statuses.", + "items": { + "$ref": "#\/components\/schemas\/healthStatus" + }, + "x-example": "" + } + }, + "required": [ + "total", + "statuses" + ], + "example": { + "total": 5, + "statuses": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "$ref": "#\/components\/schemas\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "$ref": "#\/components\/schemas\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "$ref": "#\/components\/schemas\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ], + "example": { + "total": 5, + "messages": "" + } + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "$ref": "#\/components\/schemas\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ], + "example": { + "total": 5, + "topics": "" + } + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "$ref": "#\/components\/schemas\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ], + "example": { + "total": 5, + "subscribers": "" + } + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ], + "example": { + "total": 5, + "targets": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "$ref": "#\/components\/schemas\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "$ref": "#\/components\/schemas\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ], + "example": { + "total": 5, + "specifications": "" + } + }, + "vectorsdbCollectionList": { + "description": "VectorsDB Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "embeddingList": { + "description": "Embedding list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of embeddings that matched your query.", + "x-example": 5, + "format": "int32" + }, + "embeddings": { + "type": "array", + "description": "List of embeddings.", + "items": { + "$ref": "#\/components\/schemas\/embedding" + }, + "x-example": "" + } + }, + "required": [ + "total", + "embeddings" + ], + "example": { + "total": 5, + "embeddings": "" + } + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb", + "documentsdb", + "vectorsdb" + ] + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } + }, + "embedding": { + "description": "Embedding", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Embedding model used to generate embeddings.", + "x-example": "embeddinggemma" + }, + "dimension": { + "type": "integer", + "description": "Number of dimensions for each embedding vector.", + "x-example": 768, + "format": "int32" + }, + "embedding": { + "type": "array", + "description": "Embedding vector values. If an error occurs, this will be an empty array.", + "items": { + "type": "number", + "format": "double" + }, + "x-example": [ + 0.01, + 0.02, + 0.03 + ] + }, + "error": { + "type": "string", + "description": "Error message if embedding generation fails. Empty string if no error.", + "x-example": "Error message" + } + }, + "required": [ + "model", + "dimension", + "embedding", + "error" + ], + "example": { + "model": "embeddinggemma", + "dimension": 768, + "embedding": [ + 0.01, + 0.02, + 0.03 + ], + "error": "Error message" + } + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributePoint" + }, + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship", + "point": "#\/components\/schemas\/attributePoint", + "linestring": "#\/components\/schemas\/attributeLine", + "polygon": "#\/components\/schemas\/attributePolygon", + "varchar": "#\/components\/schemas\/attributeVarchar", + "text": "#\/components\/schemas\/attributeText", + "mediumtext": "#\/components\/schemas\/attributeMediumtext", + "longtext": "#\/components\/schemas\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributePoint": { + "type": "point" + }, + "#\/components\/schemas\/attributeLine": { + "type": "linestring" + }, + "#\/components\/schemas\/attributePolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/attributeVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/attributeText": { + "type": "text" + }, + "#\/components\/schemas\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/attributeLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "x-example": 5, + "format": "int32" + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributePoint" + }, + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship", + "point": "#\/components\/schemas\/attributePoint", + "linestring": "#\/components\/schemas\/attributeLine", + "polygon": "#\/components\/schemas\/attributePolygon", + "varchar": "#\/components\/schemas\/attributeVarchar", + "text": "#\/components\/schemas\/attributeText", + "mediumtext": "#\/components\/schemas\/attributeMediumtext", + "longtext": "#\/components\/schemas\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributePoint": { + "type": "point" + }, + "#\/components\/schemas\/attributeLine": { + "type": "linestring" + }, + "#\/components\/schemas\/attributePolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/attributeVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/attributeText": { + "type": "text" + }, + "#\/components\/schemas\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/attributeLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "attributes" + ], + "example": { + "total": 5, + "attributes": "" + } + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "attributePoint": { + "description": "AttributePoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + 0, + 0 + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "attributeLine": { + "description": "AttributeLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "attributePolygon": { + "description": "AttributePolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "attributeVarchar": { + "description": "AttributeVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeText": { + "description": "AttributeText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeMediumtext": { + "description": "AttributeMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeLongtext": { + "description": "AttributeLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "vectorsdbCollection": { + "description": "VectorsDB Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeObject" + }, + { + "$ref": "#\/components\/schemas\/attributeVector" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "object": "#\/components\/schemas\/attributeObject", + "vector": "#\/components\/schemas\/attributeVector" + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed", + "dimension" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500, + "dimension": 1536 + } + }, + "attributeObject": { + "description": "AttributeObject", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeVector": { + "description": "AttributeVector", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Vector dimensions.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 1536 + } + }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship", + "point": "#\/components\/schemas\/columnPoint", + "linestring": "#\/components\/schemas\/columnLine", + "polygon": "#\/components\/schemas\/columnPolygon", + "varchar": "#\/components\/schemas\/columnVarchar", + "text": "#\/components\/schemas\/columnText", + "mediumtext": "#\/components\/schemas\/columnMediumtext", + "longtext": "#\/components\/schemas\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnPoint": { + "type": "point" + }, + "#\/components\/schemas\/columnLine": { + "type": "linestring" + }, + "#\/components\/schemas\/columnPolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/columnVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/columnText": { + "type": "text" + }, + "#\/components\/schemas\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/columnLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum row size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used row size in bytes based on defined columns.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship", + "point": "#\/components\/schemas\/columnPoint", + "linestring": "#\/components\/schemas\/columnLine", + "polygon": "#\/components\/schemas\/columnPolygon", + "varchar": "#\/components\/schemas\/columnVarchar", + "text": "#\/components\/schemas\/columnText", + "mediumtext": "#\/components\/schemas\/columnMediumtext", + "longtext": "#\/components\/schemas\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnPoint": { + "type": "point" + }, + "#\/components\/schemas\/columnLine": { + "type": "linestring" + }, + "#\/components\/schemas\/columnPolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/columnVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/columnText": { + "type": "text" + }, + "#\/components\/schemas\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/columnLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ], + "example": { + "total": 5, + "columns": "" + } + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "columnPoint": { + "description": "ColumnPoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + 0, + 0 + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "columnLine": { + "description": "ColumnLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "columnPolygon": { + "description": "ColumnPolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "columnVarchar": { + "description": "ColumnVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnText": { + "description": "ColumnText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnMediumtext": { + "description": "ColumnMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnLongtext": { + "description": "ColumnLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "index": { + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index attributes length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } + }, + "columnIndex": { + "description": "Index", + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "columns", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Presence sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "userInternalId": { + "type": "string", + "description": "User internal ID.", + "x-example": "1" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "additionalProperties": true, + "x-additional-properties-key": "metadata", + "required": [ + "$id", + "$sequence", + "$createdAt", + "$updatedAt", + "$permissions", + "userInternalId", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userInternalId": "1", + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/algoArgon2" + }, + { + "$ref": "#\/components\/schemas\/algoScrypt" + }, + { + "$ref": "#\/components\/schemas\/algoScryptModified" + }, + { + "$ref": "#\/components\/schemas\/algoBcrypt" + }, + { + "$ref": "#\/components\/schemas\/algoPhpass" + }, + { + "$ref": "#\/components\/schemas\/algoSha" + }, + { + "$ref": "#\/components\/schemas\/algoMd5" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/components\/schemas\/algoArgon2", + "scrypt": "#\/components\/schemas\/algoScrypt", + "scryptMod": "#\/components\/schemas\/algoScryptModified", + "bcrypt": "#\/components\/schemas\/algoBcrypt", + "phpass": "#\/components\/schemas\/algoPhpass", + "sha": "#\/components\/schemas\/algoSha", + "md5": "#\/components\/schemas\/algoMd5" + } + } + }, + "nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "x-example": 100, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { + "type": "string" + }, + "x-example": [ + "jpg", + "png" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Image transformations are enabled.", + "x-example": false + }, + "totalSize": { + "type": "integer", + "description": "Total size of this bucket in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus", + "transformations", + "totalSize" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false, + "transformations": false, + "totalSize": 128 + } + }, + "resourceToken": { + "description": "ResourceToken", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "files" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "resourceId", + "resourceType", + "expire", + "secret", + "accessedAt" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "$ref": "#\/components\/schemas\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } + }, + "site": { + "description": "Site", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Site ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Site creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Site update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Site name.", + "x-example": "My Site" + }, + "enabled": { + "type": "boolean", + "description": "Site enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "framework": { + "type": "string", + "description": "Site framework.", + "x-example": "react" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Site's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "deploymentScreenshotLight": { + "type": "string", + "description": "Screenshot of active deployment with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentScreenshotDark": { + "type": "string", + "description": "Screenshot of active deployment with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentId": { + "type": "string", + "description": "Site's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "vars": { + "type": "array", + "description": "Site variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] + }, + "timeout": { + "type": "integer", + "description": "Site request timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the site dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the site.", + "x-example": "npm run build" + }, + "startCommand": { + "type": "string", + "description": "Custom command to use when starting site runtime.", + "x-example": "node custom-server.mjs" + }, + "outputDirectory": { + "type": "string", + "description": "The directory where the site build output is located.", + "x-example": "build" + }, + "installationId": { + "type": "string", + "description": "Site VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "x-example": "sites\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for SSR executions.", + "x-example": "s-1vcpu-512mb" + }, + "buildRuntime": { + "type": "string", + "description": "Site build runtime.", + "x-example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework adapter.", + "x-example": "static" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "enabled", + "live", + "logging", + "framework", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "deploymentScreenshotLight", + "deploymentScreenshotDark", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "vars", + "timeout", + "installCommand", + "buildCommand", + "startCommand", + "outputDirectory", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "startCommand": "node custom-server.mjs", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution and build runtime.", + "x-example": "python-3.8" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentId": { + "type": "string", + "description": "Function's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb" + } + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "x-example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "x-example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { + "type": "string" + }, + "x-example": "amd64" + } + }, + "required": [ + "$id", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } + }, + "framework": { + "description": "Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Framework key.", + "x-example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "x-example": "SvelteKit" + }, + "buildRuntime": { + "type": "string", + "description": "Default runtime version.", + "x-example": "node-22" + }, + "runtimes": { + "type": "array", + "description": "List of supported runtime versions.", + "items": { + "type": "string" + }, + "x-example": [ + "static-1", + "node-22" + ] + }, + "adapters": { + "type": "array", + "description": "List of supported adapters.", + "items": { + "$ref": "#\/components\/schemas\/frameworkAdapter" + }, + "x-example": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "required": [ + "key", + "name", + "buildRuntime", + "runtimes", + "adapters" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "frameworkAdapter": { + "description": "Framework Adapter", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Adapter key.", + "x-example": "static" + }, + "installCommand": { + "type": "string", + "description": "Default command to download dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Default command to build site into output directory.", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Default output directory of build.", + "x-example": ".\/dist" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "key", + "installCommand", + "buildCommand", + "outputDirectory", + "fallbackFile" + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "sourceSize": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output size in bytes.", + "x-example": 128, + "format": "int32" + }, + "totalSize": { + "type": "integer", + "description": "The total size in bytes (source and build output).", + "x-example": 128, + "format": "int32" + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "screenshotLight": { + "type": "string", + "description": "Screenshot with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "screenshotDark": { + "type": "string", + "description": "Screenshot with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "canceled", + "failed" + ] + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildDuration": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "sourceSize", + "buildSize", + "totalSize", + "buildId", + "activate", + "screenshotLight", + "screenshotDark", + "status", + "buildLogs", + "buildDuration", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranch", + "providerBranchUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Project creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Project update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Project name.", + "x-example": "New Project" + }, + "description": { + "type": "string", + "description": "Project description.", + "x-example": "This is a new project." + }, + "teamId": { + "type": "string", + "description": "Project team ID.", + "x-example": "1592981250" + }, + "logo": { + "type": "string", + "description": "Project logo file ID.", + "x-example": "5f5c451b403cb" + }, + "url": { + "type": "string", + "description": "Project website URL.", + "x-example": "5f5c451b403cb" + }, + "legalName": { + "type": "string", + "description": "Company legal name.", + "x-example": "Company LTD." + }, + "legalCountry": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", + "x-example": "US" + }, + "legalState": { + "type": "string", + "description": "State name.", + "x-example": "New York" + }, + "legalCity": { + "type": "string", + "description": "City name.", + "x-example": "New York City." + }, + "legalAddress": { + "type": "string", + "description": "Company Address.", + "x-example": "620 Eighth Avenue, New York, NY 10018" + }, + "legalTaxId": { + "type": "string", + "description": "Company Tax ID.", + "x-example": "131102020" + }, + "authDuration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 60, + "format": "int32" + }, + "authLimit": { + "type": "integer", + "description": "Max users allowed. 0 is unlimited.", + "x-example": 100, + "format": "int32" + }, + "authSessionsLimit": { + "type": "integer", + "description": "Max sessions allowed per user. 100 maximum.", + "x-example": 10, + "format": "int32" + }, + "authPasswordHistory": { + "type": "integer", + "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", + "x-example": 5, + "format": "int32" + }, + "authPasswordDictionary": { + "type": "boolean", + "description": "Whether or not to check user's password against most commonly used passwords.", + "x-example": true + }, + "authPersonalDataCheck": { + "type": "boolean", + "description": "Whether or not to check the user password for similarity with their personal data.", + "x-example": true + }, + "authDisposableEmails": { + "type": "boolean", + "description": "Whether or not to disallow disposable email addresses during signup and email updates.", + "x-example": true + }, + "authCanonicalEmails": { + "type": "boolean", + "description": "Whether or not to require canonical email addresses during signup and email updates.", + "x-example": true + }, + "authFreeEmails": { + "type": "boolean", + "description": "Whether or not to disallow free email addresses during signup and email updates.", + "x-example": true + }, + "authMockNumbers": { + "type": "array", + "description": "An array of mock numbers and their corresponding verification codes (OTPs).", + "items": { + "$ref": "#\/components\/schemas\/mockNumber" + }, + "x-example": [ + {} + ] + }, + "authSessionAlerts": { + "type": "boolean", + "description": "Whether or not to send session alert emails to users.", + "x-example": true + }, + "authMembershipsUserName": { + "type": "boolean", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "authMembershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "authMembershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", + "x-example": true + }, + "authMembershipsUserId": { + "type": "boolean", + "description": "Whether or not to show user IDs in the teams membership response.", + "x-example": true + }, + "authMembershipsUserPhone": { + "type": "boolean", + "description": "Whether or not to show user phone numbers in the teams membership response.", + "x-example": true + }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, + "oAuthProviders": { + "type": "array", + "description": "List of Auth Providers.", + "items": { + "$ref": "#\/components\/schemas\/authProvider" + }, + "x-example": [ + {} + ] + }, + "platforms": { + "type": "array", + "description": "List of Platforms.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + }, + "x-example": {} + }, + "webhooks": { + "type": "array", + "description": "List of Webhooks.", + "items": { + "$ref": "#\/components\/schemas\/webhook" + }, + "x-example": {} + }, + "keys": { + "type": "array", + "description": "List of API Keys.", + "items": { + "$ref": "#\/components\/schemas\/key" + }, + "x-example": {} + }, + "devKeys": { + "type": "array", + "description": "List of dev keys.", + "items": { + "$ref": "#\/components\/schemas\/devKey" + }, + "x-example": {} + }, + "smtpEnabled": { + "type": "boolean", + "description": "Status for custom SMTP", + "x-example": false + }, + "smtpSenderName": { + "type": "string", + "description": "SMTP sender name", + "x-example": "John Appwrite" + }, + "smtpSenderEmail": { + "type": "string", + "description": "SMTP sender email", + "x-example": "john@appwrite.io" + }, + "smtpReplyToName": { + "type": "string", + "description": "SMTP reply to name", + "x-example": "Support Team" + }, + "smtpReplyToEmail": { + "type": "string", + "description": "SMTP reply to email", + "x-example": "support@appwrite.io" + }, + "smtpHost": { + "type": "string", + "description": "SMTP server host name", + "x-example": "mail.appwrite.io" + }, + "smtpPort": { + "type": "integer", + "description": "SMTP server port", + "x-example": 25, + "format": "int32" + }, + "smtpUsername": { + "type": "string", + "description": "SMTP server username", + "x-example": "emailuser" + }, + "smtpPassword": { + "type": "string", + "description": "SMTP server password. This property is write-only and always returned empty.", + "x-example": "" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "x-example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "labels": { + "type": "array", + "description": "Labels for the project.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "status": { + "type": "string", + "description": "Project status.", + "x-example": "active" + }, + "authEmailPassword": { + "type": "boolean", + "description": "Email\/Password auth method status", + "x-example": true + }, + "authUsersAuthMagicURL": { + "type": "boolean", + "description": "Magic URL auth method status", + "x-example": true + }, + "authEmailOtp": { + "type": "boolean", + "description": "Email (OTP) auth method status", + "x-example": true + }, + "authAnonymous": { + "type": "boolean", + "description": "Anonymous auth method status", + "x-example": true + }, + "authInvites": { + "type": "boolean", + "description": "Invites auth method status", + "x-example": true + }, + "authJWT": { + "type": "boolean", + "description": "JWT auth method status", + "x-example": true + }, + "authPhone": { + "type": "boolean", + "description": "Phone auth method status", + "x-example": true + }, + "serviceStatusForAccount": { + "type": "boolean", + "description": "Account service status", + "x-example": true + }, + "serviceStatusForAvatars": { + "type": "boolean", + "description": "Avatars service status", + "x-example": true + }, + "serviceStatusForDatabases": { + "type": "boolean", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTablesdb": { + "type": "boolean", + "description": "TablesDB service status", + "x-example": true + }, + "serviceStatusForLocale": { + "type": "boolean", + "description": "Locale service status", + "x-example": true + }, + "serviceStatusForHealth": { + "type": "boolean", + "description": "Health service status", + "x-example": true + }, + "serviceStatusForProject": { + "type": "boolean", + "description": "Project service status", + "x-example": true + }, + "serviceStatusForStorage": { + "type": "boolean", + "description": "Storage service status", + "x-example": true + }, + "serviceStatusForTeams": { + "type": "boolean", + "description": "Teams service status", + "x-example": true + }, + "serviceStatusForUsers": { + "type": "boolean", + "description": "Users service status", + "x-example": true + }, + "serviceStatusForVcs": { + "type": "boolean", + "description": "VCS service status", + "x-example": true + }, + "serviceStatusForSites": { + "type": "boolean", + "description": "Sites service status", + "x-example": true + }, + "serviceStatusForFunctions": { + "type": "boolean", + "description": "Functions service status", + "x-example": true + }, + "serviceStatusForProxy": { + "type": "boolean", + "description": "Proxy service status", + "x-example": true + }, + "serviceStatusForGraphql": { + "type": "boolean", + "description": "GraphQL service status", + "x-example": true + }, + "serviceStatusForMigrations": { + "type": "boolean", + "description": "Migrations service status", + "x-example": true + }, + "serviceStatusForMessaging": { + "type": "boolean", + "description": "Messaging service status", + "x-example": true + }, + "protocolStatusForRest": { + "type": "boolean", + "description": "REST protocol status", + "x-example": true + }, + "protocolStatusForGraphql": { + "type": "boolean", + "description": "GraphQL protocol status", + "x-example": true + }, + "protocolStatusForWebsocket": { + "type": "boolean", + "description": "Websocket protocol status", + "x-example": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "logo", + "url", + "legalName", + "legalCountry", + "legalState", + "legalCity", + "legalAddress", + "legalTaxId", + "authDuration", + "authLimit", + "authSessionsLimit", + "authPasswordHistory", + "authPasswordDictionary", + "authPersonalDataCheck", + "authDisposableEmails", + "authCanonicalEmails", + "authFreeEmails", + "authMockNumbers", + "authSessionAlerts", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", + "authMembershipsUserId", + "authMembershipsUserPhone", + "authInvalidateSessions", + "oAuthProviders", + "platforms", + "webhooks", + "keys", + "devKeys", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyToName", + "smtpReplyToEmail", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "labels", + "status", + "authEmailPassword", + "authUsersAuthMagicURL", + "authEmailOtp", + "authAnonymous", + "authInvites", + "authJWT", + "authPhone", + "serviceStatusForAccount", + "serviceStatusForAvatars", + "serviceStatusForDatabases", + "serviceStatusForTablesdb", + "serviceStatusForLocale", + "serviceStatusForHealth", + "serviceStatusForProject", + "serviceStatusForStorage", + "serviceStatusForTeams", + "serviceStatusForUsers", + "serviceStatusForVcs", + "serviceStatusForSites", + "serviceStatusForFunctions", + "serviceStatusForProxy", + "serviceStatusForGraphql", + "serviceStatusForMigrations", + "serviceStatusForMessaging", + "protocolStatusForRest", + "protocolStatusForGraphql", + "protocolStatusForWebsocket" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authMembershipsUserId": true, + "authMembershipsUserPhone": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyToName": "Support Team", + "smtpReplyToEmail": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [ + "vip" + ], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true + } + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Webhook creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Webhook update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "x-example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "x-example": "https:\/\/example.com\/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { + "type": "string" + }, + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] + }, + "tls": { + "type": "boolean", + "description": "Indicates if SSL \/ TLS certificate verification is enabled.", + "x-example": true + }, + "authUsername": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "authPassword": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + }, + "secret": { + "type": "string", + "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", + "x-example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "x-example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "x-example": "Failed to connect to remote server." + }, + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "url", + "events", + "tls", + "authUsername", + "authPassword", + "secret", + "enabled", + "logs", + "attempts" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "ephemeralKey": { + "description": "Ephemeral Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "devKey": { + "description": "DevKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "Dev API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "mockNumber": { + "description": "Mock Number", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "x-example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "x-example": "123456" + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "number", + "otp", + "$createdAt", + "$updatedAt" + ], + "example": { + "number": "+1612842323", + "otp": "123456", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oAuth2Github": { + "description": "OAuth2GitHub", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", + "x-example": "e4d87900000000540733" + }, + "clientSecret": { + "type": "string", + "description": "GitHub OAuth2 client secret.", + "x-example": "5e07c00000000000000000000000000000198bcc" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "e4d87900000000540733", + "clientSecret": "5e07c00000000000000000000000000000198bcc" + } + }, + "oAuth2Discord": { + "description": "OAuth2Discord", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Discord OAuth2 client ID.", + "x-example": "950722000000343754" + }, + "clientSecret": { + "type": "string", + "description": "Discord OAuth2 client secret.", + "x-example": "YmPXnM000000000000000000002zFg5D" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "950722000000343754", + "clientSecret": "YmPXnM000000000000000000002zFg5D" + } + }, + "oAuth2Figma": { + "description": "OAuth2Figma", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Figma OAuth2 client ID.", + "x-example": "byay5H0000000000VtiI40" + }, + "clientSecret": { + "type": "string", + "description": "Figma OAuth2 client secret.", + "x-example": "yEpOYn0000000000000000004iIsU5" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "byay5H0000000000VtiI40", + "clientSecret": "yEpOYn0000000000000000004iIsU5" + } + }, + "oAuth2Dropbox": { + "description": "OAuth2Dropbox", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appKey": { + "type": "string", + "description": "Dropbox OAuth2 app key.", + "x-example": "jl000000000009t" + }, + "appSecret": { + "type": "string", + "description": "Dropbox OAuth2 app secret.", + "x-example": "g200000000000vw" + } + }, + "required": [ + "$id", + "enabled", + "appKey", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appKey": "jl000000000009t", + "appSecret": "g200000000000vw" + } + }, + "oAuth2Dailymotion": { + "description": "OAuth2Dailymotion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Dailymotion OAuth2 API key.", + "x-example": "07a9000000000000067f" + }, + "apiSecret": { + "type": "string", + "description": "Dailymotion OAuth2 API secret.", + "x-example": "a399a90000000000000000000000000000d90639" + } + }, + "required": [ + "$id", + "enabled", + "apiKey", + "apiSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "apiKey": "07a9000000000000067f", + "apiSecret": "a399a90000000000000000000000000000d90639" + } + }, + "oAuth2Bitbucket": { + "description": "OAuth2Bitbucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "key": { + "type": "string", + "description": "Bitbucket OAuth2 key.", + "x-example": "Knt70000000000ByRc" + }, + "secret": { + "type": "string", + "description": "Bitbucket OAuth2 secret.", + "x-example": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "required": [ + "$id", + "enabled", + "key", + "secret" + ], + "example": { + "$id": "github", + "enabled": false, + "key": "Knt70000000000ByRc", + "secret": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "oAuth2Bitly": { + "description": "OAuth2Bitly", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Bitly OAuth2 client ID.", + "x-example": "d95151000000000000000000000000000067af9b" + }, + "clientSecret": { + "type": "string", + "description": "Bitly OAuth2 client secret.", + "x-example": "a13e250000000000000000000000000000d73095" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "d95151000000000000000000000000000067af9b", + "clientSecret": "a13e250000000000000000000000000000d73095" + } + }, + "oAuth2Box": { + "description": "OAuth2Box", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Box OAuth2 client ID.", + "x-example": "deglcs00000000000000000000x2og6y" + }, + "clientSecret": { + "type": "string", + "description": "Box OAuth2 client secret.", + "x-example": "OKM1f100000000000000000000eshEif" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "deglcs00000000000000000000x2og6y", + "clientSecret": "OKM1f100000000000000000000eshEif" + } + }, + "oAuth2Autodesk": { + "description": "OAuth2Autodesk", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Autodesk OAuth2 client ID.", + "x-example": "5zw90v00000000000000000000kVYXN7" + }, + "clientSecret": { + "type": "string", + "description": "Autodesk OAuth2 client secret.", + "x-example": "7I000000000000MW" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "5zw90v00000000000000000000kVYXN7", + "clientSecret": "7I000000000000MW" + } + }, + "oAuth2Google": { + "description": "OAuth2Google", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Google OAuth2 client ID.", + "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + }, + "clientSecret": { + "type": "string", + "description": "Google OAuth2 client secret.", + "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "oAuth2Zoom": { + "description": "OAuth2Zoom", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoom OAuth2 client ID.", + "x-example": "QMAC00000000000000w0AQ" + }, + "clientSecret": { + "type": "string", + "description": "Zoom OAuth2 client secret.", + "x-example": "GAWsG4000000000000000000007U01ON" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "QMAC00000000000000w0AQ", + "clientSecret": "GAWsG4000000000000000000007U01ON" + } + }, + "oAuth2Zoho": { + "description": "OAuth2Zoho", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoho OAuth2 client ID.", + "x-example": "1000.83C178000000000000000000RPNX0B" + }, + "clientSecret": { + "type": "string", + "description": "Zoho OAuth2 client secret.", + "x-example": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "1000.83C178000000000000000000RPNX0B", + "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "oAuth2Yandex": { + "description": "OAuth2Yandex", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yandex OAuth2 client ID.", + "x-example": "6a8a6a0000000000000000000091483c" + }, + "clientSecret": { + "type": "string", + "description": "Yandex OAuth2 client secret.", + "x-example": "bbf98500000000000000000000c75a63" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a8a6a0000000000000000000091483c", + "clientSecret": "bbf98500000000000000000000c75a63" + } + }, + "oAuth2X": { + "description": "OAuth2X", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "X OAuth2 customer key.", + "x-example": "slzZV0000000000000NFLaWT" + }, + "secretKey": { + "type": "string", + "description": "X OAuth2 secret key.", + "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "slzZV0000000000000NFLaWT", + "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "oAuth2WordPress": { + "description": "OAuth2WordPress", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "WordPress OAuth2 client ID.", + "x-example": "130005" + }, + "clientSecret": { + "type": "string", + "description": "WordPress OAuth2 client secret.", + "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "130005", + "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "oAuth2Twitch": { + "description": "OAuth2Twitch", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Twitch OAuth2 client ID.", + "x-example": "vvi0in000000000000000000ikmt9p" + }, + "clientSecret": { + "type": "string", + "description": "Twitch OAuth2 client secret.", + "x-example": "pmapue000000000000000000zylw3v" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "vvi0in000000000000000000ikmt9p", + "clientSecret": "pmapue000000000000000000zylw3v" + } + }, + "oAuth2Stripe": { + "description": "OAuth2Stripe", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Stripe OAuth2 client ID.", + "x-example": "ca_UKibXX0000000000000000000006byvR" + }, + "apiSecretKey": { + "type": "string", + "description": "Stripe OAuth2 API secret key.", + "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "apiSecretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "ca_UKibXX0000000000000000000006byvR", + "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "oAuth2Spotify": { + "description": "OAuth2Spotify", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Spotify OAuth2 client ID.", + "x-example": "6ec271000000000000000000009beace" + }, + "clientSecret": { + "type": "string", + "description": "Spotify OAuth2 client secret.", + "x-example": "db068a000000000000000000008b5b9f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6ec271000000000000000000009beace", + "clientSecret": "db068a000000000000000000008b5b9f" + } + }, + "oAuth2Slack": { + "description": "OAuth2Slack", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Slack OAuth2 client ID.", + "x-example": "23000000089.15000000000023" + }, + "clientSecret": { + "type": "string", + "description": "Slack OAuth2 client secret.", + "x-example": "81656000000000000000000000f3d2fd" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "23000000089.15000000000023", + "clientSecret": "81656000000000000000000000f3d2fd" + } + }, + "oAuth2Podio": { + "description": "OAuth2Podio", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Podio OAuth2 client ID.", + "x-example": "appwrite-oauth-test-app" + }, + "clientSecret": { + "type": "string", + "description": "Podio OAuth2 client secret.", + "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-oauth-test-app", + "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "oAuth2Notion": { + "description": "OAuth2Notion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauthClientId": { + "type": "string", + "description": "Notion OAuth2 client ID.", + "x-example": "341d8700-0000-0000-0000-000000446ee3" + }, + "oauthClientSecret": { + "type": "string", + "description": "Notion OAuth2 client secret.", + "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "required": [ + "$id", + "enabled", + "oauthClientId", + "oauthClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", + "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "oAuth2Salesforce": { + "description": "OAuth2Salesforce", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "Salesforce OAuth2 consumer key.", + "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + }, + "customerSecret": { + "type": "string", + "description": "Salesforce OAuth2 consumer secret.", + "x-example": "3w000000000000e2" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "customerSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "customerSecret": "3w000000000000e2" + } + }, + "oAuth2Yahoo": { + "description": "OAuth2Yahoo", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yahoo OAuth2 client ID.", + "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" + }, + "clientSecret": { + "type": "string", + "description": "Yahoo OAuth2 client secret.", + "x-example": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "clientSecret": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "oAuth2Linkedin": { + "description": "OAuth2Linkedin", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "LinkedIn OAuth2 client ID.", + "x-example": "770000000000dv" + }, + "primaryClientSecret": { + "type": "string", + "description": "LinkedIn OAuth2 primary client secret.", + "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "primaryClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "770000000000dv", + "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "oAuth2Disqus": { + "description": "OAuth2Disqus", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "publicKey": { + "type": "string", + "description": "Disqus OAuth2 public key.", + "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + }, + "secretKey": { + "type": "string", + "description": "Disqus OAuth2 secret key.", + "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "required": [ + "$id", + "enabled", + "publicKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "oAuth2Amazon": { + "description": "OAuth2Amazon", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Amazon OAuth2 client ID.", + "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" + }, + "clientSecret": { + "type": "string", + "description": "Amazon OAuth2 client secret.", + "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "oAuth2Etsy": { + "description": "OAuth2Etsy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "keyString": { + "type": "string", + "description": "Etsy OAuth2 keystring.", + "x-example": "nsgzxh0000000000008j85a2" + }, + "sharedSecret": { + "type": "string", + "description": "Etsy OAuth2 shared secret.", + "x-example": "tp000000ru" + } + }, + "required": [ + "$id", + "enabled", + "keyString", + "sharedSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "keyString": "nsgzxh0000000000008j85a2", + "sharedSecret": "tp000000ru" + } + }, + "oAuth2Facebook": { + "description": "OAuth2Facebook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appId": { + "type": "string", + "description": "Facebook OAuth2 app ID.", + "x-example": "260600000007694" + }, + "appSecret": { + "type": "string", + "description": "Facebook OAuth2 app secret.", + "x-example": "2d0b2800000000000000000000d38af4" + } + }, + "required": [ + "$id", + "enabled", + "appId", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appId": "260600000007694", + "appSecret": "2d0b2800000000000000000000d38af4" + } + }, + "oAuth2Tradeshift": { + "description": "OAuth2Tradeshift", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauth2ClientId": { + "type": "string", + "description": "Tradeshift OAuth2 client ID.", + "x-example": "appwrite-test-org.appwrite-test-app" + }, + "oauth2ClientSecret": { + "type": "string", + "description": "Tradeshift OAuth2 client secret.", + "x-example": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "required": [ + "$id", + "enabled", + "oauth2ClientId", + "oauth2ClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauth2ClientId": "appwrite-test-org.appwrite-test-app", + "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "oAuth2Paypal": { + "description": "OAuth2Paypal", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "PayPal OAuth2 client ID.", + "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" + }, + "secretKey": { + "type": "string", + "description": "PayPal OAuth2 secret key.", + "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "oAuth2Gitlab": { + "description": "OAuth2Gitlab", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "GitLab OAuth2 application ID.", + "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" + }, + "secret": { + "type": "string", + "description": "GitLab OAuth2 secret.", + "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" + }, + "endpoint": { + "type": "string", + "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", + "x-example": "https:\/\/gitlab.com" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "secret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "endpoint": "https:\/\/gitlab.com" + } + }, + "oAuth2Authentik": { + "description": "OAuth2Authentik", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Authentik OAuth2 client ID.", + "x-example": "dTKOPa0000000000000000000000000000e7G8hv" + }, + "clientSecret": { + "type": "string", + "description": "Authentik OAuth2 client secret.", + "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" + }, + "endpoint": { + "type": "string", + "description": "Authentik OAuth2 endpoint domain.", + "x-example": "example.authentik.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dTKOPa0000000000000000000000000000e7G8hv", + "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "endpoint": "example.authentik.com" + } + }, + "oAuth2Auth0": { + "description": "OAuth2Auth0", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Auth0 OAuth2 client ID.", + "x-example": "OaOkIA000000000000000000005KLSYq" + }, + "clientSecret": { + "type": "string", + "description": "Auth0 OAuth2 client secret.", + "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" + }, + "endpoint": { + "type": "string", + "description": "Auth0 OAuth2 endpoint domain.", + "x-example": "example.us.auth0.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "OaOkIA000000000000000000005KLSYq", + "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "endpoint": "example.us.auth0.com" + } + }, + "oAuth2FusionAuth": { + "description": "OAuth2FusionAuth", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "FusionAuth OAuth2 client ID.", + "x-example": "b2222c00-0000-0000-0000-000000862097" + }, + "clientSecret": { + "type": "string", + "description": "FusionAuth OAuth2 client secret.", + "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" + }, + "endpoint": { + "type": "string", + "description": "FusionAuth OAuth2 endpoint domain.", + "x-example": "example.fusionauth.io" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "b2222c00-0000-0000-0000-000000862097", + "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", + "endpoint": "example.fusionauth.io" + } + }, + "oAuth2Keycloak": { + "description": "OAuth2Keycloak", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Keycloak OAuth2 client ID.", + "x-example": "appwrite-o0000000st-app" + }, + "clientSecret": { + "type": "string", + "description": "Keycloak OAuth2 client secret.", + "x-example": "jdjrJd00000000000000000000HUsaZO" + }, + "endpoint": { + "type": "string", + "description": "Keycloak OAuth2 endpoint domain.", + "x-example": "keycloak.example.com" + }, + "realmName": { + "type": "string", + "description": "Keycloak OAuth2 realm name.", + "x-example": "appwrite-realm" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint", + "realmName" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-o0000000st-app", + "clientSecret": "jdjrJd00000000000000000000HUsaZO", + "endpoint": "keycloak.example.com", + "realmName": "appwrite-realm" + } + }, + "oAuth2Oidc": { + "description": "OAuth2Oidc", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "OpenID Connect OAuth2 client ID.", + "x-example": "qibI2x0000000000000000000000000006L2YFoG" + }, + "clientSecret": { + "type": "string", + "description": "OpenID Connect OAuth2 client secret.", + "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", + "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/token" + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "wellKnownURL", + "authorizationURL", + "tokenUrl", + "userInfoUrl" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "qibI2x0000000000000000000000000006L2YFoG", + "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", + "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", + "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", + "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "oAuth2Okta": { + "description": "OAuth2Okta", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Okta OAuth2 client ID.", + "x-example": "0oa00000000000000698" + }, + "clientSecret": { + "type": "string", + "description": "Okta OAuth2 client secret.", + "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" + }, + "domain": { + "type": "string", + "description": "Okta OAuth2 domain.", + "x-example": "trial-6400025.okta.com" + }, + "authorizationServerId": { + "type": "string", + "description": "Okta OAuth2 authorization server ID.", + "x-example": "aus000000000000000h7z" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "domain", + "authorizationServerId" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "0oa00000000000000698", + "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "domain": "trial-6400025.okta.com", + "authorizationServerId": "aus000000000000000h7z" + } + }, + "oAuth2Kick": { + "description": "OAuth2Kick", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Kick OAuth2 client ID.", + "x-example": "01KQ7C00000000000001MFHS32" + }, + "clientSecret": { + "type": "string", + "description": "Kick OAuth2 client secret.", + "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "01KQ7C00000000000001MFHS32", + "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "oAuth2Apple": { + "description": "OAuth2Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "apple" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "serviceId": { + "type": "string", + "description": "Apple OAuth2 service ID.", + "x-example": "ip.appwrite.app.web" + }, + "keyId": { + "type": "string", + "description": "Apple OAuth2 key ID.", + "x-example": "P4000000N8" + }, + "teamId": { + "type": "string", + "description": "Apple OAuth2 team ID.", + "x-example": "D4000000R6" + }, + "p8File": { + "type": "string", + "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", + "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "required": [ + "$id", + "enabled", + "serviceId", + "keyId", + "teamId", + "p8File" + ], + "example": { + "$id": "apple", + "enabled": false, + "serviceId": "ip.appwrite.app.web", + "keyId": "P4000000N8", + "teamId": "D4000000R6", + "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "oAuth2Microsoft": { + "description": "OAuth2Microsoft", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "Microsoft OAuth2 application ID.", + "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" + }, + "applicationSecret": { + "type": "string", + "description": "Microsoft OAuth2 application secret.", + "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", + "x-example": "common" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "applicationSecret", + "tenant" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", + "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "tenant": "common" + } + }, + "oAuth2ProviderList": { + "description": "OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers in the given project.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of OAuth2 providers.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "policyPasswordDictionary": { + "description": "Policy Password Dictionary", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password dictionary policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordHistory": { + "description": "Policy Password History", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Password history length. A value of 0 means the policy is disabled.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 5 + } + }, + "policyPasswordPersonalData": { + "description": "Policy Password Personal Data", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password personal data policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionAlert": { + "description": "Policy Session Alert", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session alert policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionDuration": { + "description": "Policy Session Duration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "duration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 3600, + "format": "int32" + } + }, + "required": [ + "$id", + "duration" + ], + "example": { + "$id": "password-dictionary", + "duration": 3600 + } + }, + "policySessionInvalidation": { + "description": "Policy Session Invalidation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session invalidation policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionLimit": { + "description": "Policy Session Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 10 + } + }, + "policyUserLimit": { + "description": "Policy User Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "x-example": 100, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 100 + } + }, + "policyMembershipPrivacy": { + "description": "Policy Membership Privacy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "userId": { + "type": "boolean", + "description": "Whether user ID is visible in memberships.", + "x-example": true + }, + "userEmail": { + "type": "boolean", + "description": "Whether user email is visible in memberships.", + "x-example": true + }, + "userPhone": { + "type": "boolean", + "description": "Whether user phone is visible in memberships.", + "x-example": true + }, + "userName": { + "type": "boolean", + "description": "Whether user name is visible in memberships.", + "x-example": true + }, + "userMFA": { + "type": "boolean", + "description": "Whether user MFA status is visible in memberships.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "userEmail", + "userPhone", + "userName", + "userMFA" + ], + "example": { + "$id": "password-dictionary", + "userId": true, + "userEmail": true, + "userPhone": true, + "userName": true, + "userMFA": true + } + }, + "authProvider": { + "description": "AuthProvider", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Auth Provider.", + "x-example": "github" + }, + "name": { + "type": "string", + "description": "Auth Provider name.", + "x-example": "GitHub" + }, + "appId": { + "type": "string", + "description": "OAuth 2.0 application ID.", + "x-example": "259125845563242502" + }, + "secret": { + "type": "string", + "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Auth Provider is active and can be used to create session.", + "x-example": "" + } + }, + "required": [ + "key", + "name", + "appId", + "secret", + "enabled" + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "", + "enabled": "" + } + }, + "platformWeb": { + "description": "Platform Web", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": "app.example.com" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "hostname", + "key" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" + } + }, + "platformApple": { + "description": "Platform Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "bundleIdentifier" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" + } + }, + "platformAndroid": { + "description": "Platform Android", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "applicationId": { + "type": "string", + "description": "Android application ID.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "applicationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" + } + }, + "platformWindows": { + "description": "Platform Windows", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageIdentifierName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" + } + }, + "platformLinux": { + "description": "Platform Linux", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageName": { + "type": "string", + "description": "Linux package name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" + } + }, + "platformList": { + "description": "Platforms List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of platforms in the given project.", + "x-example": 5, + "format": "int32" + }, + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "platforms" + ], + "example": { + "total": 5, + "platforms": "" + } + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "secret", + "resourceType", + "resourceId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "healthAntivirus": { + "description": "Health Antivirus", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Antivirus version.", + "x-example": "1.0.0" + }, + "status": { + "type": "string", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] + } + }, + "required": [ + "version", + "status" + ], + "example": { + "version": "1.0.0", + "status": "online" + } + }, + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": [ + "size" + ], + "example": { + "size": 8 + } + }, + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "ping": { + "type": "integer", + "description": "Duration in milliseconds how long the health check took.", + "x-example": 128, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" + } + }, + "required": [ + "name", + "ping", + "status" + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } + }, + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } + }, + "healthTime": { + "description": "Health Time", + "type": "object", + "properties": { + "remoteTime": { + "type": "integer", + "description": "Current unix timestamp on trustful remote server.", + "x-example": 1639490751, + "format": "int32" + }, + "localTime": { + "type": "integer", + "description": "Current unix timestamp of local server where Appwrite runs.", + "x-example": 1639490844, + "format": "int32" + }, + "diff": { + "type": "integer", + "description": "Difference of unix remote and local timestamps in milliseconds.", + "x-example": 93, + "format": "int32" + } + }, + "required": [ + "remoteTime", + "localTime", + "diff" + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } + }, + "emailTemplate": { + "description": "EmailTemplate", + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Template type", + "x-example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." + }, + "senderName": { + "type": "string", + "description": "Name of the sender", + "x-example": "My User" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "x-example": "mail@appwrite.io" + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" + }, + "replyToName": { + "type": "string", + "description": "Reply to name", + "x-example": "Support Team" + }, + "subject": { + "type": "string", + "description": "Email subject", + "x-example": "Please verify your email address" + } + }, + "required": [ + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" + ], + "example": { + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + }, + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "processing", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "processing" + } + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "$ref": "#\/components\/schemas\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + } + }, + "securitySchemes": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_PROJECT_ID>" + } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header" + }, + "ForwardedUserAgent": { + "type": "apiKey", + "name": "X-Forwarded-User-Agent", + "description": "The user agent string of the client that made the request", + "in": "header" + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json new file mode 100644 index 0000000000..65e4f12ddf --- /dev/null +++ b/app/config/specs/swagger2-latest-client.json @@ -0,0 +1,17510 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.9.3", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "host": "cloud.appwrite.io", + "x-host-docs": "<REGION>.cloud.appwrite.io", + "basePath": "\/v1", + "schemes": [ + "https" + ], + "consumes": [ + "application\/json", + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "securityDefinitions": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_PROJECT_ID>" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header" + }, + "DevKey": { + "type": "apiKey", + "name": "X-Appwrite-Dev-Key", + "description": "Your secret dev API key", + "in": "header" + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + } + }, + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "account", + "weight": 9, + "cookies": false, + "type": "", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "account", + "weight": 8, + "cookies": false, + "type": "", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "account", + "weight": 34, + "cookies": false, + "type": "", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "tokens", + "weight": 29, + "cookies": false, + "type": "", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" + } + } + } + } + ] + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 31, + "cookies": false, + "type": "", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "weight": 166, + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "schema": { + "$ref": "#\/definitions\/mfaType" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaAuthenticator", + "group": "mfa", + "weight": 168, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaAuthenticator", + "group": "mfa", + "weight": 169, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 170, + "cookies": false, + "type": "", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "schema": { + "$ref": "#\/definitions\/mfaChallenge" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaChallenge", + "group": "mfa", + "weight": 174, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + ] + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaChallenge", + "group": "mfa", + "weight": 175, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "default": null, + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + ] + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 167, + "cookies": false, + "type": "", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 173, + "cookies": false, + "type": "", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 171, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 172, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "account", + "weight": 32, + "cookies": false, + "type": "", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "account", + "weight": 33, + "cookies": false, + "type": "", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "account", + "weight": 35, + "cookies": false, + "type": "", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + ] + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "account", + "weight": 30, + "cookies": false, + "type": "", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "account", + "weight": 36, + "cookies": false, + "type": "", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + ] + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecovery", + "group": "recovery", + "weight": 39, + "cookies": false, + "type": "", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "default": null, + "x-example": "<SECRET>" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 11, + "cookies": false, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 12, + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "weight": 17, + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailPasswordSession", + "group": "sessions", + "weight": 16, + "cookies": false, + "type": "", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMagicURLSession", + "group": "sessions", + "weight": 26, + "cookies": false, + "type": "", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", + "consumes": [], + "produces": [ + "text\/html" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "301": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Session", + "group": "sessions", + "weight": 19, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "weight": 27, + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 18, + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "weight": 13, + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "weight": 15, + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 14, + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "account", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/targets\/push": { + "post": { + "summary": "Create push target", + "operationId": "accountCreatePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPushTarget", + "group": "pushTargets", + "weight": 44, + "cookies": false, + "type": "", + "demo": "account\/create-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TARGET_ID>" + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + } + }, + "required": [ + "targetId", + "identifier" + ] + } + } + ] + } + }, + "\/account\/targets\/{targetId}\/push": { + "put": { + "summary": "Update push target", + "operationId": "accountUpdatePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePushTarget", + "group": "pushTargets", + "weight": 45, + "cookies": false, + "type": "", + "demo": "account\/update-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + } + }, + "required": [ + "identifier" + ] + } + } + ] + }, + "delete": { + "summary": "Delete push target", + "operationId": "accountDeletePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePushTarget", + "group": "pushTargets", + "weight": 46, + "cookies": false, + "type": "", + "demo": "account\/delete-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailToken", + "group": "tokens", + "weight": 25, + "cookies": false, + "type": "", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMagicURLToken", + "group": "tokens", + "weight": 24, + "cookies": false, + "type": "", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "consumes": [], + "produces": [ + "text\/html" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Token", + "group": "tokens", + "weight": 23, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneToken", + "group": "tokens", + "weight": 28, + "cookies": false, + "type": "", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + ] + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailVerification", + "group": "verification", + "weight": 40, + "cookies": false, + "type": "", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + ] + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "verification", + "weight": 41, + "cookies": false, + "type": "", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneVerification", + "group": "verification", + "weight": 42, + "cookies": false, + "type": "", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "verification", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "weight": 177, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "weight": 176, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "weight": 180, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "weight": 178, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "weight": 179, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "weight": 182, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "", + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "weight": 181, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "<TEXT>", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "weight": 183, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "type": "object", + "default": [], + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": "2", + "default": 1, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "light", + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "", + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "type": "boolean", + "x-example": "true", + "default": false, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "en-US", + "default": "", + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "america\/new_york", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "", + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "100", + "default": 0, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "type": "boolean", + "x-example": "true", + "default": false, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [], + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "", + "in": "query" + } + ] + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 259, + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 255, + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 256, + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 257, + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 258, + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 260, + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 210, + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 202, + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 203, + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 206, + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 204, + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 208, + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 213, + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 212, + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 366, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 362, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 363, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 364, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 365, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 367, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 359, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 351, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 352, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 355, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 353, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 357, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 361, + "cookies": false, + "type": "", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 360, + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "weight": 438, + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "consumes": [ + "application\/json" + ], + "produces": [ + "multipart\/form-data" + ], + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "weight": 436, + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": "<SCHEDULED_AT>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getExecution", + "group": "executions", + "weight": 437, + "cookies": false, + "type": "", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "<EXECUTION_ID>", + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "weight": 117, + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "mutation", + "group": "graphql", + "weight": 116, + "cookies": false, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "schema": { + "$ref": "#\/definitions\/locale" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 49, + "cookies": false, + "type": "", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "schema": { + "$ref": "#\/definitions\/localeCodeList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "weight": 50, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "schema": { + "$ref": "#\/definitions\/continentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listContinents", + "group": null, + "weight": 54, + "cookies": false, + "type": "", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { + "$ref": "#\/definitions\/countryList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "weight": 51, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { + "$ref": "#\/definitions\/countryList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesEU", + "group": null, + "weight": 52, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "schema": { + "$ref": "#\/definitions\/phoneList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "weight": 53, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "schema": { + "$ref": "#\/definitions\/currencyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCurrencies", + "group": null, + "weight": 55, + "cookies": false, + "type": "", + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "schema": { + "$ref": "#\/definitions\/languageList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLanguages", + "group": null, + "weight": 56, + "cookies": false, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "weight": 150, + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "default": null, + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "default": null, + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "weight": 154, + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesListPresences", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "List presence logs.", + "responses": { + "200": { + "description": "Presences List", + "schema": { + "$ref": "#\/definitions\/presenceList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPresences", + "group": "presences", + "weight": 416, + "cookies": false, + "type": "", + "demo": "presences\/list-presences.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGetPresence", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPresence", + "group": "presences", + "weight": 415, + "cookies": false, + "type": "", + "demo": "presences\/get-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsertPresence", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertPresence", + "group": "presences", + "weight": 413, + "cookies": false, + "type": "", + "demo": "presences\/upsert-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertPresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/presence" + } + ], + "description": "", + "demo": "presences\/upsert-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "default": null, + "x-example": "<STATUS>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": [], + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + ] + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdatePresence", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePresence", + "group": "presences", + "weight": 417, + "cookies": false, + "type": "", + "demo": "presences\/update-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updatePresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "status", + "expiresAt", + "metadata", + "permissions" + ], + "required": [ + "presenceId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/presence" + } + ], + "description": "", + "demo": "presences\/update-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "default": null, + "x-example": "<STATUS>", + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDeletePresence", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePresence", + "group": "presences", + "weight": 418, + "cookies": false, + "type": "", + "demo": "presences\/delete-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "schema": { + "$ref": "#\/definitions\/fileList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "weight": 550, + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "weight": 548, + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "x-upload-id": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "formData" + }, + { + "name": "file", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "permissions", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "x-example": "[\"read(\"any\")\"]", + "in": "formData" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFile", + "group": "files", + "weight": 549, + "cookies": false, + "type": "", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFile", + "group": "files", + "weight": 551, + "cookies": false, + "type": "", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "weight": 552, + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileDownload", + "group": "files", + "weight": 554, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFilePreview", + "group": "files", + "weight": 553, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "default": "center", + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "", + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileView", + "group": "files", + "weight": 555, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 332, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 328, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 329, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 330, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 331, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 333, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 324, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 316, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<ROW_ID>" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 317, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 320, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 318, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 322, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 327, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 326, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "schema": { + "$ref": "#\/definitions\/teamList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "teams", + "weight": 526, + "cookies": false, + "type": "", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "weight": 524, + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TEAM_ID>" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "default": [ + "owner" + ], + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + ] + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "weight": 525, + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "weight": 528, + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "weight": 527, + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 533, + "cookies": false, + "type": "", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMembership", + "group": "memberships", + "weight": 531, + "cookies": false, + "type": "", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "default": "", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMembership", + "group": "memberships", + "weight": 532, + "cookies": false, + "type": "", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "weight": 534, + "cookies": false, + "type": "", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + ] + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "weight": 535, + "cookies": false, + "type": "", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipStatus", + "group": "memberships", + "weight": 536, + "cookies": false, + "type": "", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "teams", + "weight": 529, + "cookies": false, + "type": "", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "teams", + "weight": 530, + "cookies": false, + "type": "", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 399, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 395, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 396, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 397, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 398, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 400, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 389, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 385, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 388, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 387, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 386, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 390, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + } + ], + "definitions": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/document" + }, + "x-example": "" + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "type": "object", + "$ref": "#\/definitions\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/session" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "type": "object", + "$ref": "#\/definitions\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "type": "object", + "$ref": "#\/definitions\/log" + }, + "x-example": "" + } + }, + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "type": "object", + "$ref": "#\/definitions\/file" + }, + "x-example": "" + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "type": "object", + "$ref": "#\/definitions\/team" + }, + "x-example": "" + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "type": "object", + "$ref": "#\/definitions\/membership" + }, + "x-example": "" + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/execution" + }, + "x-example": "" + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "type": "object", + "$ref": "#\/definitions\/country" + }, + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/continent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/language" + }, + "x-example": "" + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "type": "object", + "$ref": "#\/definitions\/currency" + }, + "x-example": "" + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "type": "object", + "$ref": "#\/definitions\/phone" + }, + "x-example": "" + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Presence sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "userInternalId": { + "type": "string", + "description": "User internal ID.", + "x-example": "1" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "x-nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "additionalProperties": true, + "x-additional-properties-key": "metadata", + "required": [ + "$id", + "$sequence", + "$createdAt", + "$updatedAt", + "$permissions", + "userInternalId", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userInternalId": "1", + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "x-nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "x-nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/algoArgon2" + }, + { + "$ref": "#\/definitions\/algoScrypt" + }, + { + "$ref": "#\/definitions\/algoScryptModified" + }, + { + "$ref": "#\/definitions\/algoBcrypt" + }, + { + "$ref": "#\/definitions\/algoPhpass" + }, + { + "$ref": "#\/definitions\/algoSha" + }, + { + "$ref": "#\/definitions\/algoMd5" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/definitions\/algoArgon2", + "scrypt": "#\/definitions\/algoScrypt", + "scryptMod": "#\/definitions\/algoScryptModified", + "bcrypt": "#\/definitions\/algoBcrypt", + "phpass": "#\/definitions\/algoPhpass", + "sha": "#\/definitions\/algoSha", + "md5": "#\/definitions\/algoMd5" + } + } + }, + "x-nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "x-nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "x-nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json new file mode 100644 index 0000000000..b067339b66 --- /dev/null +++ b/app/config/specs/swagger2-latest-console.json @@ -0,0 +1,80584 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.9.3", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "host": "cloud.appwrite.io", + "x-host-docs": "<REGION>.cloud.appwrite.io", + "basePath": "\/v1", + "schemes": [ + "https" + ], + "consumes": [ + "application\/json", + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "securityDefinitions": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_PROJECT_ID>" + } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Mode": { + "type": "apiKey", + "name": "X-Appwrite-Mode", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "" + } + }, + "Cookie": { + "type": "apiKey", + "name": "Cookie", + "description": "The user cookie to authenticate with", + "in": "header" + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + } + }, + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "account", + "weight": 9, + "cookies": false, + "type": "", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "account", + "weight": 8, + "cookies": false, + "type": "", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + }, + "delete": { + "summary": "Delete account", + "operationId": "accountDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete the currently logged in user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "account", + "weight": 10, + "cookies": false, + "type": "", + "demo": "account\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "account", + "weight": 34, + "cookies": false, + "type": "", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "tokens", + "weight": 29, + "cookies": false, + "type": "", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" + } + } + } + } + ] + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 31, + "cookies": false, + "type": "", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "weight": 166, + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "schema": { + "$ref": "#\/definitions\/mfaType" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaAuthenticator", + "group": "mfa", + "weight": 168, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaAuthenticator", + "group": "mfa", + "weight": 169, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 170, + "cookies": false, + "type": "", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "schema": { + "$ref": "#\/definitions\/mfaChallenge" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaChallenge", + "group": "mfa", + "weight": 174, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + ] + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaChallenge", + "group": "mfa", + "weight": 175, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "default": null, + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + ] + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 167, + "cookies": false, + "type": "", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 173, + "cookies": false, + "type": "", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 171, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 172, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "account", + "weight": 32, + "cookies": false, + "type": "", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "account", + "weight": 33, + "cookies": false, + "type": "", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "account", + "weight": 35, + "cookies": false, + "type": "", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + ] + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "account", + "weight": 30, + "cookies": false, + "type": "", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "account", + "weight": 36, + "cookies": false, + "type": "", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + ] + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecovery", + "group": "recovery", + "weight": 39, + "cookies": false, + "type": "", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "default": null, + "x-example": "<SECRET>" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 11, + "cookies": false, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 12, + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "weight": 17, + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailPasswordSession", + "group": "sessions", + "weight": 16, + "cookies": false, + "type": "", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMagicURLSession", + "group": "sessions", + "weight": 26, + "cookies": false, + "type": "", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", + "consumes": [], + "produces": [ + "text\/html" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "301": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Session", + "group": "sessions", + "weight": 19, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "weight": 27, + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 18, + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "weight": 13, + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "weight": 15, + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 14, + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "account", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + } + }, + "\/account\/targets\/push": { + "post": { + "summary": "Create push target", + "operationId": "accountCreatePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPushTarget", + "group": "pushTargets", + "weight": 44, + "cookies": false, + "type": "", + "demo": "account\/create-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TARGET_ID>" + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + } + }, + "required": [ + "targetId", + "identifier" + ] + } + } + ] + } + }, + "\/account\/targets\/{targetId}\/push": { + "put": { + "summary": "Update push target", + "operationId": "accountUpdatePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePushTarget", + "group": "pushTargets", + "weight": 45, + "cookies": false, + "type": "", + "demo": "account\/update-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + } + }, + "required": [ + "identifier" + ] + } + } + ] + }, + "delete": { + "summary": "Delete push target", + "operationId": "accountDeletePushTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePushTarget", + "group": "pushTargets", + "weight": 46, + "cookies": false, + "type": "", + "demo": "account\/delete-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailToken", + "group": "tokens", + "weight": 25, + "cookies": false, + "type": "", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMagicURLToken", + "group": "tokens", + "weight": 24, + "cookies": false, + "type": "", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "consumes": [], + "produces": [ + "text\/html" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Token", + "group": "tokens", + "weight": 23, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneToken", + "group": "tokens", + "weight": 28, + "cookies": false, + "type": "", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + ] + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailVerification", + "group": "verification", + "weight": 40, + "cookies": false, + "type": "", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + ] + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "verification", + "weight": 41, + "cookies": false, + "type": "", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneVerification", + "group": "verification", + "weight": 42, + "cookies": false, + "type": "", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "verification", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "weight": 177, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "weight": 176, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "weight": 180, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "weight": 178, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "weight": 179, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "weight": 182, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "", + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "weight": 181, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "<TEXT>", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "weight": 183, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "type": "object", + "default": [], + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": "2", + "default": 1, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "light", + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "", + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "type": "boolean", + "x-example": "true", + "default": false, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "en-US", + "default": "", + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "america\/new_york", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "", + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "100", + "default": 0, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "type": "boolean", + "x-example": "true", + "default": false, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [], + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "", + "in": "query" + } + ] + } + }, + "\/console\/assistant": { + "post": { + "summary": "Create assistant query", + "operationId": "assistantChat", + "consumes": [ + "application\/json" + ], + "produces": [ + "text\/plain" + ], + "tags": [ + "assistant" + ], + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "chat", + "group": "console", + "weight": 506, + "cookies": false, + "type": "", + "demo": "assistant\/chat.md", + "rate-limit": 15, + "rate-time": 3600, + "rate-key": "userId:{userId}", + "scope": "assistant.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "Prompt. A string containing questions asked to the AI assistant.", + "default": null, + "x-example": "<PROMPT>" + } + }, + "required": [ + "prompt" + ] + } + } + ] + } + }, + "\/console\/oauth2-providers": { + "get": { + "summary": "List OAuth2 providers", + "operationId": "consoleListOAuth2Providers", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "console" + ], + "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", + "responses": { + "200": { + "description": "Console OAuth2 Providers List", + "schema": { + "$ref": "#\/definitions\/consoleOAuth2ProviderList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Providers", + "group": "console", + "weight": 504, + "cookies": false, + "type": "", + "demo": "console\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/resources": { + "get": { + "summary": "Check resource ID availability", + "operationId": "consoleGetResource", + "consumes": [], + "produces": [], + "tags": [ + "console" + ], + "description": "Check if a resource ID is available.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getResource", + "group": null, + "weight": 507, + "cookies": false, + "type": "", + "demo": "console\/get-resource.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "value", + "description": "Resource value.", + "required": true, + "type": "string", + "x-example": "<VALUE>", + "in": "query" + }, + { + "name": "type", + "description": "Resource type.", + "required": true, + "type": "string", + "x-example": "rules", + "enum": [ + "rules" + ], + "x-enum-name": "ConsoleResourceType", + "x-enum-keys": [], + "in": "query" + } + ] + } + }, + "\/console\/scopes\/project": { + "get": { + "summary": "List project scopes", + "operationId": "consoleListProjectScopes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "console" + ], + "description": "List all scopes available for project API keys, along with a description for each scope.", + "responses": { + "200": { + "description": "Console Key Scopes List", + "schema": { + "$ref": "#\/definitions\/consoleKeyScopeList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProjectScopes", + "group": "console", + "weight": 505, + "cookies": false, + "type": "", + "demo": "console\/list-project-scopes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/variables": { + "get": { + "summary": "Get variables", + "operationId": "consoleVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "console" + ], + "description": "Get all Environment Variables that are relevant for the console.", + "responses": { + "200": { + "description": "Console Variables", + "schema": { + "$ref": "#\/definitions\/consoleVariables" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "variables", + "group": "console", + "weight": 503, + "cookies": false, + "type": "", + "demo": "console\/variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "list", + "group": "databases", + "weight": 191, + "cookies": false, + "type": "", + "demo": "databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "queries", + "search", + "total" + ], + "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.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "create", + "group": "databases", + "weight": 187, + "cookies": false, + "type": "", + "demo": "databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 259, + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 255, + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 256, + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 257, + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 258, + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 260, + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/databases\/usage": { + "get": { + "summary": "Get databases usage stats", + "operationId": "databasesListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 194, + "cookies": false, + "type": "", + "demo": "databases\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listUsage" + }, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/list-usage.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listUsage" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "get", + "group": "databases", + "weight": 188, + "cookies": false, + "type": "", + "demo": "databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "update", + "group": "databases", + "weight": 189, + "cookies": false, + "type": "", + "demo": "databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "delete", + "group": "databases", + "weight": 190, + "cookies": false, + "type": "", + "demo": "databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "schema": { + "$ref": "#\/definitions\/collectionList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 199, + "cookies": false, + "type": "", + "demo": "databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collections", + "operationId": "databasesCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 195, + "cookies": false, + "type": "", + "demo": "databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 196, + "cookies": false, + "type": "", + "demo": "databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 197, + "cookies": false, + "type": "", + "demo": "databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 198, + "cookies": false, + "type": "", + "demo": "databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "schema": { + "$ref": "#\/definitions\/attributeList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listAttributes", + "group": "attributes", + "weight": 216, + "cookies": false, + "type": "", + "demo": "databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createBooleanAttribute", + "group": "attributes", + "weight": 217, + "cookies": false, + "type": "", + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateBooleanAttribute", + "group": "attributes", + "weight": 218, + "cookies": false, + "type": "", + "demo": "databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDatetimeAttribute", + "group": "attributes", + "weight": 219, + "cookies": false, + "type": "", + "demo": "databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update datetime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "group": "attributes", + "weight": 220, + "cookies": false, + "type": "", + "demo": "databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEmailAttribute", + "group": "attributes", + "weight": 221, + "cookies": false, + "type": "", + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEmailAttribute", + "group": "attributes", + "weight": 222, + "cookies": false, + "type": "", + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEnumAttribute", + "group": "attributes", + "weight": 223, + "cookies": false, + "type": "", + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEnumAttribute", + "group": "attributes", + "weight": 224, + "cookies": false, + "type": "", + "demo": "databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFloatAttribute", + "group": "attributes", + "weight": 225, + "cookies": false, + "type": "", + "demo": "databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFloatAttribute", + "group": "attributes", + "weight": 226, + "cookies": false, + "type": "", + "demo": "databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateFloatColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIntegerAttribute", + "group": "attributes", + "weight": 227, + "cookies": false, + "type": "", + "demo": "databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIntegerColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIntegerAttribute", + "group": "attributes", + "weight": 228, + "cookies": false, + "type": "", + "demo": "databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIntegerColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIpAttribute", + "group": "attributes", + "weight": 229, + "cookies": false, + "type": "", + "demo": "databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIpColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIpAttribute", + "group": "attributes", + "weight": 230, + "cookies": false, + "type": "", + "demo": "databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIpColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a geometric line attribute.", + "responses": { + "202": { + "description": "AttributeLine", + "schema": { + "$ref": "#\/definitions\/attributeLine" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createLineAttribute", + "group": "attributes", + "weight": 231, + "cookies": false, + "type": "", + "demo": "databases\/create-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLineColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeLine", + "schema": { + "$ref": "#\/definitions\/attributeLine" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateLineAttribute", + "group": "attributes", + "weight": 232, + "cookies": false, + "type": "", + "demo": "databases\/update-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLineColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a longtext attribute.\n", + "responses": { + "202": { + "description": "AttributeLongtext", + "schema": { + "$ref": "#\/definitions\/attributeLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextAttribute", + "group": "attributes", + "weight": 249, + "cookies": false, + "type": "", + "demo": "databases\/create-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeLongtext", + "schema": { + "$ref": "#\/definitions\/attributeLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextAttribute", + "group": "attributes", + "weight": 250, + "cookies": false, + "type": "", + "demo": "databases\/update-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a mediumtext attribute.\n", + "responses": { + "202": { + "description": "AttributeMediumtext", + "schema": { + "$ref": "#\/definitions\/attributeMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextAttribute", + "group": "attributes", + "weight": 247, + "cookies": false, + "type": "", + "demo": "databases\/create-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeMediumtext", + "schema": { + "$ref": "#\/definitions\/attributeMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextAttribute", + "group": "attributes", + "weight": 248, + "cookies": false, + "type": "", + "demo": "databases\/update-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a geometric point attribute.", + "responses": { + "202": { + "description": "AttributePoint", + "schema": { + "$ref": "#\/definitions\/attributePoint" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPointAttribute", + "group": "attributes", + "weight": 233, + "cookies": false, + "type": "", + "demo": "databases\/create-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPointColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePoint", + "schema": { + "$ref": "#\/definitions\/attributePoint" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePointAttribute", + "group": "attributes", + "weight": 234, + "cookies": false, + "type": "", + "demo": "databases\/update-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePointColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a geometric polygon attribute.", + "responses": { + "202": { + "description": "AttributePolygon", + "schema": { + "$ref": "#\/definitions\/attributePolygon" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPolygonAttribute", + "group": "attributes", + "weight": 235, + "cookies": false, + "type": "", + "demo": "databases\/create-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPolygonColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePolygon", + "schema": { + "$ref": "#\/definitions\/attributePolygon" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePolygonAttribute", + "group": "attributes", + "weight": 236, + "cookies": false, + "type": "", + "demo": "databases\/update-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePolygonColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createRelationshipAttribute", + "group": "attributes", + "weight": 237, + "cookies": false, + "type": "", + "demo": "databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRelationshipColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID.", + "default": null, + "x-example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "group": "attributes", + "weight": 238, + "cookies": false, + "type": "", + "demo": "databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRelationshipColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringAttribute", + "group": "attributes", + "weight": 239, + "cookies": false, + "type": "", + "demo": "databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createStringColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringAttribute", + "group": "attributes", + "weight": 240, + "cookies": false, + "type": "", + "demo": "databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateStringColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { + "post": { + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a text attribute.\n", + "responses": { + "202": { + "description": "AttributeText", + "schema": { + "$ref": "#\/definitions\/attributeText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextAttribute", + "group": "attributes", + "weight": 245, + "cookies": false, + "type": "", + "demo": "databases\/create-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { + "patch": { + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeText", + "schema": { + "$ref": "#\/definitions\/attributeText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextAttribute", + "group": "attributes", + "weight": 246, + "cookies": false, + "type": "", + "demo": "databases\/update-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createUrlAttribute", + "group": "attributes", + "weight": 241, + "cookies": false, + "type": "", + "demo": "databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createUrlColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateUrlAttribute", + "group": "attributes", + "weight": 242, + "cookies": false, + "type": "", + "demo": "databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateUrlColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "post": { + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a varchar attribute.\n", + "responses": { + "202": { + "description": "AttributeVarchar", + "schema": { + "$ref": "#\/definitions\/attributeVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharAttribute", + "group": "attributes", + "weight": 243, + "cookies": false, + "type": "", + "demo": "databases\/create-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { + "patch": { + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeVarchar", + "schema": { + "$ref": "#\/definitions\/attributeVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharAttribute", + "group": "attributes", + "weight": 244, + "cookies": false, + "type": "", + "demo": "databases\/update-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar attribute.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/attributeBoolean" + }, + { + "$ref": "#\/definitions\/attributeInteger" + }, + { + "$ref": "#\/definitions\/attributeFloat" + }, + { + "$ref": "#\/definitions\/attributeEmail" + }, + { + "$ref": "#\/definitions\/attributeEnum" + }, + { + "$ref": "#\/definitions\/attributeUrl" + }, + { + "$ref": "#\/definitions\/attributeIp" + }, + { + "$ref": "#\/definitions\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/attributeBoolean", + "integer": "#\/definitions\/attributeInteger", + "double": "#\/definitions\/attributeFloat", + "string": "#\/definitions\/attributeString", + "datetime": "#\/definitions\/attributeDatetime", + "relationship": "#\/definitions\/attributeRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/attributeBoolean": { + "type": "boolean" + }, + "#\/definitions\/attributeInteger": { + "type": "integer" + }, + "#\/definitions\/attributeFloat": { + "type": "double" + }, + "#\/definitions\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/attributeDatetime": { + "type": "datetime" + }, + "#\/definitions\/attributeRelationship": { + "type": "relationship" + }, + "#\/definitions\/attributeString": { + "type": "string" + } + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getAttribute", + "group": "attributes", + "weight": 214, + "cookies": false, + "type": "", + "demo": "databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteAttribute", + "group": "attributes", + "weight": 215, + "cookies": false, + "type": "", + "demo": "databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 210, + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 202, + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 207, + "cookies": false, + "type": "", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "documents" + ] + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 205, + "cookies": false, + "type": "", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 209, + "cookies": false, + "type": "", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 203, + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 206, + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 204, + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 208, + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs": { + "get": { + "summary": "List document logs", + "operationId": "databasesListDocumentLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the document activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocumentLogs", + "group": "logs", + "weight": 211, + "cookies": false, + "type": "", + "demo": "databases\/list-document-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRowLogs" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "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}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 213, + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 212, + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 254, + "cookies": false, + "type": "", + "demo": "databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listIndexes" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 251, + "cookies": false, + "type": "", + "demo": "databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIndex" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "DatabasesIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get an index by its unique ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 252, + "cookies": false, + "type": "", + "demo": "databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getIndex" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 253, + "cookies": false, + "type": "", + "demo": "databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteIndex" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/logs": { + "get": { + "summary": "List collection logs", + "operationId": "databasesListCollectionLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the collection activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listCollectionLogs", + "group": "collections", + "weight": 200, + "cookies": false, + "type": "", + "demo": "databases\/list-collection-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTableLogs" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "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}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "databasesGetCollectionUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "schema": { + "$ref": "#\/definitions\/usageCollection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollectionUsage", + "group": null, + "weight": 201, + "cookies": false, + "type": "", + "demo": "databases\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTableUsage" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/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": 192, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listDatabaseLogs" + }, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listDatabaseLogs" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "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", + "operationId": "databasesGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 193, + "cookies": false, + "type": "", + "demo": "databases\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getUsage" + }, + "methods": [ + { + "name": "getUsage", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/get-usage.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getUsage" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "documentsdb", + "weight": 338, + "cookies": false, + "type": "", + "demo": "documentsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "documentsDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "documentsdb", + "weight": 334, + "cookies": false, + "type": "", + "demo": "documentsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 366, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 362, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 363, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 364, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 365, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/usage": { + "get": { + "summary": "Get DocumentsDB usage stats", + "operationId": "documentsDBListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 340, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-usage.md", + "methods": [ + { + "name": "listUsage", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "documentsdb\/list-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "documentsdb", + "weight": 335, + "cookies": false, + "type": "", + "demo": "documentsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "documentsdb", + "weight": 336, + "cookies": false, + "type": "", + "demo": "documentsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "documentsdb", + "weight": 337, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "schema": { + "$ref": "#\/definitions\/collectionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 345, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "documentsDBCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 341, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "documentsDBGetCollection", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 342, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 343, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 344, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 359, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 351, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "put": { + "summary": "Upsert documents", + "operationId": "documentsDBUpsertDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 356, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "documentsDBUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 354, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "documentsDBDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 358, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 352, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 355, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 353, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 357, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 361, + "cookies": false, + "type": "", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 360, + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "documentsDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 350, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "documentsDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 347, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "DocumentsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "documentsDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 348, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "documentsDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 349, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "documentsDBGetCollectionUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "schema": { + "$ref": "#\/definitions\/usageCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollectionUsage", + "group": null, + "weight": 346, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/usage": { + "get": { + "summary": "Get DocumentsDB usage stats", + "operationId": "documentsDBGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDocumentsDB", + "schema": { + "$ref": "#\/definitions\/usageDocumentsDB" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 339, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-database-usage.md", + "methods": [ + { + "name": "getUsage", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDocumentsDB" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "documentsdb\/get-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/functions": { + "get": { + "summary": "List functions", + "operationId": "functionsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "schema": { + "$ref": "#\/definitions\/functionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "functions", + "weight": 422, + "cookies": false, + "type": "", + "demo": "functions\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create function", + "operationId": "functionsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "functions", + "weight": 419, + "cookies": false, + "type": "", + "demo": "functions\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<FUNCTION_ID>" + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": null, + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Function maximum execution time in seconds.", + "default": 15, + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "functionId", + "name", + "runtime" + ] + } + } + ] + } + }, + "\/functions\/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "schema": { + "$ref": "#\/definitions\/runtimeList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRuntimes", + "group": "runtimes", + "weight": 424, + "cookies": false, + "type": "", + "demo": "functions\/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "schema": { + "$ref": "#\/definitions\/specificationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "runtimes", + "weight": 425, + "cookies": false, + "type": "", + "demo": "functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/templates": { + "get": { + "summary": "List templates", + "operationId": "functionsListTemplates", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Function Templates List", + "schema": { + "$ref": "#\/definitions\/templateFunctionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTemplates", + "group": "templates", + "weight": 448, + "cookies": false, + "type": "", + "demo": "functions\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "runtimes", + "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [], + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "starter", + "databases", + "ai", + "messaging", + "utilities", + "dev-tools", + "auth" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [], + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/functions\/templates\/{templateId}": { + "get": { + "summary": "Get function template", + "operationId": "functionsGetTemplate", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Template Function", + "schema": { + "$ref": "#\/definitions\/templateFunction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTemplate", + "group": "templates", + "weight": 447, + "cookies": false, + "type": "", + "demo": "functions\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "type": "string", + "x-example": "<TEMPLATE_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/usage": { + "get": { + "summary": "Get functions usage", + "operationId": "functionsListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageFunctions", + "schema": { + "$ref": "#\/definitions\/usageFunctions" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 441, + "cookies": false, + "type": "", + "demo": "functions\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}": { + "get": { + "summary": "Get function", + "operationId": "functionsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "functions", + "weight": 420, + "cookies": false, + "type": "", + "demo": "functions\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "functions", + "weight": 421, + "cookies": false, + "type": "", + "demo": "functions\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": "", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Maximum execution time in seconds.", + "default": 15, + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "default": null, + "x-example": "<PROVIDER_REPOSITORY_ID>", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a function by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "functions", + "weight": 423, + "cookies": false, + "type": "", + "demo": "functions\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "responses": { + "200": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFunctionDeployment", + "group": "functions", + "weight": 428, + "cookies": false, + "type": "", + "demo": "functions\/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "functionsListDeployments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { + "$ref": "#\/definitions\/deploymentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 429, + "cookies": false, + "type": "", + "demo": "functions\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "functionsCreateDeployment", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 426, + "cookies": false, + "type": "upload", + "demo": "functions\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "entrypoint", + "description": "Entrypoint File.", + "required": false, + "type": "string", + "x-example": "<ENTRYPOINT>", + "in": "formData" + }, + { + "name": "commands", + "description": "Build Commands.", + "required": false, + "type": "string", + "x-example": "<COMMANDS>", + "in": "formData" + }, + { + "name": "code", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "activate", + "description": "Automatically activate the deployment when it is finished building.", + "required": true, + "type": "boolean", + "x-example": false, + "in": "formData" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 434, + "cookies": false, + "type": "", + "demo": "functions\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + }, + "buildId": { + "type": "string", + "description": "Build unique ID.", + "default": "", + "x-example": "<BUILD_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 431, + "cookies": false, + "type": "", + "demo": "functions\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "default": null, + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "default": null, + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "default": null, + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "default": null, + "x-example": "commit", + "enum": [ + "commit", + "branch", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 432, + "cookies": false, + "type": "", + "demo": "functions\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "default": null, + "x-example": "branch", + "enum": [ + "branch", + "commit" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "functionsGetDeployment", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 427, + "cookies": false, + "type": "", + "demo": "functions\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a code deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 430, + "cookies": false, + "type": "", + "demo": "functions\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "functions" + ], + "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 433, + "cookies": false, + "type": "location", + "demo": "functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source", + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 435, + "cookies": false, + "type": "", + "demo": "functions\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "weight": 438, + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "consumes": [ + "application\/json" + ], + "produces": [ + "multipart\/form-data" + ], + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "weight": 436, + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": "<SCHEDULED_AT>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getExecution", + "group": "executions", + "weight": 437, + "cookies": false, + "type": "", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "<EXECUTION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteExecution", + "group": "executions", + "weight": 439, + "cookies": false, + "type": "", + "demo": "functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "<EXECUTION_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/usage": { + "get": { + "summary": "Get function usage", + "operationId": "functionsGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageFunction", + "schema": { + "$ref": "#\/definitions\/usageFunction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 440, + "cookies": false, + "type": "", + "demo": "functions\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 444, + "cookies": false, + "type": "", + "demo": "functions\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 442, + "cookies": false, + "type": "", + "demo": "functions\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 443, + "cookies": false, + "type": "", + "demo": "functions\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 445, + "cookies": false, + "type": "", + "demo": "functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 446, + "cookies": false, + "type": "", + "demo": "functions\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "weight": 117, + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "mutation", + "group": "graphql", + "weight": 116, + "cookies": false, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/health": { + "get": { + "summary": "Get HTTP", + "operationId": "healthGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite HTTP server is up and responsive.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "health", + "weight": 449, + "cookies": false, + "type": "", + "demo": "health\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/anti-virus": { + "get": { + "summary": "Get antivirus", + "operationId": "healthGetAntivirus", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Antivirus", + "schema": { + "$ref": "#\/definitions\/healthAntivirus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAntivirus", + "group": "health", + "weight": 458, + "cookies": false, + "type": "", + "demo": "health\/get-antivirus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/cache": { + "get": { + "summary": "Get cache", + "operationId": "healthGetCache", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCache", + "group": "health", + "weight": 452, + "cookies": false, + "type": "", + "demo": "health\/get-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "schema": { + "$ref": "#\/definitions\/healthCertificate" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCertificate", + "group": "health", + "weight": 455, + "cookies": false, + "type": "", + "demo": "health\/get-certificate.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "type": "string", + "in": "query" + } + ] + } + }, + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDB", + "group": "health", + "weight": 451, + "cookies": false, + "type": "", + "demo": "health\/get-db.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPubSub", + "group": "health", + "weight": 453, + "cookies": false, + "type": "", + "demo": "health\/get-pub-sub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/queue\/audits": { + "get": { + "summary": "Get audits queue", + "operationId": "healthGetQueueAudits", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueAudits", + "group": "queue", + "weight": 459, + "cookies": false, + "type": "", + "demo": "health\/get-queue-audits.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueBuilds", + "group": "queue", + "weight": 463, + "cookies": false, + "type": "", + "demo": "health\/get-queue-builds.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/certificates": { + "get": { + "summary": "Get certificates queue", + "operationId": "healthGetQueueCertificates", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueCertificates", + "group": "queue", + "weight": 462, + "cookies": false, + "type": "", + "demo": "health\/get-queue-certificates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDatabases", + "group": "queue", + "weight": 464, + "cookies": false, + "type": "", + "demo": "health\/get-queue-databases.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "database_db_main", + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDeletes", + "group": "queue", + "weight": 465, + "cookies": false, + "type": "", + "demo": "health\/get-queue-deletes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFailedJobs", + "group": "queue", + "weight": 472, + "cookies": false, + "type": "", + "demo": "health\/get-failed-jobs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-stats-resources", + "v1-stats-usage", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-screenshots", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueFunctions", + "group": "queue", + "weight": 469, + "cookies": false, + "type": "", + "demo": "health\/get-queue-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/logs": { + "get": { + "summary": "Get logs queue", + "operationId": "healthGetQueueLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueLogs", + "group": "queue", + "weight": 461, + "cookies": false, + "type": "", + "demo": "health\/get-queue-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMails", + "group": "queue", + "weight": 466, + "cookies": false, + "type": "", + "demo": "health\/get-queue-mails.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMessaging", + "group": "queue", + "weight": 467, + "cookies": false, + "type": "", + "demo": "health\/get-queue-messaging.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMigrations", + "group": "queue", + "weight": 468, + "cookies": false, + "type": "", + "demo": "health\/get-queue-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-resources": { + "get": { + "summary": "Get stats resources queue", + "operationId": "healthGetQueueStatsResources", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueStatsResources", + "group": "queue", + "weight": 470, + "cookies": false, + "type": "", + "demo": "health\/get-queue-stats-resources.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-usage": { + "get": { + "summary": "Get stats usage queue", + "operationId": "healthGetQueueUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueUsage", + "group": "queue", + "weight": 471, + "cookies": false, + "type": "", + "demo": "health\/get-queue-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/webhooks": { + "get": { + "summary": "Get webhooks queue", + "operationId": "healthGetQueueWebhooks", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueWebhooks", + "group": "queue", + "weight": 460, + "cookies": false, + "type": "", + "demo": "health\/get-queue-webhooks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorage", + "group": "storage", + "weight": 457, + "cookies": false, + "type": "", + "demo": "health\/get-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/storage\/local": { + "get": { + "summary": "Get local storage", + "operationId": "healthGetStorageLocal", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite local storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorageLocal", + "group": "storage", + "weight": 456, + "cookies": false, + "type": "", + "demo": "health\/get-storage-local.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/time": { + "get": { + "summary": "Get time", + "operationId": "healthGetTime", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "responses": { + "200": { + "description": "Health Time", + "schema": { + "$ref": "#\/definitions\/healthTime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTime", + "group": "health", + "weight": 454, + "cookies": false, + "type": "", + "demo": "health\/get-time.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "schema": { + "$ref": "#\/definitions\/locale" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 49, + "cookies": false, + "type": "", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "schema": { + "$ref": "#\/definitions\/localeCodeList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "weight": 50, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "schema": { + "$ref": "#\/definitions\/continentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listContinents", + "group": null, + "weight": 54, + "cookies": false, + "type": "", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { + "$ref": "#\/definitions\/countryList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "weight": 51, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { + "$ref": "#\/definitions\/countryList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesEU", + "group": null, + "weight": 52, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "schema": { + "$ref": "#\/definitions\/phoneList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "weight": 53, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "schema": { + "$ref": "#\/definitions\/currencyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCurrencies", + "group": null, + "weight": 55, + "cookies": false, + "type": "", + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "schema": { + "$ref": "#\/definitions\/languageList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLanguages", + "group": null, + "weight": 56, + "cookies": false, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "schema": { + "$ref": "#\/definitions\/messageList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessages", + "group": "messages", + "weight": 158, + "cookies": false, + "type": "", + "demo": "messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmail", + "group": "messages", + "weight": 155, + "cookies": false, + "type": "", + "demo": "messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<MESSAGE_ID>" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "messages", + "weight": 162, + "cookies": false, + "type": "", + "demo": "messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false, + "x-nullable": true + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": null, + "x-example": false, + "x-nullable": true + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPush", + "group": "messages", + "weight": 157, + "cookies": false, + "type": "", + "demo": "messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<MESSAGE_ID>" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": "", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": "", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": "", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": "", + "x-example": "<ID1:ID2>" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "default": "", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "default": "", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null, + "format": "int32" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + ] + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePush", + "group": "messages", + "weight": 164, + "cookies": false, + "type": "", + "demo": "messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": null, + "x-example": "<TITLE>", + "x-nullable": true + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": null, + "x-example": "<BODY>", + "x-nullable": true + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": null, + "x-example": "<ACTION>", + "x-nullable": true + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": "<ID1:ID2>", + "x-nullable": true + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "default": null, + "x-example": "<ICON>", + "x-nullable": true + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "default": null, + "x-example": "<SOUND>", + "x-nullable": true + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<COLOR>", + "x-nullable": true + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<TAG>", + "x-nullable": true + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "default": null, + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [], + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSms", + "group": "messages", + "weight": 156, + "cookies": false, + "type": "", + "demo": "messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSms", + "group": "messages", + "weight": 163, + "cookies": false, + "type": "", + "demo": "messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMessage", + "group": "messages", + "weight": 161, + "cookies": false, + "type": "", + "demo": "messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "messages", + "weight": 165, + "cookies": false, + "type": "", + "demo": "messaging\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessageLogs", + "group": "logs", + "weight": 159, + "cookies": false, + "type": "", + "demo": "messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "messages", + "weight": 160, + "cookies": false, + "type": "", + "demo": "messaging\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "schema": { + "$ref": "#\/definitions\/providerList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviders", + "group": "providers", + "weight": 129, + "cookies": false, + "type": "", + "demo": "messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createApnsProvider", + "group": "providers", + "weight": 128, + "cookies": false, + "type": "", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateApnsProvider", + "group": "providers", + "weight": 142, + "cookies": false, + "type": "", + "demo": "messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFcmProvider", + "group": "providers", + "weight": 127, + "cookies": false, + "type": "", + "demo": "messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFcmProvider", + "group": "providers", + "weight": 141, + "cookies": false, + "type": "", + "demo": "messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMailgunProvider", + "group": "providers", + "weight": 118, + "cookies": false, + "type": "", + "demo": "messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMailgunProvider", + "group": "providers", + "weight": 132, + "cookies": false, + "type": "", + "demo": "messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMsg91Provider", + "group": "providers", + "weight": 122, + "cookies": false, + "type": "", + "demo": "messaging\/create-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMsg91Provider", + "group": "providers", + "weight": 136, + "cookies": false, + "type": "", + "demo": "messaging\/update-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Resend provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createResendProvider", + "group": "providers", + "weight": 120, + "cookies": false, + "type": "", + "demo": "messaging\/create-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Resend provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateResendProvider", + "group": "providers", + "weight": 134, + "cookies": false, + "type": "", + "demo": "messaging\/update-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSendgridProvider", + "group": "providers", + "weight": 119, + "cookies": false, + "type": "", + "demo": "messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSendgridProvider", + "group": "providers", + "weight": 133, + "cookies": false, + "type": "", + "demo": "messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSmtpProvider", + "group": "providers", + "weight": 121, + "cookies": false, + "type": "", + "demo": "messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": null, + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "default": 587, + "x-example": 1, + "format": "int32" + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": true, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + ] + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSmtpProvider", + "group": "providers", + "weight": 135, + "cookies": false, + "type": "", + "demo": "messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": "", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTelesignProvider", + "group": "providers", + "weight": 123, + "cookies": false, + "type": "", + "demo": "messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTelesignProvider", + "group": "providers", + "weight": 137, + "cookies": false, + "type": "", + "demo": "messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextmagicProvider", + "group": "providers", + "weight": 124, + "cookies": false, + "type": "", + "demo": "messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextmagicProvider", + "group": "providers", + "weight": 138, + "cookies": false, + "type": "", + "demo": "messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTwilioProvider", + "group": "providers", + "weight": 125, + "cookies": false, + "type": "", + "demo": "messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTwilioProvider", + "group": "providers", + "weight": 139, + "cookies": false, + "type": "", + "demo": "messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVonageProvider", + "group": "providers", + "weight": 126, + "cookies": false, + "type": "", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVonageProvider", + "group": "providers", + "weight": 140, + "cookies": false, + "type": "", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getProvider", + "group": "providers", + "weight": 131, + "cookies": false, + "type": "", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteProvider", + "group": "providers", + "weight": 143, + "cookies": false, + "type": "", + "demo": "messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviderLogs", + "group": "providers", + "weight": 130, + "cookies": false, + "type": "", + "demo": "messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscriberLogs", + "group": "subscribers", + "weight": 152, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "schema": { + "$ref": "#\/definitions\/topicList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopics", + "group": "topics", + "weight": 145, + "cookies": false, + "type": "", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTopic", + "group": "topics", + "weight": 144, + "cookies": false, + "type": "", + "demo": "messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "default": null, + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [ + "users" + ], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTopic", + "group": "topics", + "weight": 147, + "cookies": false, + "type": "", + "demo": "messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTopic", + "group": "topics", + "weight": 148, + "cookies": false, + "type": "", + "demo": "messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>", + "x-nullable": true + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": null, + "x-example": "[\"any\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTopic", + "group": "topics", + "weight": 149, + "cookies": false, + "type": "", + "demo": "messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopicLogs", + "group": "topics", + "weight": 146, + "cookies": false, + "type": "", + "demo": "messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "schema": { + "$ref": "#\/definitions\/subscriberList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscribers", + "group": "subscribers", + "weight": 151, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "weight": 150, + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "default": null, + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "default": null, + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriber", + "group": "subscribers", + "weight": 153, + "cookies": false, + "type": "", + "demo": "messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "weight": 154, + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + } + }, + "\/migrations": { + "get": { + "summary": "List migrations", + "operationId": "migrationsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", + "responses": { + "200": { + "description": "Migrations List", + "schema": { + "$ref": "#\/definitions\/migrationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 578, + "cookies": false, + "type": "", + "demo": "migrations\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/migrations\/appwrite": { + "post": { + "summary": "Create Appwrite migration", + "operationId": "migrationsCreateAppwriteMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAppwriteMigration", + "group": null, + "weight": 582, + "cookies": false, + "type": "", + "demo": "migrations\/create-appwrite-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable" + ], + "x-enum-name": "AppwriteMigrationResource", + "x-enum-keys": [] + } + }, + "endpoint": { + "type": "string", + "description": "Source Appwrite endpoint", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + }, + "projectId": { + "type": "string", + "description": "Source Project ID", + "default": null, + "x-example": "<PROJECT_ID>" + }, + "apiKey": { + "type": "string", + "description": "Source API Key", + "default": null, + "x-example": "<API_KEY>" + } + }, + "required": [ + "resources", + "endpoint", + "projectId", + "apiKey" + ] + } + } + ] + } + }, + "\/migrations\/appwrite\/report": { + "get": { + "summary": "Get Appwrite migration report", + "operationId": "migrationsGetAppwriteReport", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAppwriteReport", + "group": null, + "weight": 583, + "cookies": false, + "type": "", + "demo": "migrations\/get-appwrite-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable" + ], + "x-enum-name": "AppwriteMigrationResource", + "x-enum-keys": [] + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Appwrite Endpoint", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "projectID", + "description": "Source's Project ID", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "query" + }, + { + "name": "key", + "description": "Source's API Key", + "required": true, + "type": "string", + "x-example": "<KEY>", + "in": "query" + } + ] + } + }, + "\/migrations\/csv\/exports": { + "post": { + "summary": "Export documents to CSV", + "operationId": "migrationsCreateCSVExport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCSVExport", + "group": null, + "weight": 591, + "cookies": false, + "type": "", + "demo": "migrations\/create-csv-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-export.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", + "default": null, + "x-example": "<ID1:ID2>" + }, + "filename": { + "type": "string", + "description": "The name of the file to be created for the export, excluding the .csv extension.", + "default": null, + "x-example": "<FILENAME>" + }, + "columns": { + "type": "array", + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "delimiter": { + "type": "string", + "description": "The character that separates each column value. Default is comma.", + "default": ",", + "x-example": "<DELIMITER>" + }, + "enclosure": { + "type": "string", + "description": "The character that encloses each column value. Default is double quotes.", + "default": "\"", + "x-example": "<ENCLOSURE>" + }, + "escape": { + "type": "string", + "description": "The escape character for the enclosure character. Default is double quotes.", + "default": "\"", + "x-example": "<ESCAPE>" + }, + "header": { + "type": "boolean", + "description": "Whether to include the header row with column names. Default is true.", + "default": true, + "x-example": false + }, + "notify": { + "type": "boolean", + "description": "Set to true to receive an email when the export is complete. Default is true.", + "default": true, + "x-example": false + } + }, + "required": [ + "resourceId", + "filename" + ] + } + } + ] + } + }, + "\/migrations\/csv\/imports": { + "post": { + "summary": "Import documents from a CSV", + "operationId": "migrationsCreateCSVImport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCSVImport", + "group": null, + "weight": 590, + "cookies": false, + "type": "", + "demo": "migrations\/create-csv-import.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-import.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "default": null, + "x-example": "<BUCKET_ID>" + }, + "fileId": { + "type": "string", + "description": "File ID.", + "default": null, + "x-example": "<FILE_ID>" + }, + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", + "default": null, + "x-example": "<ID1:ID2>" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false + } + }, + "required": [ + "bucketId", + "fileId", + "resourceId" + ] + } + } + ] + } + }, + "\/migrations\/firebase": { + "post": { + "summary": "Create Firebase migration", + "operationId": "migrationsCreateFirebaseMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFirebaseMigration", + "group": null, + "weight": 584, + "cookies": false, + "type": "", + "demo": "migrations\/create-firebase-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "FirebaseMigrationResource", + "x-enum-keys": [] + } + }, + "serviceAccount": { + "type": "string", + "description": "JSON of the Firebase service account credentials", + "default": null, + "x-example": "<SERVICE_ACCOUNT>" + } + }, + "required": [ + "resources", + "serviceAccount" + ] + } + } + ] + } + }, + "\/migrations\/firebase\/report": { + "get": { + "summary": "Get Firebase migration report", + "operationId": "migrationsGetFirebaseReport", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFirebaseReport", + "group": null, + "weight": 585, + "cookies": false, + "type": "", + "demo": "migrations\/get-firebase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "FirebaseMigrationResource", + "x-enum-keys": [] + }, + "in": "query" + }, + { + "name": "serviceAccount", + "description": "JSON of the Firebase service account credentials", + "required": true, + "type": "string", + "x-example": "<SERVICE_ACCOUNT>", + "in": "query" + } + ] + } + }, + "\/migrations\/json\/exports": { + "post": { + "summary": "Export documents to JSON", + "operationId": "migrationsCreateJSONExport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJSONExport", + "group": null, + "weight": 593, + "cookies": false, + "type": "", + "demo": "migrations\/create-json-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-export.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", + "default": null, + "x-example": "<ID1:ID2>" + }, + "filename": { + "type": "string", + "description": "The name of the file to be created for the export, excluding the .json extension.", + "default": null, + "x-example": "<FILENAME>" + }, + "columns": { + "type": "array", + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "notify": { + "type": "boolean", + "description": "Set to true to receive an email when the export is complete. Default is true.", + "default": true, + "x-example": false + } + }, + "required": [ + "resourceId", + "filename" + ] + } + } + ] + } + }, + "\/migrations\/json\/imports": { + "post": { + "summary": "Import documents from a JSON", + "operationId": "migrationsCreateJSONImport", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJSONImport", + "group": null, + "weight": 592, + "cookies": false, + "type": "", + "demo": "migrations\/create-json-import.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-import.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "default": null, + "x-example": "<BUCKET_ID>" + }, + "fileId": { + "type": "string", + "description": "File ID.", + "default": null, + "x-example": "<FILE_ID>" + }, + "resourceId": { + "type": "string", + "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", + "default": null, + "x-example": "<ID1:ID2>" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false + } + }, + "required": [ + "bucketId", + "fileId", + "resourceId" + ] + } + } + ] + } + }, + "\/migrations\/nhost": { + "post": { + "summary": "Create NHost migration", + "operationId": "migrationsCreateNHostMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createNHostMigration", + "group": null, + "weight": 588, + "cookies": false, + "type": "", + "demo": "migrations\/create-n-host-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "NHostMigrationResource", + "x-enum-keys": [] + } + }, + "subdomain": { + "type": "string", + "description": "Source's Subdomain", + "default": null, + "x-example": "<SUBDOMAIN>" + }, + "region": { + "type": "string", + "description": "Source's Region", + "default": null, + "x-example": "<REGION>" + }, + "adminSecret": { + "type": "string", + "description": "Source's Admin Secret", + "default": null, + "x-example": "<ADMIN_SECRET>" + }, + "database": { + "type": "string", + "description": "Source's Database Name", + "default": null, + "x-example": "<DATABASE>" + }, + "username": { + "type": "string", + "description": "Source's Database Username", + "default": null, + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Source's Database Password", + "default": null, + "x-example": "<PASSWORD>" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "default": 5432, + "x-example": null, + "format": "int32" + } + }, + "required": [ + "resources", + "subdomain", + "region", + "adminSecret", + "database", + "username", + "password" + ] + } + } + ] + } + }, + "\/migrations\/nhost\/report": { + "get": { + "summary": "Get NHost migration report", + "operationId": "migrationsGetNHostReport", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getNHostReport", + "group": null, + "weight": 589, + "cookies": false, + "type": "", + "demo": "migrations\/get-n-host-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate.", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "NHostMigrationResource", + "x-enum-keys": [] + }, + "in": "query" + }, + { + "name": "subdomain", + "description": "Source's Subdomain.", + "required": true, + "type": "string", + "x-example": "<SUBDOMAIN>", + "in": "query" + }, + { + "name": "region", + "description": "Source's Region.", + "required": true, + "type": "string", + "x-example": "<REGION>", + "in": "query" + }, + { + "name": "adminSecret", + "description": "Source's Admin Secret.", + "required": true, + "type": "string", + "x-example": "<ADMIN_SECRET>", + "in": "query" + }, + { + "name": "database", + "description": "Source's Database Name.", + "required": true, + "type": "string", + "x-example": "<DATABASE>", + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "type": "string", + "x-example": "<USERNAME>", + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "type": "string", + "x-example": "<PASSWORD>", + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5432, + "in": "query" + } + ] + } + }, + "\/migrations\/supabase": { + "post": { + "summary": "Create Supabase migration", + "operationId": "migrationsCreateSupabaseMigration", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSupabaseMigration", + "group": null, + "weight": 586, + "cookies": false, + "type": "", + "demo": "migrations\/create-supabase-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "SupabaseMigrationResource", + "x-enum-keys": [] + } + }, + "endpoint": { + "type": "string", + "description": "Source's Supabase Endpoint", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + }, + "apiKey": { + "type": "string", + "description": "Source's API Key", + "default": null, + "x-example": "<API_KEY>" + }, + "databaseHost": { + "type": "string", + "description": "Source's Database Host", + "default": null, + "x-example": "<DATABASE_HOST>" + }, + "username": { + "type": "string", + "description": "Source's Database Username", + "default": null, + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Source's Database Password", + "default": null, + "x-example": "<PASSWORD>" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "default": 5432, + "x-example": null, + "format": "int32" + } + }, + "required": [ + "resources", + "endpoint", + "apiKey", + "databaseHost", + "username", + "password" + ] + } + } + ] + } + }, + "\/migrations\/supabase\/report": { + "get": { + "summary": "Get Supabase migration report", + "operationId": "migrationsGetSupabaseReport", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "schema": { + "$ref": "#\/definitions\/migrationReport" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSupabaseReport", + "group": null, + "weight": 587, + "cookies": false, + "type": "", + "demo": "migrations\/get-supabase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "SupabaseMigrationResource", + "x-enum-keys": [] + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Supabase Endpoint.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "apiKey", + "description": "Source's API Key.", + "required": true, + "type": "string", + "x-example": "<API_KEY>", + "in": "query" + }, + { + "name": "databaseHost", + "description": "Source's Database Host.", + "required": true, + "type": "string", + "x-example": "<DATABASE_HOST>", + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "type": "string", + "x-example": "<USERNAME>", + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "type": "string", + "x-example": "<PASSWORD>", + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5432, + "in": "query" + } + ] + } + }, + "\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "migrationsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", + "responses": { + "200": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 579, + "cookies": false, + "type": "", + "demo": "migrations\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "type": "string", + "x-example": "<MIGRATION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update retry migration", + "operationId": "migrationsRetry", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "migrations" + ], + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", + "responses": { + "202": { + "description": "Migration", + "schema": { + "$ref": "#\/definitions\/migration" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "retry", + "group": null, + "weight": 580, + "cookies": false, + "type": "", + "demo": "migrations\/retry.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "type": "string", + "x-example": "<MIGRATION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete migration", + "operationId": "migrationsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "migrations" + ], + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 581, + "cookies": false, + "type": "", + "demo": "migrations\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "type": "string", + "x-example": "<MIGRATION_ID>", + "in": "path" + } + ] + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesListPresences", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "List presence logs.", + "responses": { + "200": { + "description": "Presences List", + "schema": { + "$ref": "#\/definitions\/presenceList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPresences", + "group": "presences", + "weight": 416, + "cookies": false, + "type": "", + "demo": "presences\/list-presences.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/presences\/usage": { + "get": { + "summary": "Get presence usage", + "operationId": "presencesGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Get presence usage metrics and statistics, including the current total of online users and historical online user counts for the selected time range.", + "responses": { + "200": { + "description": "UsagePresence", + "schema": { + "$ref": "#\/definitions\/usagePresence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 414, + "cookies": false, + "type": "", + "demo": "presences\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGetPresence", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPresence", + "group": "presences", + "weight": 415, + "cookies": false, + "type": "", + "demo": "presences\/get-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsertPresence", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertPresence", + "group": "presences", + "weight": 413, + "cookies": false, + "type": "", + "demo": "presences\/upsert-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertPresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "userId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/presence" + } + ], + "description": "", + "demo": "presences\/upsert-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "default": null, + "x-example": "<STATUS>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": [], + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + ] + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdatePresence", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePresence", + "group": "presences", + "weight": 417, + "cookies": false, + "type": "", + "demo": "presences\/update-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updatePresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "expiresAt", + "metadata", + "permissions" + ], + "required": [ + "presenceId", + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/presence" + } + ], + "description": "", + "demo": "presences\/update-presence.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "default": null, + "x-example": "<STATUS>", + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDeletePresence", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePresence", + "group": "presences", + "weight": 418, + "cookies": false, + "type": "", + "demo": "presences\/delete-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + } + ] + } + }, + "\/project": { + "delete": { + "summary": "Delete project", + "operationId": "projectDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 594, + "cookies": false, + "type": "", + "demo": "project\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/auth-methods\/{methodId}": { + "patch": { + "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", + "operationId": "projectUpdateAuthMethod", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAuthMethod", + "group": null, + "weight": 643, + "cookies": false, + "type": "", + "demo": "project\/update-auth-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "methodId", + "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", + "required": true, + "type": "string", + "x-example": "email-password", + "enum": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Auth method status.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/keys": { + "get": { + "summary": "List project keys", + "operationId": "projectListKeys", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all API keys from the current project.", + "responses": { + "200": { + "description": "API Keys List", + "schema": { + "$ref": "#\/definitions\/keyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listKeys", + "group": "keys", + "weight": 610, + "cookies": false, + "type": "", + "demo": "project\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project key", + "operationId": "projectCreateKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "responses": { + "201": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createKey", + "group": "keys", + "weight": 608, + "cookies": false, + "type": "", + "demo": "project\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "keyId": { + "type": "string", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<KEY_ID>" + }, + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + ] + } + }, + "\/project\/keys\/ephemeral": { + "post": { + "summary": "Create ephemeral project key", + "operationId": "projectCreateEphemeralKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "responses": { + "201": { + "description": "Ephemeral Key", + "schema": { + "$ref": "#\/definitions\/ephemeralKey" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEphemeralKey", + "group": "keys", + "weight": 609, + "cookies": false, + "type": "", + "demo": "project\/create-ephemeral-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "duration": { + "type": "integer", + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "default": null, + "x-example": 1, + "format": "int32" + } + }, + "required": [ + "scopes", + "duration" + ] + } + } + ] + } + }, + "\/project\/keys\/{keyId}": { + "get": { + "summary": "Get project key", + "operationId": "projectGetKey", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a key by its unique ID. ", + "responses": { + "200": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getKey", + "group": "keys", + "weight": 611, + "cookies": false, + "type": "", + "demo": "project\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update project key", + "operationId": "projectUpdateKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateKey", + "group": "keys", + "weight": 613, + "cookies": false, + "type": "", + "demo": "project\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + ] + }, + "delete": { + "summary": "Delete project key", + "operationId": "projectDeleteKey", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "weight": 612, + "cookies": false, + "type": "", + "demo": "project\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + } + ] + } + }, + "\/project\/labels": { + "put": { + "summary": "Update project labels", + "operationId": "projectUpdateLabels", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": null, + "weight": 595, + "cookies": false, + "type": "", + "demo": "project\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + ] + } + }, + "\/project\/mock-phones": { + "get": { + "summary": "List project mock phones", + "operationId": "projectListMockPhones", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", + "responses": { + "200": { + "description": "Mock Numbers List", + "schema": { + "$ref": "#\/definitions\/mockNumberList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMockPhones", + "group": "mocks", + "weight": 628, + "cookies": false, + "type": "", + "demo": "project\/list-mock-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project mock phone", + "operationId": "projectCreateMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", + "responses": { + "201": { + "description": "Mock Number", + "schema": { + "$ref": "#\/definitions\/mockNumber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMockPhone", + "group": "mocks", + "weight": 627, + "cookies": false, + "type": "", + "demo": "project\/create-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + }, + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "number", + "otp" + ] + } + } + ] + } + }, + "\/project\/mock-phones\/{number}": { + "get": { + "summary": "Get project mock phone", + "operationId": "projectGetMockPhone", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "schema": { + "$ref": "#\/definitions\/mockNumber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMockPhone", + "group": "mocks", + "weight": 629, + "cookies": false, + "type": "", + "demo": "project\/get-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" + } + ] + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "schema": { + "$ref": "#\/definitions\/mockNumber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMockPhone", + "group": "mocks", + "weight": 630, + "cookies": false, + "type": "", + "demo": "project\/update-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] + }, + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMockPhone", + "group": "mocks", + "weight": 631, + "cookies": false, + "type": "", + "demo": "project\/delete-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" + } + ] + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2 Providers List", + "schema": { + "$ref": "#\/definitions\/oAuth2ProviderList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Providers", + "group": "oauth2", + "weight": 644, + "cookies": false, + "type": "", + "demo": "project\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/oauth2\/amazon": { + "patch": { + "summary": "Update project OAuth2 Amazon", + "operationId": "projectUpdateOAuth2Amazon", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Amazon configuration.", + "responses": { + "200": { + "description": "OAuth2Amazon", + "schema": { + "$ref": "#\/definitions\/oAuth2Amazon" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Amazon", + "group": "oauth2", + "weight": 671, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-amazon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/apple": { + "patch": { + "summary": "Update project OAuth2 Apple", + "operationId": "projectUpdateOAuth2Apple", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Apple configuration.", + "responses": { + "200": { + "description": "OAuth2Apple", + "schema": { + "$ref": "#\/definitions\/oAuth2Apple" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Apple", + "group": "oauth2", + "weight": 686, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-apple.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "serviceId": { + "type": "string", + "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", + "default": null, + "x-example": "<SERVICE_ID>", + "x-nullable": true + }, + "keyId": { + "type": "string", + "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", + "default": null, + "x-example": "<KEY_ID>", + "x-nullable": true + }, + "teamId": { + "type": "string", + "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", + "default": null, + "x-example": "<TEAM_ID>", + "x-nullable": true + }, + "p8File": { + "type": "string", + "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "default": null, + "x-example": "<P8_FILE>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/auth0": { + "patch": { + "summary": "Update project OAuth2 Auth0", + "operationId": "projectUpdateOAuth2Auth0", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Auth0 configuration.", + "responses": { + "200": { + "description": "OAuth2Auth0", + "schema": { + "$ref": "#\/definitions\/oAuth2Auth0" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Auth0", + "group": "oauth2", + "weight": 680, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-auth-0.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Auth0 instance. For example: example.us.auth0.com", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/authentik": { + "patch": { + "summary": "Update project OAuth2 Authentik", + "operationId": "projectUpdateOAuth2Authentik", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Authentik configuration.", + "responses": { + "200": { + "description": "OAuth2Authentik", + "schema": { + "$ref": "#\/definitions\/oAuth2Authentik" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Authentik", + "group": "oauth2", + "weight": 679, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-authentik.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Authentik instance. For example: example.authentik.com", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/autodesk": { + "patch": { + "summary": "Update project OAuth2 Autodesk", + "operationId": "projectUpdateOAuth2Autodesk", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Autodesk configuration.", + "responses": { + "200": { + "description": "OAuth2Autodesk", + "schema": { + "$ref": "#\/definitions\/oAuth2Autodesk" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Autodesk", + "group": "oauth2", + "weight": 654, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-autodesk.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/bitbucket": { + "patch": { + "summary": "Update project OAuth2 Bitbucket", + "operationId": "projectUpdateOAuth2Bitbucket", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitbucket configuration.", + "responses": { + "200": { + "description": "OAuth2Bitbucket", + "schema": { + "$ref": "#\/definitions\/oAuth2Bitbucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitbucket", + "group": "oauth2", + "weight": 651, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitbucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", + "default": null, + "x-example": "<KEY>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/bitly": { + "patch": { + "summary": "Update project OAuth2 Bitly", + "operationId": "projectUpdateOAuth2Bitly", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitly configuration.", + "responses": { + "200": { + "description": "OAuth2Bitly", + "schema": { + "$ref": "#\/definitions\/oAuth2Bitly" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitly", + "group": "oauth2", + "weight": 652, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitly.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/box": { + "patch": { + "summary": "Update project OAuth2 Box", + "operationId": "projectUpdateOAuth2Box", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Box configuration.", + "responses": { + "200": { + "description": "OAuth2Box", + "schema": { + "$ref": "#\/definitions\/oAuth2Box" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Box", + "group": "oauth2", + "weight": 653, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-box.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/dailymotion": { + "patch": { + "summary": "Update project OAuth2 Dailymotion", + "operationId": "projectUpdateOAuth2Dailymotion", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dailymotion configuration.", + "responses": { + "200": { + "description": "OAuth2Dailymotion", + "schema": { + "$ref": "#\/definitions\/oAuth2Dailymotion" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dailymotion", + "group": "oauth2", + "weight": 650, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dailymotion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", + "default": null, + "x-example": "<API_KEY>", + "x-nullable": true + }, + "apiSecret": { + "type": "string", + "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", + "default": null, + "x-example": "<API_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/discord": { + "patch": { + "summary": "Update project OAuth2 Discord", + "operationId": "projectUpdateOAuth2Discord", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Discord configuration.", + "responses": { + "200": { + "description": "OAuth2Discord", + "schema": { + "$ref": "#\/definitions\/oAuth2Discord" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Discord", + "group": "oauth2", + "weight": 647, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-discord.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/disqus": { + "patch": { + "summary": "Update project OAuth2 Disqus", + "operationId": "projectUpdateOAuth2Disqus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Disqus configuration.", + "responses": { + "200": { + "description": "OAuth2Disqus", + "schema": { + "$ref": "#\/definitions\/oAuth2Disqus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Disqus", + "group": "oauth2", + "weight": 670, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-disqus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "default": null, + "x-example": "<PUBLIC_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/dropbox": { + "patch": { + "summary": "Update project OAuth2 Dropbox", + "operationId": "projectUpdateOAuth2Dropbox", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dropbox configuration.", + "responses": { + "200": { + "description": "OAuth2Dropbox", + "schema": { + "$ref": "#\/definitions\/oAuth2Dropbox" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dropbox", + "group": "oauth2", + "weight": 649, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dropbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appKey": { + "type": "string", + "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", + "default": null, + "x-example": "<APP_KEY>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", + "default": null, + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/etsy": { + "patch": { + "summary": "Update project OAuth2 Etsy", + "operationId": "projectUpdateOAuth2Etsy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Etsy configuration.", + "responses": { + "200": { + "description": "OAuth2Etsy", + "schema": { + "$ref": "#\/definitions\/oAuth2Etsy" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Etsy", + "group": "oauth2", + "weight": 672, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-etsy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "keyString": { + "type": "string", + "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", + "default": null, + "x-example": "<KEY_STRING>", + "x-nullable": true + }, + "sharedSecret": { + "type": "string", + "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", + "default": null, + "x-example": "<SHARED_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/facebook": { + "patch": { + "summary": "Update project OAuth2 Facebook", + "operationId": "projectUpdateOAuth2Facebook", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Facebook configuration.", + "responses": { + "200": { + "description": "OAuth2Facebook", + "schema": { + "$ref": "#\/definitions\/oAuth2Facebook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Facebook", + "group": "oauth2", + "weight": 673, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-facebook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", + "default": null, + "x-example": "<APP_ID>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", + "default": null, + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/figma": { + "patch": { + "summary": "Update project OAuth2 Figma", + "operationId": "projectUpdateOAuth2Figma", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Figma configuration.", + "responses": { + "200": { + "description": "OAuth2Figma", + "schema": { + "$ref": "#\/definitions\/oAuth2Figma" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Figma", + "group": "oauth2", + "weight": 648, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-figma.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/fusionauth": { + "patch": { + "summary": "Update project OAuth2 FusionAuth", + "operationId": "projectUpdateOAuth2FusionAuth", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 FusionAuth configuration.", + "responses": { + "200": { + "description": "OAuth2FusionAuth", + "schema": { + "$ref": "#\/definitions\/oAuth2FusionAuth" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2FusionAuth", + "group": "oauth2", + "weight": 681, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-fusion-auth.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/github": { + "patch": { + "summary": "Update project OAuth2 GitHub", + "operationId": "projectUpdateOAuth2GitHub", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 GitHub configuration.", + "responses": { + "200": { + "description": "OAuth2GitHub", + "schema": { + "$ref": "#\/definitions\/oAuth2Github" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2GitHub", + "group": "oauth2", + "weight": 646, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-git-hub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/gitlab": { + "patch": { + "summary": "Update project OAuth2 Gitlab", + "operationId": "projectUpdateOAuth2Gitlab", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Gitlab configuration.", + "responses": { + "200": { + "description": "OAuth2Gitlab", + "schema": { + "$ref": "#\/definitions\/oAuth2Gitlab" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Gitlab", + "group": "oauth2", + "weight": 678, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-gitlab.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "default": null, + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/google": { + "patch": { + "summary": "Update project OAuth2 Google", + "operationId": "projectUpdateOAuth2Google", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Google configuration.", + "responses": { + "200": { + "description": "OAuth2Google", + "schema": { + "$ref": "#\/definitions\/oAuth2Google" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Google", + "group": "oauth2", + "weight": 655, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-google.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/keycloak": { + "patch": { + "summary": "Update project OAuth2 Keycloak", + "operationId": "projectUpdateOAuth2Keycloak", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Keycloak configuration.", + "responses": { + "200": { + "description": "OAuth2Keycloak", + "schema": { + "$ref": "#\/definitions\/oAuth2Keycloak" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Keycloak", + "group": "oauth2", + "weight": 682, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-keycloak.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Keycloak instance. For example: keycloak.example.com", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "realmName": { + "type": "string", + "description": "Keycloak realm name. For example: appwrite-realm", + "default": null, + "x-example": "<REALM_NAME>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/kick": { + "patch": { + "summary": "Update project OAuth2 Kick", + "operationId": "projectUpdateOAuth2Kick", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Kick configuration.", + "responses": { + "200": { + "description": "OAuth2Kick", + "schema": { + "$ref": "#\/definitions\/oAuth2Kick" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Kick", + "group": "oauth2", + "weight": 685, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-kick.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/linkedin": { + "patch": { + "summary": "Update project OAuth2 Linkedin", + "operationId": "projectUpdateOAuth2Linkedin", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Linkedin configuration.", + "responses": { + "200": { + "description": "OAuth2Linkedin", + "schema": { + "$ref": "#\/definitions\/oAuth2Linkedin" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Linkedin", + "group": "oauth2", + "weight": 669, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-linkedin.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "primaryClientSecret": { + "type": "string", + "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", + "default": null, + "x-example": "<PRIMARY_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/microsoft": { + "patch": { + "summary": "Update project OAuth2 Microsoft", + "operationId": "projectUpdateOAuth2Microsoft", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Microsoft configuration.", + "responses": { + "200": { + "description": "OAuth2Microsoft", + "schema": { + "$ref": "#\/definitions\/oAuth2Microsoft" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Microsoft", + "group": "oauth2", + "weight": 687, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-microsoft.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", + "default": null, + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "applicationSecret": { + "type": "string", + "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "default": null, + "x-example": "<APPLICATION_SECRET>", + "x-nullable": true + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", + "default": null, + "x-example": "<TENANT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/notion": { + "patch": { + "summary": "Update project OAuth2 Notion", + "operationId": "projectUpdateOAuth2Notion", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Notion configuration.", + "responses": { + "200": { + "description": "OAuth2Notion", + "schema": { + "$ref": "#\/definitions\/oAuth2Notion" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Notion", + "group": "oauth2", + "weight": 666, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-notion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "oauthClientId": { + "type": "string", + "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", + "default": null, + "x-example": "<OAUTH_CLIENT_ID>", + "x-nullable": true + }, + "oauthClientSecret": { + "type": "string", + "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", + "default": null, + "x-example": "<OAUTH_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/oidc": { + "patch": { + "summary": "Update project OAuth2 Oidc", + "operationId": "projectUpdateOAuth2Oidc", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Oidc configuration.", + "responses": { + "200": { + "description": "OAuth2Oidc", + "schema": { + "$ref": "#\/definitions\/oAuth2Oidc" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Oidc", + "group": "oauth2", + "weight": 683, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-oidc.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/okta": { + "patch": { + "summary": "Update project OAuth2 Okta", + "operationId": "projectUpdateOAuth2Okta", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Okta configuration.", + "responses": { + "200": { + "description": "OAuth2Okta", + "schema": { + "$ref": "#\/definitions\/oAuth2Okta" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Okta", + "group": "oauth2", + "weight": 684, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-okta.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "domain": { + "type": "string", + "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", + "default": null, + "x-example": null, + "x-nullable": true + }, + "authorizationServerId": { + "type": "string", + "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", + "default": null, + "x-example": "<AUTHORIZATION_SERVER_ID>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/paypal": { + "patch": { + "summary": "Update project OAuth2 Paypal", + "operationId": "projectUpdateOAuth2Paypal", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Paypal configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "schema": { + "$ref": "#\/definitions\/oAuth2Paypal" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Paypal", + "group": "oauth2", + "weight": 676, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/paypalSandbox": { + "patch": { + "summary": "Update project OAuth2 PaypalSandbox", + "operationId": "projectUpdateOAuth2PaypalSandbox", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 PaypalSandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "schema": { + "$ref": "#\/definitions\/oAuth2Paypal" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2PaypalSandbox", + "group": "oauth2", + "weight": 677, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/podio": { + "patch": { + "summary": "Update project OAuth2 Podio", + "operationId": "projectUpdateOAuth2Podio", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Podio configuration.", + "responses": { + "200": { + "description": "OAuth2Podio", + "schema": { + "$ref": "#\/definitions\/oAuth2Podio" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Podio", + "group": "oauth2", + "weight": 665, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-podio.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/salesforce": { + "patch": { + "summary": "Update project OAuth2 Salesforce", + "operationId": "projectUpdateOAuth2Salesforce", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Salesforce configuration.", + "responses": { + "200": { + "description": "OAuth2Salesforce", + "schema": { + "$ref": "#\/definitions\/oAuth2Salesforce" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Salesforce", + "group": "oauth2", + "weight": 667, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-salesforce.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "default": null, + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "customerSecret": { + "type": "string", + "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", + "default": null, + "x-example": "<CUSTOMER_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/slack": { + "patch": { + "summary": "Update project OAuth2 Slack", + "operationId": "projectUpdateOAuth2Slack", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Slack configuration.", + "responses": { + "200": { + "description": "OAuth2Slack", + "schema": { + "$ref": "#\/definitions\/oAuth2Slack" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Slack", + "group": "oauth2", + "weight": 664, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-slack.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/spotify": { + "patch": { + "summary": "Update project OAuth2 Spotify", + "operationId": "projectUpdateOAuth2Spotify", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Spotify configuration.", + "responses": { + "200": { + "description": "OAuth2Spotify", + "schema": { + "$ref": "#\/definitions\/oAuth2Spotify" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Spotify", + "group": "oauth2", + "weight": 663, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-spotify.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/stripe": { + "patch": { + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Stripe configuration.", + "responses": { + "200": { + "description": "OAuth2Stripe", + "schema": { + "$ref": "#\/definitions\/oAuth2Stripe" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Stripe", + "group": "oauth2", + "weight": 662, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-stripe.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "apiSecretKey": { + "type": "string", + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "default": null, + "x-example": "<API_SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/tradeshift": { + "patch": { + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "schema": { + "$ref": "#\/definitions\/oAuth2Tradeshift" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Tradeshift", + "group": "oauth2", + "weight": 674, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "default": null, + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "default": null, + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/tradeshiftBox": { + "patch": { + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "schema": { + "$ref": "#\/definitions\/oAuth2Tradeshift" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2TradeshiftSandbox", + "group": "oauth2", + "weight": 675, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "default": null, + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "default": null, + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/twitch": { + "patch": { + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Twitch configuration.", + "responses": { + "200": { + "description": "OAuth2Twitch", + "schema": { + "$ref": "#\/definitions\/oAuth2Twitch" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Twitch", + "group": "oauth2", + "weight": 661, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-twitch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/wordpress": { + "patch": { + "summary": "Update project OAuth2 WordPress", + "operationId": "projectUpdateOAuth2WordPress", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 WordPress configuration.", + "responses": { + "200": { + "description": "OAuth2WordPress", + "schema": { + "$ref": "#\/definitions\/oAuth2WordPress" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2WordPress", + "group": "oauth2", + "weight": 660, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-word-press.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/x": { + "patch": { + "summary": "Update project OAuth2 X", + "operationId": "projectUpdateOAuth2X", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 X configuration.", + "responses": { + "200": { + "description": "OAuth2X", + "schema": { + "$ref": "#\/definitions\/oAuth2X" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2X", + "group": "oauth2", + "weight": 659, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2x.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", + "default": null, + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/yahoo": { + "patch": { + "summary": "Update project OAuth2 Yahoo", + "operationId": "projectUpdateOAuth2Yahoo", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yahoo configuration.", + "responses": { + "200": { + "description": "OAuth2Yahoo", + "schema": { + "$ref": "#\/definitions\/oAuth2Yahoo" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yahoo", + "group": "oauth2", + "weight": 668, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yahoo.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/yandex": { + "patch": { + "summary": "Update project OAuth2 Yandex", + "operationId": "projectUpdateOAuth2Yandex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yandex configuration.", + "responses": { + "200": { + "description": "OAuth2Yandex", + "schema": { + "$ref": "#\/definitions\/oAuth2Yandex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yandex", + "group": "oauth2", + "weight": 658, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yandex.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/zoho": { + "patch": { + "summary": "Update project OAuth2 Zoho", + "operationId": "projectUpdateOAuth2Zoho", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoho configuration.", + "responses": { + "200": { + "description": "OAuth2Zoho", + "schema": { + "$ref": "#\/definitions\/oAuth2Zoho" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoho", + "group": "oauth2", + "weight": 657, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/zoom": { + "patch": { + "summary": "Update project OAuth2 Zoom", + "operationId": "projectUpdateOAuth2Zoom", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoom configuration.", + "responses": { + "200": { + "description": "OAuth2Zoom", + "schema": { + "$ref": "#\/definitions\/oAuth2Zoom" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoom", + "group": "oauth2", + "weight": 656, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoom.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/{provider}": { + "get": { + "summary": "Get project OAuth2 provider", + "operationId": "projectGetOAuth2Provider", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/oAuth2Github" + }, + { + "$ref": "#\/definitions\/oAuth2Discord" + }, + { + "$ref": "#\/definitions\/oAuth2Figma" + }, + { + "$ref": "#\/definitions\/oAuth2Dropbox" + }, + { + "$ref": "#\/definitions\/oAuth2Dailymotion" + }, + { + "$ref": "#\/definitions\/oAuth2Bitbucket" + }, + { + "$ref": "#\/definitions\/oAuth2Bitly" + }, + { + "$ref": "#\/definitions\/oAuth2Box" + }, + { + "$ref": "#\/definitions\/oAuth2Autodesk" + }, + { + "$ref": "#\/definitions\/oAuth2Google" + }, + { + "$ref": "#\/definitions\/oAuth2Zoom" + }, + { + "$ref": "#\/definitions\/oAuth2Zoho" + }, + { + "$ref": "#\/definitions\/oAuth2Yandex" + }, + { + "$ref": "#\/definitions\/oAuth2X" + }, + { + "$ref": "#\/definitions\/oAuth2WordPress" + }, + { + "$ref": "#\/definitions\/oAuth2Twitch" + }, + { + "$ref": "#\/definitions\/oAuth2Stripe" + }, + { + "$ref": "#\/definitions\/oAuth2Spotify" + }, + { + "$ref": "#\/definitions\/oAuth2Slack" + }, + { + "$ref": "#\/definitions\/oAuth2Podio" + }, + { + "$ref": "#\/definitions\/oAuth2Notion" + }, + { + "$ref": "#\/definitions\/oAuth2Salesforce" + }, + { + "$ref": "#\/definitions\/oAuth2Yahoo" + }, + { + "$ref": "#\/definitions\/oAuth2Linkedin" + }, + { + "$ref": "#\/definitions\/oAuth2Disqus" + }, + { + "$ref": "#\/definitions\/oAuth2Amazon" + }, + { + "$ref": "#\/definitions\/oAuth2Etsy" + }, + { + "$ref": "#\/definitions\/oAuth2Facebook" + }, + { + "$ref": "#\/definitions\/oAuth2Tradeshift" + }, + { + "$ref": "#\/definitions\/oAuth2Paypal" + }, + { + "$ref": "#\/definitions\/oAuth2Gitlab" + }, + { + "$ref": "#\/definitions\/oAuth2Authentik" + }, + { + "$ref": "#\/definitions\/oAuth2Auth0" + }, + { + "$ref": "#\/definitions\/oAuth2FusionAuth" + }, + { + "$ref": "#\/definitions\/oAuth2Keycloak" + }, + { + "$ref": "#\/definitions\/oAuth2Oidc" + }, + { + "$ref": "#\/definitions\/oAuth2Apple" + }, + { + "$ref": "#\/definitions\/oAuth2Okta" + }, + { + "$ref": "#\/definitions\/oAuth2Kick" + }, + { + "$ref": "#\/definitions\/oAuth2Microsoft" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/definitions\/oAuth2Github", + "discord": "#\/definitions\/oAuth2Discord", + "figma": "#\/definitions\/oAuth2Figma", + "dropbox": "#\/definitions\/oAuth2Dropbox", + "dailymotion": "#\/definitions\/oAuth2Dailymotion", + "bitbucket": "#\/definitions\/oAuth2Bitbucket", + "bitly": "#\/definitions\/oAuth2Bitly", + "box": "#\/definitions\/oAuth2Box", + "autodesk": "#\/definitions\/oAuth2Autodesk", + "google": "#\/definitions\/oAuth2Google", + "zoom": "#\/definitions\/oAuth2Zoom", + "zoho": "#\/definitions\/oAuth2Zoho", + "yandex": "#\/definitions\/oAuth2Yandex", + "x": "#\/definitions\/oAuth2X", + "wordpress": "#\/definitions\/oAuth2WordPress", + "twitch": "#\/definitions\/oAuth2Twitch", + "stripe": "#\/definitions\/oAuth2Stripe", + "spotify": "#\/definitions\/oAuth2Spotify", + "slack": "#\/definitions\/oAuth2Slack", + "podio": "#\/definitions\/oAuth2Podio", + "notion": "#\/definitions\/oAuth2Notion", + "salesforce": "#\/definitions\/oAuth2Salesforce", + "yahoo": "#\/definitions\/oAuth2Yahoo", + "linkedin": "#\/definitions\/oAuth2Linkedin", + "disqus": "#\/definitions\/oAuth2Disqus", + "amazon": "#\/definitions\/oAuth2Amazon", + "etsy": "#\/definitions\/oAuth2Etsy", + "facebook": "#\/definitions\/oAuth2Facebook", + "tradeshift": "#\/definitions\/oAuth2Tradeshift", + "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", + "paypal": "#\/definitions\/oAuth2Paypal", + "paypalSandbox": "#\/definitions\/oAuth2Paypal", + "gitlab": "#\/definitions\/oAuth2Gitlab", + "authentik": "#\/definitions\/oAuth2Authentik", + "auth0": "#\/definitions\/oAuth2Auth0", + "fusionauth": "#\/definitions\/oAuth2FusionAuth", + "keycloak": "#\/definitions\/oAuth2Keycloak", + "oidc": "#\/definitions\/oAuth2Oidc", + "apple": "#\/definitions\/oAuth2Apple", + "okta": "#\/definitions\/oAuth2Okta", + "kick": "#\/definitions\/oAuth2Kick", + "microsoft": "#\/definitions\/oAuth2Microsoft" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getOAuth2Provider", + "group": "oauth2", + "weight": 645, + "cookies": false, + "type": "", + "demo": "project\/get-o-auth-2-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 provider key. For example: github, google, apple.", + "required": true, + "type": "string", + "x-example": "<PROVIDER>", + "in": "path" + } + ] + } + }, + "\/project\/platforms": { + "get": { + "summary": "List project platforms", + "operationId": "projectListPlatforms", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", + "responses": { + "200": { + "description": "Platforms List", + "schema": { + "$ref": "#\/definitions\/platformList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPlatforms", + "group": "platforms", + "weight": 626, + "cookies": false, + "type": "", + "demo": "project\/list-platforms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/project\/platforms\/android": { + "post": { + "summary": "Create project Android platform", + "operationId": "projectCreateAndroidPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Android", + "schema": { + "$ref": "#\/definitions\/platformAndroid" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAndroidPlatform", + "group": "platforms", + "weight": 622, + "cookies": false, + "type": "", + "demo": "project\/create-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "default": null, + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "platformId", + "name", + "applicationId" + ] + } + } + ] + } + }, + "\/project\/platforms\/android\/{platformId}": { + "put": { + "summary": "Update project Android platform", + "operationId": "projectUpdateAndroidPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", + "responses": { + "200": { + "description": "Platform Android", + "schema": { + "$ref": "#\/definitions\/platformAndroid" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAndroidPlatform", + "group": "platforms", + "weight": 617, + "cookies": false, + "type": "", + "demo": "project\/update-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "default": null, + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "name", + "applicationId" + ] + } + } + ] + } + }, + "\/project\/platforms\/apple": { + "post": { + "summary": "Create project Apple platform", + "operationId": "projectCreateApplePlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Apple", + "schema": { + "$ref": "#\/definitions\/platformApple" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createApplePlatform", + "group": "platforms", + "weight": 621, + "cookies": false, + "type": "", + "demo": "project\/create-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "default": null, + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "platformId", + "name", + "bundleIdentifier" + ] + } + } + ] + } + }, + "\/project\/platforms\/apple\/{platformId}": { + "put": { + "summary": "Update project Apple platform", + "operationId": "projectUpdateApplePlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", + "responses": { + "200": { + "description": "Platform Apple", + "schema": { + "$ref": "#\/definitions\/platformApple" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateApplePlatform", + "group": "platforms", + "weight": 616, + "cookies": false, + "type": "", + "demo": "project\/update-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "default": null, + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "name", + "bundleIdentifier" + ] + } + } + ] + } + }, + "\/project\/platforms\/linux": { + "post": { + "summary": "Create project Linux platform", + "operationId": "projectCreateLinuxPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Linux", + "schema": { + "$ref": "#\/definitions\/platformLinux" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLinuxPlatform", + "group": "platforms", + "weight": 624, + "cookies": false, + "type": "", + "demo": "project\/create-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageName" + ] + } + } + ] + } + }, + "\/project\/platforms\/linux\/{platformId}": { + "put": { + "summary": "Update project Linux platform", + "operationId": "projectUpdateLinuxPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", + "responses": { + "200": { + "description": "Platform Linux", + "schema": { + "$ref": "#\/definitions\/platformLinux" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLinuxPlatform", + "group": "platforms", + "weight": 619, + "cookies": false, + "type": "", + "demo": "project\/update-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "name", + "packageName" + ] + } + } + ] + } + }, + "\/project\/platforms\/web": { + "post": { + "summary": "Create project web platform", + "operationId": "projectCreateWebPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Web", + "schema": { + "$ref": "#\/definitions\/platformWeb" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWebPlatform", + "group": "platforms", + "weight": 620, + "cookies": false, + "type": "", + "demo": "project\/create-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "default": null, + "x-example": "app.example.com" + } + }, + "required": [ + "platformId", + "name", + "hostname" + ] + } + } + ] + } + }, + "\/project\/platforms\/web\/{platformId}": { + "put": { + "summary": "Update project web platform", + "operationId": "projectUpdateWebPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", + "responses": { + "200": { + "description": "Platform Web", + "schema": { + "$ref": "#\/definitions\/platformWeb" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWebPlatform", + "group": "platforms", + "weight": 615, + "cookies": false, + "type": "", + "demo": "project\/update-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "default": null, + "x-example": "app.example.com" + } + }, + "required": [ + "name", + "hostname" + ] + } + } + ] + } + }, + "\/project\/platforms\/windows": { + "post": { + "summary": "Create project Windows platform", + "operationId": "projectCreateWindowsPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Windows", + "schema": { + "$ref": "#\/definitions\/platformWindows" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWindowsPlatform", + "group": "platforms", + "weight": 623, + "cookies": false, + "type": "", + "demo": "project\/create-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageIdentifierName" + ] + } + } + ] + } + }, + "\/project\/platforms\/windows\/{platformId}": { + "put": { + "summary": "Update project Windows platform", + "operationId": "projectUpdateWindowsPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", + "responses": { + "200": { + "description": "Platform Windows", + "schema": { + "$ref": "#\/definitions\/platformWindows" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWindowsPlatform", + "group": "platforms", + "weight": 618, + "cookies": false, + "type": "", + "demo": "project\/update-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "name", + "packageIdentifierName" + ] + } + } + ] + } + }, + "\/project\/platforms\/{platformId}": { + "get": { + "summary": "Get project platform", + "operationId": "projectGetPlatform", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", + "responses": { + "200": { + "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/platformWeb" + }, + { + "$ref": "#\/definitions\/platformApple" + }, + { + "$ref": "#\/definitions\/platformAndroid" + }, + { + "$ref": "#\/definitions\/platformWindows" + }, + { + "$ref": "#\/definitions\/platformLinux" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/definitions\/platformWeb", + "apple": "#\/definitions\/platformApple", + "android": "#\/definitions\/platformAndroid", + "windows": "#\/definitions\/platformWindows", + "linux": "#\/definitions\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPlatform", + "group": "platforms", + "weight": 625, + "cookies": false, + "type": "", + "demo": "project\/get-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete project platform", + "operationId": "projectDeletePlatform", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePlatform", + "group": "platforms", + "weight": 614, + "cookies": false, + "type": "", + "demo": "project\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + } + ] + } + }, + "\/project\/policies": { + "get": { + "summary": "List project policies", + "operationId": "projectListPolicies", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all project policies and their current configuration.", + "responses": { + "200": { + "description": "Policies List", + "schema": { + "$ref": "#\/definitions\/policyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPolicies", + "group": "policies", + "weight": 632, + "cookies": false, + "type": "", + "demo": "project\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/project\/policies\/membership-privacy": { + "patch": { + "summary": "Update membership privacy policy", + "operationId": "projectUpdateMembershipPrivacyPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipPrivacyPolicy", + "group": "policies", + "weight": 634, + "cookies": false, + "type": "", + "demo": "project\/update-membership-privacy-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "boolean", + "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true if you want make user email visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userPhone": { + "type": "boolean", + "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userName": { + "type": "boolean", + "description": "Set to true if you want make user name visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userMFA": { + "type": "boolean", + "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", + "default": null, + "x-example": false + } + } + } + } + ] + } + }, + "\/project\/policies\/password-dictionary": { + "patch": { + "summary": "Update password dictionary policy", + "operationId": "projectUpdatePasswordDictionaryPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordDictionaryPolicy", + "group": "policies", + "weight": 635, + "cookies": false, + "type": "", + "demo": "project\/update-password-dictionary-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/password-history": { + "patch": { + "summary": "Update password history policy", + "operationId": "projectUpdatePasswordHistoryPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordHistoryPolicy", + "group": "policies", + "weight": 636, + "cookies": false, + "type": "", + "demo": "project\/update-password-history-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + ] + } + }, + "\/project\/policies\/password-personal-data": { + "patch": { + "summary": "Update password personal data policy", + "operationId": "projectUpdatePasswordPersonalDataPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordPersonalDataPolicy", + "group": "policies", + "weight": 637, + "cookies": false, + "type": "", + "demo": "project\/update-password-personal-data-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/session-alert": { + "patch": { + "summary": "Update session alert policy", + "operationId": "projectUpdateSessionAlertPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionAlertPolicy", + "group": "policies", + "weight": 638, + "cookies": false, + "type": "", + "demo": "project\/update-session-alert-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/session-duration": { + "patch": { + "summary": "Update session duration policy", + "operationId": "projectUpdateSessionDurationPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update maximum duration how long sessions created within a project should stay active for.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionDurationPolicy", + "group": "policies", + "weight": 639, + "cookies": false, + "type": "", + "demo": "project\/update-session-duration-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", + "default": null, + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "duration" + ] + } + } + ] + } + }, + "\/project\/policies\/session-invalidation": { + "patch": { + "summary": "Update session invalidation policy", + "operationId": "projectUpdateSessionInvalidationPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionInvalidationPolicy", + "group": "policies", + "weight": 640, + "cookies": false, + "type": "", + "demo": "project\/update-session-invalidation-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/session-limit": { + "patch": { + "summary": "Update session limit policy", + "operationId": "projectUpdateSessionLimitPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionLimitPolicy", + "group": "policies", + "weight": 641, + "cookies": false, + "type": "", + "demo": "project\/update-session-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + ] + } + }, + "\/project\/policies\/user-limit": { + "patch": { + "summary": "Update user limit policy", + "operationId": "projectUpdateUserLimitPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUserLimitPolicy", + "group": "policies", + "weight": 642, + "cookies": false, + "type": "", + "demo": "project\/update-user-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + ] + } + }, + "\/project\/policies\/{policyId}": { + "get": { + "summary": "Get project policy", + "operationId": "projectGetPolicy", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", + "responses": { + "200": { + "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/policyPasswordDictionary" + }, + { + "$ref": "#\/definitions\/policyPasswordHistory" + }, + { + "$ref": "#\/definitions\/policyPasswordPersonalData" + }, + { + "$ref": "#\/definitions\/policySessionAlert" + }, + { + "$ref": "#\/definitions\/policySessionDuration" + }, + { + "$ref": "#\/definitions\/policySessionInvalidation" + }, + { + "$ref": "#\/definitions\/policySessionLimit" + }, + { + "$ref": "#\/definitions\/policyUserLimit" + }, + { + "$ref": "#\/definitions\/policyMembershipPrivacy" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/definitions\/policyPasswordDictionary", + "password-history": "#\/definitions\/policyPasswordHistory", + "password-personal-data": "#\/definitions\/policyPasswordPersonalData", + "session-alert": "#\/definitions\/policySessionAlert", + "session-duration": "#\/definitions\/policySessionDuration", + "session-invalidation": "#\/definitions\/policySessionInvalidation", + "session-limit": "#\/definitions\/policySessionLimit", + "user-limit": "#\/definitions\/policyUserLimit", + "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPolicy", + "group": "policies", + "weight": 633, + "cookies": false, + "type": "", + "demo": "project\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "required": true, + "type": "string", + "x-example": "password-dictionary", + "enum": [ + "password-dictionary", + "password-history", + "password-personal-data", + "session-alert", + "session-duration", + "session-invalidation", + "session-limit", + "user-limit", + "membership-privacy" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/project\/protocols\/{protocolId}": { + "patch": { + "summary": "Update project protocol", + "operationId": "projectUpdateProtocol", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateProtocol", + "group": null, + "weight": 596, + "cookies": false, + "type": "", + "demo": "project\/update-protocol.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "protocolId", + "description": "Protocol name. Can be one of: rest, graphql, websocket", + "required": true, + "type": "string", + "x-example": "rest", + "enum": [ + "rest", + "graphql", + "websocket" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Protocol status.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/services\/{serviceId}": { + "patch": { + "summary": "Update project service", + "operationId": "projectUpdateService", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateService", + "group": null, + "weight": 597, + "cookies": false, + "type": "", + "demo": "project\/update-service.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "serviceId", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", + "required": true, + "type": "string", + "x-example": "account", + "enum": [ + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Service status.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/smtp": { + "patch": { + "summary": "Update project SMTP configuration", + "operationId": "projectUpdateSMTP", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSMTP", + "group": "smtp", + "weight": 598, + "cookies": false, + "type": "", + "demo": "project\/update-smtp.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "SMTP server hostname (domain)", + "default": null, + "x-example": null, + "x-nullable": true + }, + "port": { + "type": "integer", + "description": "SMTP server port", + "default": null, + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "SMTP server username. Leave empty for no authorization.", + "default": null, + "x-example": "<USERNAME>", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", + "default": null, + "x-example": "<PASSWORD>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email address shown in inbox as the sender of the email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name shown in inbox as the sender of the email.", + "default": null, + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Email used when user replies to the email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Name used when user replies to the email.", + "default": null, + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + }, + "secure": { + "type": "string", + "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", + "default": null, + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": null, + "x-enum-keys": [], + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/smtp\/tests": { + "post": { + "summary": "Create project SMTP test", + "operationId": "projectCreateSMTPTest", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Send a test email to verify SMTP configuration. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSMTPTest", + "group": "smtp", + "weight": 599, + "cookies": false, + "type": "", + "demo": "project\/create-smtp-test.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + } + } + ] + } + }, + "\/project\/templates\/email": { + "get": { + "summary": "List project email templates", + "operationId": "projectListEmailTemplates", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", + "responses": { + "200": { + "description": "Email Templates List", + "schema": { + "$ref": "#\/definitions\/emailTemplateList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listEmailTemplates", + "group": "templates", + "weight": 600, + "cookies": false, + "type": "", + "demo": "project\/list-email-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "patch": { + "summary": "Update project email template", + "operationId": "projectUpdateEmailTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailTemplate", + "group": "templates", + "weight": 602, + "cookies": false, + "type": "", + "demo": "project\/update-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "default": null, + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [] + }, + "locale": { + "type": "string", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "default": "", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [] + }, + "subject": { + "type": "string", + "description": "Subject of the email template. Can be up to 255 characters.", + "default": null, + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "message": { + "type": "string", + "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", + "default": null, + "x-example": "<MESSAGE>", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name of the email sender.", + "default": null, + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Reply to name.", + "default": null, + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + } + }, + "required": [ + "templateId" + ] + } + } + ] + } + }, + "\/project\/templates\/email\/{templateId}": { + "get": { + "summary": "Get project email template", + "operationId": "projectGetEmailTemplate", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getEmailTemplate", + "group": "templates", + "weight": 601, + "cookies": false, + "type": "", + "demo": "project\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "default": "", + "in": "query" + } + ] + } + }, + "\/project\/usage": { + "get": { + "summary": "Get project usage stats", + "operationId": "projectGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", + "responses": { + "200": { + "description": "UsageProject", + "schema": { + "$ref": "#\/definitions\/usageProject" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 61, + "cookies": false, + "type": "", + "demo": "project\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "startDate", + "description": "Starting date for the usage", + "required": true, + "type": "string", + "format": "datetime", + "x-example": "2020-10-15T06:38:00.000+00:00", + "in": "query" + }, + { + "name": "endDate", + "description": "End date for the usage", + "required": true, + "type": "string", + "format": "datetime", + "x-example": "2020-10-15T06:38:00.000+00:00", + "in": "query" + }, + { + "name": "period", + "description": "Period used", + "required": false, + "type": "string", + "x-example": "1h", + "enum": [ + "1h", + "1d" + ], + "x-enum-name": "ProjectUsageRange", + "x-enum-keys": [ + "One Hour", + "One Day" + ], + "default": "1d", + "in": "query" + } + ] + } + }, + "\/project\/variables": { + "get": { + "summary": "List project variables", + "operationId": "projectListVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all project environment variables.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 604, + "cookies": false, + "type": "", + "demo": "project\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project variable", + "operationId": "projectCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 603, + "cookies": false, + "type": "", + "demo": "project\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<VARIABLE_ID>" + }, + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + ] + } + }, + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get project variable", + "operationId": "projectGetVariable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a variable by its unique ID. ", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 605, + "cookies": false, + "type": "", + "demo": "project\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update project variable", + "operationId": "projectUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 607, + "cookies": false, + "type": "", + "demo": "project\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete project variable", + "operationId": "projectDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a variable by its unique ID. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 606, + "cookies": false, + "type": "", + "demo": "project\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/projects": { + "get": { + "summary": "List projects", + "operationId": "projectsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a list of all projects. You can use the query params to filter your results. ", + "responses": { + "200": { + "description": "Projects List", + "schema": { + "$ref": "#\/definitions\/projectList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "projects", + "weight": 408, + "cookies": false, + "type": "", + "demo": "projects\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project", + "operationId": "projectsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Create a new project. You can create a maximum of 100 projects per account. ", + "responses": { + "201": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "projects", + "weight": 406, + "cookies": false, + "type": "", + "demo": "projects\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": null, + "x-example": "<TEAM_ID>" + }, + "region": { + "type": "string", + "description": "Project Region.", + "default": "default", + "x-example": "default", + "enum": [ + "default" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "description": { + "type": "string", + "description": "Project description. Max length: 256 chars.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "logo": { + "type": "string", + "description": "Project logo.", + "default": "", + "x-example": "<LOGO>" + }, + "url": { + "type": "string", + "description": "Project URL.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "legalName": { + "type": "string", + "description": "Project legal Name. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_NAME>" + }, + "legalCountry": { + "type": "string", + "description": "Project legal Country. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_COUNTRY>" + }, + "legalState": { + "type": "string", + "description": "Project legal State. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_STATE>" + }, + "legalCity": { + "type": "string", + "description": "Project legal City. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_CITY>" + }, + "legalAddress": { + "type": "string", + "description": "Project legal Address. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_ADDRESS>" + }, + "legalTaxId": { + "type": "string", + "description": "Project legal Tax ID. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_TAX_ID>" + } + }, + "required": [ + "projectId", + "name", + "teamId" + ] + } + } + ] + } + }, + "\/projects\/{projectId}": { + "get": { + "summary": "Get project", + "operationId": "projectsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "projects", + "weight": 57, + "cookies": false, + "type": "", + "demo": "projects\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update project", + "operationId": "projectsUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update a project by its unique ID.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "projects", + "weight": 407, + "cookies": false, + "type": "", + "demo": "projects\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Project description. Max length: 256 chars.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "logo": { + "type": "string", + "description": "Project logo.", + "default": "", + "x-example": "<LOGO>" + }, + "url": { + "type": "string", + "description": "Project URL.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "legalName": { + "type": "string", + "description": "Project legal name. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_NAME>" + }, + "legalCountry": { + "type": "string", + "description": "Project legal country. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_COUNTRY>" + }, + "legalState": { + "type": "string", + "description": "Project legal state. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_STATE>" + }, + "legalCity": { + "type": "string", + "description": "Project legal city. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_CITY>" + }, + "legalAddress": { + "type": "string", + "description": "Project legal address. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_ADDRESS>" + }, + "legalTaxId": { + "type": "string", + "description": "Project legal tax ID. Max length: 256 chars.", + "default": "", + "x-example": "<LEGAL_TAX_ID>" + } + }, + "required": [ + "name" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/dev-keys": { + "get": { + "summary": "List dev keys", + "operationId": "projectsListDevKeys", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "responses": { + "200": { + "description": "Dev Keys List", + "schema": { + "$ref": "#\/definitions\/devKeyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDevKeys", + "group": "devKeys", + "weight": 404, + "cookies": false, + "type": "", + "demo": "projects\/list-dev-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create dev key", + "operationId": "projectsCreateDevKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "responses": { + "201": { + "description": "DevKey", + "schema": { + "$ref": "#\/definitions\/devKey" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDevKey", + "group": "devKeys", + "weight": 401, + "cookies": false, + "type": "", + "demo": "projects\/create-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + } + }, + "required": [ + "name", + "expire" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/dev-keys\/{keyId}": { + "get": { + "summary": "Get dev key", + "operationId": "projectsGetDevKey", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", + "responses": { + "200": { + "description": "DevKey", + "schema": { + "$ref": "#\/definitions\/devKey" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDevKey", + "group": "devKeys", + "weight": 403, + "cookies": false, + "type": "", + "demo": "projects\/get-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update dev key", + "operationId": "projectsUpdateDevKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", + "responses": { + "200": { + "description": "DevKey", + "schema": { + "$ref": "#\/definitions\/devKey" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDevKey", + "group": "devKeys", + "weight": 402, + "cookies": false, + "type": "", + "demo": "projects\/update-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + } + }, + "required": [ + "name", + "expire" + ] + } + } + ] + }, + "delete": { + "summary": "Delete dev key", + "operationId": "projectsDeleteDevKey", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "projects" + ], + "description": "Delete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDevKey", + "group": "devKeys", + "weight": 405, + "cookies": false, + "type": "", + "demo": "projects\/delete-dev-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/schedules": { + "get": { + "summary": "List schedules", + "operationId": "projectsListSchedules", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a list of all the project's schedules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Schedules List", + "schema": { + "$ref": "#\/definitions\/scheduleList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSchedules", + "group": "schedules", + "weight": 412, + "cookies": false, + "type": "", + "demo": "projects\/list-schedules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-schedules.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create schedule", + "operationId": "projectsCreateSchedule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Create a new schedule for a resource.", + "responses": { + "201": { + "description": "Schedule", + "schema": { + "$ref": "#\/definitions\/schedule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSchedule", + "group": "schedules", + "weight": 410, + "cookies": false, + "type": "", + "demo": "projects\/create-schedule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-schedule.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "The resource type for the schedule. Possible values: function, execution, message.", + "default": null, + "x-example": "function", + "enum": [ + "function", + "execution", + "message" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "resourceId": { + "type": "string", + "description": "The resource ID to associate with this schedule.", + "default": null, + "x-example": "<RESOURCE_ID>" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON expression.", + "default": null, + "x-example": null + }, + "active": { + "type": "boolean", + "description": "Whether the schedule is active.", + "default": false, + "x-example": false + }, + "data": { + "type": "object", + "description": "Schedule data as a JSON string. Used to store resource-specific context needed for execution.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "resourceType", + "resourceId", + "schedule" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/schedules\/{scheduleId}": { + "get": { + "summary": "Get schedule", + "operationId": "projectsGetSchedule", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a schedule by its unique ID.", + "responses": { + "200": { + "description": "Schedule", + "schema": { + "$ref": "#\/definitions\/schedule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSchedule", + "group": "schedules", + "weight": 411, + "cookies": false, + "type": "", + "demo": "projects\/get-schedule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-schedule.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "scheduleId", + "description": "Schedule ID.", + "required": true, + "type": "string", + "x-example": "<SCHEDULE_ID>", + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/team": { + "patch": { + "summary": "Update project team", + "operationId": "projectsUpdateTeam", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update the team ID of a project allowing for it to be transferred to another team.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "projects", + "weight": 409, + "cookies": false, + "type": "", + "demo": "projects\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "<PROJECT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer project to.", + "default": null, + "x-example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + ] + } + }, + "\/proxy\/rules": { + "get": { + "summary": "List rules", + "operationId": "proxyListRules", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rule List", + "schema": { + "$ref": "#\/definitions\/proxyRuleList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRules", + "group": null, + "weight": 521, + "cookies": false, + "type": "", + "demo": "proxy\/list-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/proxy\/rules\/api": { + "post": { + "summary": "Create API rule", + "operationId": "proxyCreateAPIRule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for serving Appwrite's API on custom domain.", + "responses": { + "201": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAPIRule", + "group": null, + "weight": 516, + "cookies": false, + "type": "", + "demo": "proxy\/create-api-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "default": null, + "x-example": null + } + }, + "required": [ + "domain" + ] + } + } + ] + } + }, + "\/proxy\/rules\/function": { + "post": { + "summary": "Create function rule", + "operationId": "proxyCreateFunctionRule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for executing Appwrite Function on custom domain.", + "responses": { + "201": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFunctionRule", + "group": null, + "weight": 518, + "cookies": false, + "type": "", + "demo": "proxy\/create-function-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "default": null, + "x-example": null + }, + "functionId": { + "type": "string", + "description": "ID of function to be executed.", + "default": null, + "x-example": "<FUNCTION_ID>" + }, + "branch": { + "type": "string", + "description": "Name of VCS branch to deploy changes automatically", + "default": "", + "x-example": "<BRANCH>" + } + }, + "required": [ + "domain", + "functionId" + ] + } + } + ] + } + }, + "\/proxy\/rules\/redirect": { + "post": { + "summary": "Create Redirect rule", + "operationId": "proxyCreateRedirectRule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for to redirect from custom domain to another domain.", + "responses": { + "201": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRedirectRule", + "group": null, + "weight": 519, + "cookies": false, + "type": "", + "demo": "proxy\/create-redirect-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "default": null, + "x-example": null + }, + "url": { + "type": "string", + "description": "Target URL of redirection", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + }, + "statusCode": { + "type": "string", + "description": "Status code of redirection", + "default": null, + "x-example": "301", + "enum": [ + "301", + "302", + "307", + "308" + ], + "x-enum-name": null, + "x-enum-keys": [ + "Moved Permanently 301", + "Found 302", + "Temporary Redirect 307", + "Permanent Redirect 308" + ] + }, + "resourceId": { + "type": "string", + "description": "ID of parent resource.", + "default": null, + "x-example": "<RESOURCE_ID>" + }, + "resourceType": { + "type": "string", + "description": "Type of parent resource.", + "default": null, + "x-example": "site", + "enum": [ + "site", + "function" + ], + "x-enum-name": "ProxyResourceType", + "x-enum-keys": [ + "Site", + "Function" + ] + } + }, + "required": [ + "domain", + "url", + "statusCode", + "resourceId", + "resourceType" + ] + } + } + ] + } + }, + "\/proxy\/rules\/site": { + "post": { + "summary": "Create site rule", + "operationId": "proxyCreateSiteRule", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for serving Appwrite Site on custom domain.", + "responses": { + "201": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSiteRule", + "group": null, + "weight": 517, + "cookies": false, + "type": "", + "demo": "proxy\/create-site-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "default": null, + "x-example": null + }, + "siteId": { + "type": "string", + "description": "ID of site to be executed.", + "default": null, + "x-example": "<SITE_ID>" + }, + "branch": { + "type": "string", + "description": "Name of VCS branch to deploy changes automatically", + "default": "", + "x-example": "<BRANCH>" + } + }, + "required": [ + "domain", + "siteId" + ] + } + } + ] + } + }, + "\/proxy\/rules\/{ruleId}": { + "get": { + "summary": "Get rule", + "operationId": "proxyGetRule", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Get a proxy rule by its unique ID.", + "responses": { + "200": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRule", + "group": null, + "weight": 520, + "cookies": false, + "type": "", + "demo": "proxy\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "type": "string", + "x-example": "<RULE_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete rule", + "operationId": "proxyDeleteRule", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "proxy" + ], + "description": "Delete a proxy rule by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRule", + "group": null, + "weight": 522, + "cookies": false, + "type": "", + "demo": "proxy\/delete-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "type": "string", + "x-example": "<RULE_ID>", + "in": "path" + } + ] + } + }, + "\/proxy\/rules\/{ruleId}\/verification": { + "patch": { + "summary": "Update rule verification status", + "operationId": "proxyUpdateRuleVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "proxy" + ], + "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", + "responses": { + "200": { + "description": "Rule", + "schema": { + "$ref": "#\/definitions\/proxyRule" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRuleVerification", + "group": null, + "weight": 523, + "cookies": false, + "type": "", + "demo": "proxy\/update-rule-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "type": "string", + "x-example": "<RULE_ID>", + "in": "path" + } + ] + } + }, + "\/sites": { + "get": { + "summary": "List sites", + "operationId": "sitesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all the project's sites. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Sites List", + "schema": { + "$ref": "#\/definitions\/siteList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "sites", + "weight": 476, + "cookies": false, + "type": "", + "demo": "sites\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create site", + "operationId": "sitesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new site.", + "responses": { + "201": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "sites", + "weight": 474, + "cookies": false, + "type": "", + "demo": "sites\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "siteId": { + "type": "string", + "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<SITE_ID>" + }, + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "default": null, + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "default": true, + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "default": 30, + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "default": "", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "default": "", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "default": "", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "default": "", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "default": null, + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "default": "", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "default": "", + "x-example": "<FALLBACK_FILE>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "siteId", + "name", + "framework", + "buildRuntime" + ] + } + } + ] + } + }, + "\/sites\/frameworks": { + "get": { + "summary": "List frameworks", + "operationId": "sitesListFrameworks", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all frameworks that are currently available on the server instance.", + "responses": { + "200": { + "description": "Frameworks List", + "schema": { + "$ref": "#\/definitions\/frameworkList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFrameworks", + "group": "frameworks", + "weight": 479, + "cookies": false, + "type": "", + "demo": "sites\/list-frameworks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "sitesListSpecifications", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "List allowed site specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "schema": { + "$ref": "#\/definitions\/specificationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "frameworks", + "weight": 502, + "cookies": false, + "type": "", + "demo": "sites\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/templates": { + "get": { + "summary": "List templates", + "operationId": "sitesListTemplates", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "List available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", + "responses": { + "200": { + "description": "Site Templates List", + "schema": { + "$ref": "#\/definitions\/templateSiteList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTemplates", + "group": "templates", + "weight": 498, + "cookies": false, + "type": "", + "demo": "sites\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "frameworks", + "description": "List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [], + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "portfolio", + "starter", + "events", + "ecommerce", + "documentation", + "blog", + "ai", + "forms", + "dashboard" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "default": [], + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "\/sites\/templates\/{templateId}": { + "get": { + "summary": "Get site template", + "operationId": "sitesGetTemplate", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", + "responses": { + "200": { + "description": "Template Site", + "schema": { + "$ref": "#\/definitions\/templateSite" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTemplate", + "group": "templates", + "weight": 499, + "cookies": false, + "type": "", + "demo": "sites\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "type": "string", + "x-example": "<TEMPLATE_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/usage": { + "get": { + "summary": "Get sites usage", + "operationId": "sitesListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageSites", + "schema": { + "$ref": "#\/definitions\/usageSites" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 500, + "cookies": false, + "type": "", + "demo": "sites\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}": { + "get": { + "summary": "Get site", + "operationId": "sitesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "sites", + "weight": 475, + "cookies": false, + "type": "", + "demo": "sites\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update site", + "operationId": "sitesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Update site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "sites", + "weight": 477, + "cookies": false, + "type": "", + "demo": "sites\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "default": null, + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "default": true, + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "default": 30, + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "default": "", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "default": "", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "default": "", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "default": "", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "default": "", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "default": "", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "default": "", + "x-example": "<FALLBACK_FILE>" + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name", + "framework" + ] + } + } + ] + }, + "delete": { + "summary": "Delete site", + "operationId": "sitesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "sites" + ], + "description": "Delete a site by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "sites", + "weight": 478, + "cookies": false, + "type": "", + "demo": "sites\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployment": { + "patch": { + "summary": "Update site's deployment", + "operationId": "sitesUpdateSiteDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "responses": { + "200": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSiteDeployment", + "group": "sites", + "weight": 485, + "cookies": false, + "type": "", + "demo": "sites\/update-site-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "sitesListDeployments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { + "$ref": "#\/definitions\/deploymentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 484, + "cookies": false, + "type": "", + "demo": "sites\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "sitesCreateDeployment", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 480, + "cookies": false, + "type": "upload", + "demo": "sites\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "installCommand", + "description": "Install Commands.", + "required": false, + "type": "string", + "x-example": "<INSTALL_COMMAND>", + "in": "formData" + }, + { + "name": "buildCommand", + "description": "Build Commands.", + "required": false, + "type": "string", + "x-example": "<BUILD_COMMAND>", + "in": "formData" + }, + { + "name": "outputDirectory", + "description": "Output Directory.", + "required": false, + "type": "string", + "x-example": "<OUTPUT_DIRECTORY>", + "in": "formData" + }, + { + "name": "code", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "activate", + "description": "Automatically activate the deployment when it is finished building.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "formData" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "sitesCreateDuplicateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 488, + "cookies": false, + "type": "", + "demo": "sites\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "sitesCreateTemplateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 481, + "cookies": false, + "type": "", + "demo": "sites\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "default": null, + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "default": null, + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to site code in the template repo.", + "default": null, + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "default": null, + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "sitesCreateVcsDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 482, + "cookies": false, + "type": "", + "demo": "sites\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "default": null, + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "sitesGetDeployment", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 483, + "cookies": false, + "type": "", + "demo": "sites\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "sitesDeleteDeployment", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "sites" + ], + "description": "Delete a site deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 486, + "cookies": false, + "type": "", + "demo": "sites\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "sitesGetDeploymentDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "sites" + ], + "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 487, + "cookies": false, + "type": "location", + "demo": "sites\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source", + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "sitesUpdateDeploymentStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 489, + "cookies": false, + "type": "", + "demo": "sites\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/logs": { + "get": { + "summary": "List logs", + "operationId": "sitesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all site logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 491, + "cookies": false, + "type": "", + "demo": "sites\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/logs\/{logId}": { + "get": { + "summary": "Get log", + "operationId": "sitesGetLog", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site request log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getLog", + "group": "logs", + "weight": 490, + "cookies": false, + "type": "", + "demo": "sites\/get-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "type": "string", + "x-example": "<LOG_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete log", + "operationId": "sitesDeleteLog", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Delete a site log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteLog", + "group": "logs", + "weight": 492, + "cookies": false, + "type": "", + "demo": "sites\/delete-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "type": "string", + "x-example": "<LOG_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/usage": { + "get": { + "summary": "Get site usage", + "operationId": "sitesGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", + "responses": { + "200": { + "description": "UsageSite", + "schema": { + "$ref": "#\/definitions\/usageSite" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 501, + "cookies": false, + "type": "", + "demo": "sites\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "sitesListVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all variables of a specific site.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 495, + "cookies": false, + "type": "", + "demo": "sites\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "sitesCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 493, + "cookies": false, + "type": "", + "demo": "sites\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "sitesGetVariable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 494, + "cookies": false, + "type": "", + "demo": "sites\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "sitesUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 496, + "cookies": false, + "type": "", + "demo": "sites\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "sitesDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "sites" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 497, + "cookies": false, + "type": "", + "demo": "sites\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "schema": { + "$ref": "#\/definitions\/bucketList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBuckets", + "group": "buckets", + "weight": 545, + "cookies": false, + "type": "", + "demo": "storage\/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "schema": { + "$ref": "#\/definitions\/bucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBucket", + "group": "buckets", + "weight": 543, + "cookies": false, + "type": "", + "demo": "storage\/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<BUCKET_ID>" + }, + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "default": true, + "x-example": false + } + }, + "required": [ + "bucketId", + "name" + ] + } + } + ] + } + }, + "\/storage\/buckets\/{bucketId}": { + "get": { + "summary": "Get bucket", + "operationId": "storageGetBucket", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "schema": { + "$ref": "#\/definitions\/bucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBucket", + "group": "buckets", + "weight": 544, + "cookies": false, + "type": "", + "demo": "storage\/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update bucket", + "operationId": "storageUpdateBucket", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "schema": { + "$ref": "#\/definitions\/bucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBucket", + "group": "buckets", + "weight": 546, + "cookies": false, + "type": "", + "demo": "storage\/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete bucket", + "operationId": "storageDeleteBucket", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "storage" + ], + "description": "Delete a storage bucket by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBucket", + "group": "buckets", + "weight": 547, + "cookies": false, + "type": "", + "demo": "storage\/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "schema": { + "$ref": "#\/definitions\/fileList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "weight": 550, + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "weight": 548, + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "x-upload-id": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "formData" + }, + { + "name": "file", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "permissions", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "x-example": "[\"read(\"any\")\"]", + "in": "formData" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFile", + "group": "files", + "weight": 549, + "cookies": false, + "type": "", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFile", + "group": "files", + "weight": 551, + "cookies": false, + "type": "", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "weight": 552, + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileDownload", + "group": "files", + "weight": 554, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFilePreview", + "group": "files", + "weight": 553, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "default": "center", + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "", + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileView", + "group": "files", + "weight": 555, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/usage": { + "get": { + "summary": "Get storage usage stats", + "operationId": "storageGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, 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.\n", + "responses": { + "200": { + "description": "StorageUsage", + "schema": { + "$ref": "#\/definitions\/usageStorage" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 557, + "cookies": false, + "type": "", + "demo": "storage\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/storage\/{bucketId}\/usage": { + "get": { + "summary": "Get bucket usage stats", + "operationId": "storageGetBucketUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, 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.\n", + "responses": { + "200": { + "description": "UsageBuckets", + "schema": { + "$ref": "#\/definitions\/usageBuckets" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBucketUsage", + "group": null, + "weight": 558, + "cookies": false, + "type": "", + "demo": "storage\/get-bucket-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 265, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 261, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 332, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 328, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 329, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 330, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 331, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 333, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 267, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tablesdb\/list-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 262, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 263, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 264, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 272, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDBCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 268, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TABLE_ID>" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 269, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDBUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 270, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDBDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 271, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 277, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 278, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 279, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 280, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 281, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 282, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 283, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 284, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 285, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 286, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 287, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 288, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 289, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 290, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 291, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { + "post": { + "summary": "Create line column", + "operationId": "tablesDBCreateLineColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a geometric line column.", + "responses": { + "202": { + "description": "ColumnLine", + "schema": { + "$ref": "#\/definitions\/columnLine" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLineColumn", + "group": "columns", + "weight": 292, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { + "patch": { + "summary": "Update line column", + "operationId": "tablesDBUpdateLineColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a line column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnLine", + "schema": { + "$ref": "#\/definitions\/columnLine" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLineColumn", + "group": "columns", + "weight": 293, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + "post": { + "summary": "Create longtext column", + "operationId": "tablesDBCreateLongtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a longtext column.\n", + "responses": { + "202": { + "description": "ColumnLongtext", + "schema": { + "$ref": "#\/definitions\/columnLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextColumn", + "group": "columns", + "weight": 310, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { + "patch": { + "summary": "Update longtext column", + "operationId": "tablesDBUpdateLongtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnLongtext", + "schema": { + "$ref": "#\/definitions\/columnLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextColumn", + "group": "columns", + "weight": 311, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { + "post": { + "summary": "Create mediumtext column", + "operationId": "tablesDBCreateMediumtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a mediumtext column.\n", + "responses": { + "202": { + "description": "ColumnMediumtext", + "schema": { + "$ref": "#\/definitions\/columnMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextColumn", + "group": "columns", + "weight": 308, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext column", + "operationId": "tablesDBUpdateMediumtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnMediumtext", + "schema": { + "$ref": "#\/definitions\/columnMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextColumn", + "group": "columns", + "weight": 309, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { + "post": { + "summary": "Create point column", + "operationId": "tablesDBCreatePointColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a geometric point column.", + "responses": { + "202": { + "description": "ColumnPoint", + "schema": { + "$ref": "#\/definitions\/columnPoint" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPointColumn", + "group": "columns", + "weight": 294, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { + "patch": { + "summary": "Update point column", + "operationId": "tablesDBUpdatePointColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a point column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPoint", + "schema": { + "$ref": "#\/definitions\/columnPoint" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePointColumn", + "group": "columns", + "weight": 295, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { + "post": { + "summary": "Create polygon column", + "operationId": "tablesDBCreatePolygonColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a geometric polygon column.", + "responses": { + "202": { + "description": "ColumnPolygon", + "schema": { + "$ref": "#\/definitions\/columnPolygon" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPolygonColumn", + "group": "columns", + "weight": 296, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { + "patch": { + "summary": "Update polygon column", + "operationId": "tablesDBUpdatePolygonColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPolygon", + "schema": { + "$ref": "#\/definitions\/columnPolygon" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePolygonColumn", + "group": "columns", + "weight": 297, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 298, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "<RELATED_TABLE_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 300, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "deprecated": { + "since": "1.9.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for text columns, in number of characters.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 301, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { + "post": { + "summary": "Create text column", + "operationId": "tablesDBCreateTextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a text column.\n", + "responses": { + "202": { + "description": "ColumnText", + "schema": { + "$ref": "#\/definitions\/columnText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextColumn", + "group": "columns", + "weight": 306, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { + "patch": { + "summary": "Update text column", + "operationId": "tablesDBUpdateTextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnText", + "schema": { + "$ref": "#\/definitions\/columnText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextColumn", + "group": "columns", + "weight": 307, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 302, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 303, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { + "post": { + "summary": "Create varchar column", + "operationId": "tablesDBCreateVarcharColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a varchar column.\n", + "responses": { + "202": { + "description": "ColumnVarchar", + "schema": { + "$ref": "#\/definitions\/columnVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharColumn", + "group": "columns", + "weight": 304, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { + "patch": { + "summary": "Update varchar column", + "operationId": "tablesDBUpdateVarcharColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnVarchar", + "schema": { + "$ref": "#\/definitions\/columnVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharColumn", + "group": "columns", + "weight": 305, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar column.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/columnBoolean", + "integer": "#\/definitions\/columnInteger", + "double": "#\/definitions\/columnFloat", + "string": "#\/definitions\/columnString", + "datetime": "#\/definitions\/columnDatetime", + "relationship": "#\/definitions\/columnRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/columnBoolean": { + "type": "boolean" + }, + "#\/definitions\/columnInteger": { + "type": "integer" + }, + "#\/definitions\/columnFloat": { + "type": "double" + }, + "#\/definitions\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/columnDatetime": { + "type": "datetime" + }, + "#\/definitions\/columnRelationship": { + "type": "relationship" + }, + "#\/definitions\/columnString": { + "type": "string" + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 275, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDBDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 276, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 299, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [], + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 315, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 312, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "TablesDBIndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 313, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 314, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDBListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 273, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 324, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 316, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<ROW_ID>" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "put": { + "summary": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 321, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDBUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 319, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDBDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 323, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 317, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 320, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 318, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 322, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDBListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 325, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 327, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 326, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDBGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 274, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDBGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 266, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tablesdb\/get-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "schema": { + "$ref": "#\/definitions\/teamList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "teams", + "weight": 526, + "cookies": false, + "type": "", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "weight": 524, + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TEAM_ID>" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "default": [ + "owner" + ], + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + ] + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "weight": 525, + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "weight": 528, + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "weight": 527, + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/logs": { + "get": { + "summary": "List team logs", + "operationId": "teamsListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get the team 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": 537, + "cookies": false, + "type": "", + "demo": "teams\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 533, + "cookies": false, + "type": "", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMembership", + "group": "memberships", + "weight": 531, + "cookies": false, + "type": "", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "default": "", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMembership", + "group": "memberships", + "weight": 532, + "cookies": false, + "type": "", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "weight": 534, + "cookies": false, + "type": "", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + ] + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "weight": 535, + "cookies": false, + "type": "", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipStatus", + "group": "memberships", + "weight": 536, + "cookies": false, + "type": "", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "teams", + "weight": 529, + "cookies": false, + "type": "", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "teams", + "weight": 530, + "cookies": false, + "type": "", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "List tokens", + "operationId": "tokensList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Resource Tokens List", + "schema": { + "$ref": "#\/definitions\/resourceTokenList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "files", + "weight": 540, + "cookies": false, + "type": "", + "demo": "tokens\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file token", + "operationId": "tokensCreateFileToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", + "responses": { + "201": { + "description": "ResourceToken", + "schema": { + "$ref": "#\/definitions\/resourceToken" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFileToken", + "group": "files", + "weight": 538, + "cookies": false, + "type": "", + "demo": "tokens\/create-file-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "Token expiry date", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tokens\/{tokenId}": { + "get": { + "summary": "Get token", + "operationId": "tokensGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "Get a token by its unique ID.", + "responses": { + "200": { + "description": "ResourceToken", + "schema": { + "$ref": "#\/definitions\/resourceToken" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tokens", + "weight": 539, + "cookies": false, + "type": "", + "demo": "tokens\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "type": "string", + "x-example": "<TOKEN_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update token", + "operationId": "tokensUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "responses": { + "200": { + "description": "ResourceToken", + "schema": { + "$ref": "#\/definitions\/resourceToken" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tokens", + "weight": 541, + "cookies": false, + "type": "", + "demo": "tokens\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "type": "string", + "x-example": "<TOKEN_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "File token expiry date", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete token", + "operationId": "tokensDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tokens" + ], + "description": "Delete a token by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tokens", + "weight": 542, + "cookies": false, + "type": "", + "demo": "tokens\/delete.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "type": "string", + "x-example": "<TOKEN_ID>", + "in": "path" + } + ] + } + }, + "\/users": { + "get": { + "summary": "List users", + "operationId": "usersList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "schema": { + "$ref": "#\/definitions\/userList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "users", + "weight": 71, + "cookies": false, + "type": "", + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user", + "operationId": "usersCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "users", + "weight": 62, + "cookies": false, + "type": "", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "default": "", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + ] + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArgon2User", + "group": "users", + "weight": 65, + "cookies": false, + "type": "", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Argon2.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBcryptUser", + "group": "users", + "weight": 63, + "cookies": false, + "type": "", + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Bcrypt.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 79, + "cookies": false, + "type": "", + "demo": "users\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 103, + "cookies": false, + "type": "", + "demo": "users\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMD5User", + "group": "users", + "weight": 64, + "cookies": false, + "type": "", + "demo": "users\/create-md-5-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using MD5.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPHPassUser", + "group": "users", + "weight": 67, + "cookies": false, + "type": "", + "demo": "users\/create-ph-pass-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using PHPass.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptUser", + "group": "users", + "weight": 68, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt.", + "default": null, + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + ] + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptModifiedUser", + "group": "users", + "weight": 69, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-modified-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt Modified.", + "default": null, + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "default": null, + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + ] + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSHAUser", + "group": "users", + "weight": 66, + "cookies": false, + "type": "", + "demo": "users\/create-sha-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using SHA.", + "default": null, + "x-example": "password", + "format": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "default": "", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/usage": { + "get": { + "summary": "Get users usage stats", + "operationId": "usersGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. 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.\n", + "responses": { + "200": { + "description": "UsageUsers", + "schema": { + "$ref": "#\/definitions\/usageUsers" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 105, + "cookies": false, + "type": "", + "demo": "users\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/users\/{userId}": { + "get": { + "summary": "Get user", + "operationId": "usersGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "users", + "weight": 72, + "cookies": false, + "type": "", + "demo": "users\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user", + "operationId": "usersDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "users", + "weight": 101, + "cookies": false, + "type": "", + "demo": "users\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "users", + "weight": 86, + "cookies": false, + "type": "", + "demo": "users\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + ] + } + }, + "\/users\/{userId}\/impersonator": { + "patch": { + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateImpersonator", + "group": "users", + "weight": 82, + "cookies": false, + "type": "", + "demo": "users\/update-impersonator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "default": null, + "x-example": false + } + }, + "required": [ + "impersonator" + ] + } + } + ] + } + }, + "\/users\/{userId}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "sessions", + "weight": 104, + "cookies": false, + "type": "", + "demo": "users\/create-jwt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "default": "", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" + } + } + } + } + ] + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": "users", + "weight": 81, + "cookies": false, + "type": "", + "demo": "users\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + ] + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user 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": 77, + "cookies": false, + "type": "", + "demo": "users\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user membership list by its unique ID.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 76, + "cookies": false, + "type": "", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfa", + "group": "users", + "weight": 91, + "cookies": false, + "type": "", + "demo": "users\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 96, + "cookies": false, + "type": "", + "demo": "users\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 92, + "cookies": false, + "type": "", + "demo": "users\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 93, + "cookies": false, + "type": "", + "demo": "users\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 95, + "cookies": false, + "type": "", + "demo": "users\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 94, + "cookies": false, + "type": "", + "demo": "users\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "users", + "weight": 84, + "cookies": false, + "type": "", + "demo": "users\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + } + }, + "\/users\/{userId}\/password": { + "patch": { + "summary": "Update password", + "operationId": "usersUpdatePassword", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "users", + "weight": 85, + "cookies": false, + "type": "", + "demo": "users\/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "users", + "weight": 87, + "cookies": false, + "type": "", + "demo": "users\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "number" + ] + } + } + ] + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "users", + "weight": 73, + "cookies": false, + "type": "", + "demo": "users\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user preferences", + "operationId": "usersUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "users", + "weight": 89, + "cookies": false, + "type": "", + "demo": "users\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/users\/{userId}\/sessions": { + "get": { + "summary": "List user sessions", + "operationId": "usersListSessions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 75, + "cookies": false, + "type": "", + "demo": "users\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.read", + "sessions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 97, + "cookies": false, + "type": "", + "demo": "users\/create-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 100, + "cookies": false, + "type": "", + "demo": "users\/delete-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/sessions\/{sessionId}": { + "delete": { + "summary": "Delete user session", + "operationId": "usersDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a user sessions by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 99, + "cookies": false, + "type": "", + "demo": "users\/delete-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/status": { + "patch": { + "summary": "Update user status", + "operationId": "usersUpdateStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "users", + "weight": 80, + "cookies": false, + "type": "", + "demo": "users\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "default": null, + "x-example": false + } + }, + "required": [ + "status" + ] + } + } + ] + } + }, + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "targets", + "weight": 78, + "cookies": false, + "type": "", + "demo": "users\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTarget", + "group": "targets", + "weight": 70, + "cookies": false, + "type": "", + "demo": "users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + ] + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTarget", + "group": "targets", + "weight": 74, + "cookies": false, + "type": "", + "demo": "users\/get-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTarget", + "group": "targets", + "weight": 90, + "cookies": false, + "type": "", + "demo": "users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": "", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTarget", + "group": "targets", + "weight": 102, + "cookies": false, + "type": "", + "demo": "users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createToken", + "group": "sessions", + "weight": 98, + "cookies": false, + "type": "", + "demo": "users\/create-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "default": 6, + "x-example": 4, + "format": "int32" + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "default": 900, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "users", + "weight": 88, + "cookies": false, + "type": "", + "demo": "users\/update-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + ] + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "users", + "weight": 83, + "cookies": false, + "type": "", + "demo": "users\/update-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/detections": { + "post": { + "summary": "Create repository detection", + "operationId": "vcsCreateRepositoryDetection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "DetectionRuntime, or DetectionFramework", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/detectionRuntime" + }, + { + "$ref": "#\/definitions\/detectionFramework" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/definitions\/detectionRuntime", + "framework": "#\/definitions\/detectionFramework" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRepositoryDetection", + "group": "repositories", + "weight": 570, + "cookies": false, + "type": "", + "demo": "vcs\/create-repository-detection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerRepositoryId": { + "type": "string", + "description": "Repository Id", + "default": null, + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "type": { + "type": "string", + "description": "Detector type. Must be one of the following: runtime, framework", + "default": null, + "x-example": "runtime", + "enum": [ + "runtime", + "framework" + ], + "x-enum-name": "VCSDetectionType", + "x-enum-keys": [] + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to Root Directory", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + } + }, + "required": [ + "providerRepositoryId", + "type" + ] + } + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { + "get": { + "summary": "List repositories", + "operationId": "vcsListRepositories", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", + "responses": { + "200": { + "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/providerRepositoryRuntimeList" + }, + { + "$ref": "#\/definitions\/providerRepositoryFrameworkList" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/definitions\/providerRepositoryRuntimeList", + "framework": "#\/definitions\/providerRepositoryFrameworkList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRepositories", + "group": "repositories", + "weight": 567, + "cookies": false, + "type": "", + "demo": "vcs\/list-repositories.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Detector type. Must be one of the following: runtime, framework", + "required": true, + "type": "string", + "x-example": "runtime", + "enum": [ + "runtime", + "framework" + ], + "x-enum-name": "VCSDetectionType", + "x-enum-keys": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "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" + } + ] + }, + "post": { + "summary": "Create repository", + "operationId": "vcsCreateRepository", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", + "responses": { + "200": { + "description": "ProviderRepository", + "schema": { + "$ref": "#\/definitions\/providerRepository" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRepository", + "group": "repositories", + "weight": 565, + "cookies": false, + "type": "", + "demo": "vcs\/create-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name (slug)", + "default": null, + "x-example": "<NAME>" + }, + "private": { + "type": "boolean", + "description": "Mark repository public or private", + "default": null, + "x-example": false + } + }, + "required": [ + "name", + "private" + ] + } + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { + "get": { + "summary": "Get repository", + "operationId": "vcsGetRepository", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", + "responses": { + "200": { + "description": "ProviderRepository", + "schema": { + "$ref": "#\/definitions\/providerRepository" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRepository", + "group": "repositories", + "weight": 566, + "cookies": false, + "type": "", + "demo": "vcs\/get-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { + "get": { + "summary": "List repository branches", + "operationId": "vcsListRepositoryBranches", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", + "responses": { + "200": { + "description": "Branches List", + "schema": { + "$ref": "#\/definitions\/branchList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRepositoryBranches", + "group": "repositories", + "weight": 568, + "cookies": false, + "type": "", + "demo": "vcs\/list-repository-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { + "get": { + "summary": "Get files and directories of a VCS repository", + "operationId": "vcsGetRepositoryContents", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "VCS Content List", + "schema": { + "$ref": "#\/definitions\/vcsContentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRepositoryContents", + "group": "repositories", + "weight": 569, + "cookies": false, + "type": "", + "demo": "vcs\/get-repository-contents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "type": "string", + "x-example": "<PROVIDER_REPOSITORY_ID>", + "in": "path" + }, + { + "name": "providerRootDirectory", + "description": "Path to get contents of nested directory", + "required": false, + "type": "string", + "x-example": "<PROVIDER_ROOT_DIRECTORY>", + "default": "", + "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "type": "string", + "x-example": "<PROVIDER_REFERENCE>", + "default": "", + "in": "query" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { + "patch": { + "summary": "Update external deployment (authorize)", + "operationId": "vcsUpdateExternalDeployments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateExternalDeployments", + "group": "repositories", + "weight": 561, + "cookies": false, + "type": "", + "demo": "vcs\/update-external-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + }, + { + "name": "repositoryId", + "description": "VCS Repository Id", + "required": true, + "type": "string", + "x-example": "<REPOSITORY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerPullRequestId": { + "type": "string", + "description": "GitHub Pull Request Id", + "default": null, + "x-example": "<PROVIDER_PULL_REQUEST_ID>" + } + }, + "required": [ + "providerPullRequestId" + ] + } + } + ] + } + }, + "\/vcs\/installations": { + "get": { + "summary": "List installations", + "operationId": "vcsListInstallations", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", + "responses": { + "200": { + "description": "Installations List", + "schema": { + "$ref": "#\/definitions\/installationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": "installations", + "weight": 563, + "cookies": false, + "type": "", + "demo": "vcs\/list-installations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/vcs\/installations\/{installationId}": { + "get": { + "summary": "Get installation", + "operationId": "vcsGetInstallation", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vcs" + ], + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", + "responses": { + "200": { + "description": "Installation", + "schema": { + "$ref": "#\/definitions\/installation" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": "installations", + "weight": 562, + "cookies": false, + "type": "", + "demo": "vcs\/get-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete installation", + "operationId": "vcsDeleteInstallation", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vcs" + ], + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": "installations", + "weight": 564, + "cookies": false, + "type": "", + "demo": "vcs\/delete-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "type": "string", + "x-example": "<INSTALLATION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb": { + "get": { + "summary": "List databases", + "operationId": "vectorsDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "vectorsdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "vectorsdb", + "weight": 368, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/vectorsdb\/embeddings\/text": { + "post": { + "summary": "Create Text Embeddings", + "operationId": "vectorsDBCreateTextEmbeddings", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "200": { + "description": "Embedding list", + "schema": { + "$ref": "#\/definitions\/embeddingList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextEmbeddings", + "group": "documents", + "weight": 394, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createTextEmbeddings", + "namespace": "vectorsDB", + "desc": "Create Text Embedding", + "auth": { + "Project": [] + }, + "parameters": [ + "texts", + "model" + ], + "required": [ + "texts" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/embeddingList" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-text-embeddings.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "texts": { + "type": "array", + "description": "Array of text to generate embeddings.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "model": { + "type": "string", + "description": "The embedding model to use for generating vector embeddings.", + "default": "embeddinggemma", + "x-example": "embeddinggemma", + "enum": [ + "embeddinggemma" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "texts" + ] + } + } + ] + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 399, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 395, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 396, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 397, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 398, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 400, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/vectorsdb\/usage": { + "get": { + "summary": "Get VectorsDB usage stats", + "operationId": "vectorsDBListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageVectorsDBs", + "schema": { + "$ref": "#\/definitions\/usageVectorsDBs" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-usage.md", + "methods": [ + { + "name": "listUsage", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageVectorsDBs" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "vectorsdb\/list-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/vectorsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "vectorsDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "vectorsdb", + "weight": 369, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "vectorsdb", + "weight": 370, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "vectorsdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "vectorsDBListCollections", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "VectorsDB Collections List", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollectionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 379, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "vectorsDBCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "VectorsDB Collection", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 375, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "collectionId", + "name", + "dimension" + ] + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 376, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 377, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimensions.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 378, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 389, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 385, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "put": { + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 392, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 391, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 393, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 388, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 387, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 386, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 390, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 384, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 381, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "hnsw_euclidean", + "enum": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ], + "x-enum-name": "VectorsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 382, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "vectorsDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 383, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/usage": { + "get": { + "summary": "Get collection usage stats", + "operationId": "vectorsDBGetCollectionUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageCollection", + "schema": { + "$ref": "#\/definitions\/usageCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollectionUsage", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-collection-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection-usage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/usage": { + "get": { + "summary": "Get VectorsDB usage stats", + "operationId": "vectorsDBGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageVectorsDB", + "schema": { + "$ref": "#\/definitions\/usageVectorsDB" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-database-usage.md", + "methods": [ + { + "name": "getUsage", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageVectorsDB" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "vectorsdb\/get-usage.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "webhooksList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Webhooks List", + "schema": { + "$ref": "#\/definitions\/webhookList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 573, + "cookies": false, + "type": "", + "demo": "webhooks\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create webhook", + "operationId": "webhooksCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", + "responses": { + "201": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 572, + "cookies": false, + "type": "", + "demo": "webhooks\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "webhookId": { + "type": "string", + "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<WEBHOOK_ID>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": false, + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_PASSWORD>" + }, + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + } + }, + "required": [ + "webhookId", + "url", + "name", + "events" + ] + } + } + ] + } + }, + "\/webhooks\/{webhookId}": { + "get": { + "summary": "Get webhook", + "operationId": "webhooksGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 574, + "cookies": false, + "type": "", + "demo": "webhooks\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update webhook", + "operationId": "webhooksUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 576, + "cookies": false, + "type": "", + "demo": "webhooks\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "default": null, + "x-example": null + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": false, + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_PASSWORD>" + } + }, + "required": [ + "name", + "url", + "events" + ] + } + } + ] + }, + "delete": { + "summary": "Delete webhook", + "operationId": "webhooksDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "webhooks" + ], + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 575, + "cookies": false, + "type": "", + "demo": "webhooks\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + } + ] + } + }, + "\/webhooks\/{webhookId}\/secret": { + "patch": { + "summary": "Update webhook secret key", + "operationId": "webhooksUpdateSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSecret", + "group": null, + "weight": 577, + "cookies": false, + "type": "", + "demo": "webhooks\/update-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + } + } + } + } + ] + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + } + ], + "definitions": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/document" + }, + "x-example": "" + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "type": "object", + "$ref": "#\/definitions\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ], + "example": { + "total": 5, + "tables": "" + } + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "type": "object", + "$ref": "#\/definitions\/collection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "type": "object", + "$ref": "#\/definitions\/database" + }, + "x-example": "" + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users that matched your query.", + "x-example": 5, + "format": "int32" + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { + "type": "object", + "$ref": "#\/definitions\/user" + }, + "x-example": "" + } + }, + "required": [ + "total", + "users" + ], + "example": { + "total": 5, + "users": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/session" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "type": "object", + "$ref": "#\/definitions\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "type": "object", + "$ref": "#\/definitions\/log" + }, + "x-example": "" + } + }, + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "type": "object", + "$ref": "#\/definitions\/file" + }, + "x-example": "" + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/bucket" + }, + "x-example": "" + } + }, + "required": [ + "total", + "buckets" + ], + "example": { + "total": 5, + "buckets": "" + } + }, + "resourceTokenList": { + "description": "Resource Tokens List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "type": "object", + "$ref": "#\/definitions\/resourceToken" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "type": "object", + "$ref": "#\/definitions\/team" + }, + "x-example": "" + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "type": "object", + "$ref": "#\/definitions\/membership" + }, + "x-example": "" + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "siteList": { + "description": "Sites List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sites that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "List of sites.", + "items": { + "type": "object", + "$ref": "#\/definitions\/site" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sites" + ], + "example": { + "total": 5, + "sites": "" + } + }, + "templateSiteList": { + "description": "Site Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateSite" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/function" + }, + "x-example": "" + } + }, + "required": [ + "total", + "functions" + ], + "example": { + "total": 5, + "functions": "" + } + }, + "templateFunctionList": { + "description": "Function Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateFunction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "installationList": { + "description": "Installations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "type": "object", + "$ref": "#\/definitions\/installation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "providerRepositoryFrameworkList": { + "description": "Framework Provider Repositories List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworkProviderRepositories that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworkProviderRepositories": { + "type": "array", + "description": "List of frameworkProviderRepositories.", + "items": { + "type": "object", + "$ref": "#\/definitions\/providerRepositoryFramework" + }, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Provider repository list type.", + "x-example": "framework" + } + }, + "required": [ + "total", + "frameworkProviderRepositories", + "type" + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "", + "type": "framework" + } + }, + "providerRepositoryRuntimeList": { + "description": "Runtime Provider Repositories List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimeProviderRepositories that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimeProviderRepositories": { + "type": "array", + "description": "List of runtimeProviderRepositories.", + "items": { + "type": "object", + "$ref": "#\/definitions\/providerRepositoryRuntime" + }, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Provider repository list type.", + "x-example": "runtime" + } + }, + "required": [ + "total", + "runtimeProviderRepositories", + "type" + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "", + "type": "runtime" + } + }, + "branchList": { + "description": "Branches List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of branches that matched your query.", + "x-example": 5, + "format": "int32" + }, + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "type": "object", + "$ref": "#\/definitions\/branch" + }, + "x-example": "" + } + }, + "required": [ + "total", + "branches" + ], + "example": { + "total": 5, + "branches": "" + } + }, + "frameworkList": { + "description": "Frameworks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks.", + "items": { + "type": "object", + "$ref": "#\/definitions\/framework" + }, + "x-example": "" + } + }, + "required": [ + "total", + "frameworks" + ], + "example": { + "total": 5, + "frameworks": "" + } + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/runtime" + }, + "x-example": "" + } + }, + "required": [ + "total", + "runtimes" + ], + "example": { + "total": 5, + "runtimes": "" + } + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments that matched your query.", + "x-example": 5, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { + "type": "object", + "$ref": "#\/definitions\/deployment" + }, + "x-example": "" + } + }, + "required": [ + "total", + "deployments" + ], + "example": { + "total": 5, + "deployments": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/execution" + }, + "x-example": "" + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "projectList": { + "description": "Projects List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of projects that matched your query.", + "x-example": 5, + "format": "int32" + }, + "projects": { + "type": "array", + "description": "List of projects.", + "items": { + "type": "object", + "$ref": "#\/definitions\/project" + }, + "x-example": "" + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { + "type": "object", + "$ref": "#\/definitions\/webhook" + }, + "x-example": "" + } + }, + "required": [ + "total", + "webhooks" + ], + "example": { + "total": 5, + "webhooks": "" + } + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/key" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } + }, + "devKeyList": { + "description": "Dev Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of devKeys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "devKeys": { + "type": "array", + "description": "List of devKeys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/devKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "devKeys" + ], + "example": { + "total": 5, + "devKeys": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "type": "object", + "$ref": "#\/definitions\/country" + }, + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/continent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/language" + }, + "x-example": "" + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "type": "object", + "$ref": "#\/definitions\/currency" + }, + "x-example": "" + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "type": "object", + "$ref": "#\/definitions\/phone" + }, + "x-example": "" + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ], + "example": { + "total": 5, + "variables": "" + } + }, + "mockNumberList": { + "description": "Mock Numbers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of mockNumbers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "mockNumbers": { + "type": "array", + "description": "List of mockNumbers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/mockNumber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "mockNumbers" + ], + "example": { + "total": 5, + "mockNumbers": "" + } + }, + "policyList": { + "description": "Policies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies in the given project.", + "x-example": 9, + "format": "int32" + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/policyPasswordDictionary" + }, + { + "$ref": "#\/definitions\/policyPasswordHistory" + }, + { + "$ref": "#\/definitions\/policyPasswordPersonalData" + }, + { + "$ref": "#\/definitions\/policySessionAlert" + }, + { + "$ref": "#\/definitions\/policySessionDuration" + }, + { + "$ref": "#\/definitions\/policySessionInvalidation" + }, + { + "$ref": "#\/definitions\/policySessionLimit" + }, + { + "$ref": "#\/definitions\/policyUserLimit" + }, + { + "$ref": "#\/definitions\/policyMembershipPrivacy" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/definitions\/policyPasswordDictionary", + "password-history": "#\/definitions\/policyPasswordHistory", + "password-personal-data": "#\/definitions\/policyPasswordPersonalData", + "session-alert": "#\/definitions\/policySessionAlert", + "session-duration": "#\/definitions\/policySessionDuration", + "session-invalidation": "#\/definitions\/policySessionInvalidation", + "session-limit": "#\/definitions\/policySessionLimit", + "user-limit": "#\/definitions\/policyUserLimit", + "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "policies" + ], + "example": { + "total": 9, + "policies": "" + } + }, + "emailTemplateList": { + "description": "Email Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "type": "object", + "$ref": "#\/definitions\/emailTemplate" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "healthStatusList": { + "description": "Status List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of statuses that matched your query.", + "x-example": 5, + "format": "int32" + }, + "statuses": { + "type": "array", + "description": "List of statuses.", + "items": { + "type": "object", + "$ref": "#\/definitions\/healthStatus" + }, + "x-example": "" + } + }, + "required": [ + "total", + "statuses" + ], + "example": { + "total": 5, + "statuses": "" + } + }, + "proxyRuleList": { + "description": "Rule List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "type": "object", + "$ref": "#\/definitions\/proxyRule" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rules" + ], + "example": { + "total": 5, + "rules": "" + } + }, + "scheduleList": { + "description": "Schedules List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of schedules that matched your query.", + "x-example": 5, + "format": "int32" + }, + "schedules": { + "type": "array", + "description": "List of schedules.", + "items": { + "type": "object", + "$ref": "#\/definitions\/schedule" + }, + "x-example": "" + } + }, + "required": [ + "total", + "schedules" + ], + "example": { + "total": 5, + "schedules": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ], + "example": { + "total": 5, + "messages": "" + } + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "type": "object", + "$ref": "#\/definitions\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ], + "example": { + "total": 5, + "topics": "" + } + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ], + "example": { + "total": 5, + "subscribers": "" + } + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ], + "example": { + "total": 5, + "targets": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "migrationList": { + "description": "Migrations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of migrations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "migrations": { + "type": "array", + "description": "List of migrations.", + "items": { + "type": "object", + "$ref": "#\/definitions\/migration" + }, + "x-example": "" + } + }, + "required": [ + "total", + "migrations" + ], + "example": { + "total": 5, + "migrations": "" + } + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "type": "object", + "$ref": "#\/definitions\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ], + "example": { + "total": 5, + "specifications": "" + } + }, + "vcsContentList": { + "description": "VCS Content List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of contents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "contents": { + "type": "array", + "description": "List of contents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/vcsContent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "contents" + ], + "example": { + "total": 5, + "contents": "" + } + }, + "vectorsdbCollectionList": { + "description": "VectorsDB Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "type": "object", + "$ref": "#\/definitions\/vectorsdbCollection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "embeddingList": { + "description": "Embedding list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of embeddings that matched your query.", + "x-example": 5, + "format": "int32" + }, + "embeddings": { + "type": "array", + "description": "List of embeddings.", + "items": { + "type": "object", + "$ref": "#\/definitions\/embedding" + }, + "x-example": "" + } + }, + "required": [ + "total", + "embeddings" + ], + "example": { + "total": 5, + "embeddings": "" + } + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb", + "documentsdb", + "vectorsdb" + ] + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } + }, + "embedding": { + "description": "Embedding", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Embedding model used to generate embeddings.", + "x-example": "embeddinggemma" + }, + "dimension": { + "type": "integer", + "description": "Number of dimensions for each embedding vector.", + "x-example": 768, + "format": "int32" + }, + "embedding": { + "type": "array", + "description": "Embedding vector values. If an error occurs, this will be an empty array.", + "items": { + "type": "number", + "format": "double" + }, + "x-example": [ + 0.01, + 0.02, + 0.03 + ] + }, + "error": { + "type": "string", + "description": "Error message if embedding generation fails. Empty string if no error.", + "x-example": "Error message" + } + }, + "required": [ + "model", + "dimension", + "embedding", + "error" + ], + "example": { + "model": "embeddinggemma", + "dimension": 768, + "embedding": [ + 0.01, + 0.02, + 0.03 + ], + "error": "Error message" + } + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/attributeBoolean" + }, + { + "$ref": "#\/definitions\/attributeInteger" + }, + { + "$ref": "#\/definitions\/attributeFloat" + }, + { + "$ref": "#\/definitions\/attributeEmail" + }, + { + "$ref": "#\/definitions\/attributeEnum" + }, + { + "$ref": "#\/definitions\/attributeUrl" + }, + { + "$ref": "#\/definitions\/attributeIp" + }, + { + "$ref": "#\/definitions\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributePoint" + }, + { + "$ref": "#\/definitions\/attributeLine" + }, + { + "$ref": "#\/definitions\/attributePolygon" + }, + { + "$ref": "#\/definitions\/attributeVarchar" + }, + { + "$ref": "#\/definitions\/attributeText" + }, + { + "$ref": "#\/definitions\/attributeMediumtext" + }, + { + "$ref": "#\/definitions\/attributeLongtext" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/attributeBoolean", + "integer": "#\/definitions\/attributeInteger", + "double": "#\/definitions\/attributeFloat", + "string": "#\/definitions\/attributeString", + "datetime": "#\/definitions\/attributeDatetime", + "relationship": "#\/definitions\/attributeRelationship", + "point": "#\/definitions\/attributePoint", + "linestring": "#\/definitions\/attributeLine", + "polygon": "#\/definitions\/attributePolygon", + "varchar": "#\/definitions\/attributeVarchar", + "text": "#\/definitions\/attributeText", + "mediumtext": "#\/definitions\/attributeMediumtext", + "longtext": "#\/definitions\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/attributeBoolean": { + "type": "boolean" + }, + "#\/definitions\/attributeInteger": { + "type": "integer" + }, + "#\/definitions\/attributeFloat": { + "type": "double" + }, + "#\/definitions\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/attributeDatetime": { + "type": "datetime" + }, + "#\/definitions\/attributeRelationship": { + "type": "relationship" + }, + "#\/definitions\/attributePoint": { + "type": "point" + }, + "#\/definitions\/attributeLine": { + "type": "linestring" + }, + "#\/definitions\/attributePolygon": { + "type": "polygon" + }, + "#\/definitions\/attributeVarchar": { + "type": "varchar" + }, + "#\/definitions\/attributeText": { + "type": "text" + }, + "#\/definitions\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/attributeLongtext": { + "type": "longtext" + }, + "#\/definitions\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "x-example": 5, + "format": "int32" + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/attributeBoolean" + }, + { + "$ref": "#\/definitions\/attributeInteger" + }, + { + "$ref": "#\/definitions\/attributeFloat" + }, + { + "$ref": "#\/definitions\/attributeEmail" + }, + { + "$ref": "#\/definitions\/attributeEnum" + }, + { + "$ref": "#\/definitions\/attributeUrl" + }, + { + "$ref": "#\/definitions\/attributeIp" + }, + { + "$ref": "#\/definitions\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributePoint" + }, + { + "$ref": "#\/definitions\/attributeLine" + }, + { + "$ref": "#\/definitions\/attributePolygon" + }, + { + "$ref": "#\/definitions\/attributeVarchar" + }, + { + "$ref": "#\/definitions\/attributeText" + }, + { + "$ref": "#\/definitions\/attributeMediumtext" + }, + { + "$ref": "#\/definitions\/attributeLongtext" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/attributeBoolean", + "integer": "#\/definitions\/attributeInteger", + "double": "#\/definitions\/attributeFloat", + "string": "#\/definitions\/attributeString", + "datetime": "#\/definitions\/attributeDatetime", + "relationship": "#\/definitions\/attributeRelationship", + "point": "#\/definitions\/attributePoint", + "linestring": "#\/definitions\/attributeLine", + "polygon": "#\/definitions\/attributePolygon", + "varchar": "#\/definitions\/attributeVarchar", + "text": "#\/definitions\/attributeText", + "mediumtext": "#\/definitions\/attributeMediumtext", + "longtext": "#\/definitions\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/attributeBoolean": { + "type": "boolean" + }, + "#\/definitions\/attributeInteger": { + "type": "integer" + }, + "#\/definitions\/attributeFloat": { + "type": "double" + }, + "#\/definitions\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/attributeDatetime": { + "type": "datetime" + }, + "#\/definitions\/attributeRelationship": { + "type": "relationship" + }, + "#\/definitions\/attributePoint": { + "type": "point" + }, + "#\/definitions\/attributeLine": { + "type": "linestring" + }, + "#\/definitions\/attributePolygon": { + "type": "polygon" + }, + "#\/definitions\/attributeVarchar": { + "type": "varchar" + }, + "#\/definitions\/attributeText": { + "type": "text" + }, + "#\/definitions\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/attributeLongtext": { + "type": "longtext" + }, + "#\/definitions\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "attributes" + ], + "example": { + "total": 5, + "attributes": "" + } + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "attributePoint": { + "description": "AttributePoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + 0, + 0 + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "attributeLine": { + "description": "AttributeLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "attributePolygon": { + "description": "AttributePolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "attributeVarchar": { + "description": "AttributeVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeText": { + "description": "AttributeText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeMediumtext": { + "description": "AttributeMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeLongtext": { + "description": "AttributeLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "usageDocumentsDB": { + "description": "UsageDocumentsDB", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of database reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of database writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "documents", + "storage", + "databaseReads", + "databaseWrites" + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "documentsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "documents": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } + }, + "vectorsdbCollection": { + "description": "VectorsDB Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/attributeObject" + }, + { + "$ref": "#\/definitions\/attributeVector" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "object": "#\/definitions\/attributeObject", + "vector": "#\/definitions\/attributeVector" + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed", + "dimension" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500, + "dimension": 1536 + } + }, + "attributeObject": { + "description": "AttributeObject", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeVector": { + "description": "AttributeVector", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Vector dimensions.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 1536 + } + }, + "usageVectorsDBs": { + "description": "UsageVectorsDBs", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB databases.", + "x-example": 0, + "format": "int32" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated storage in bytes.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of database reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of database writes.", + "x-example": 0, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "Aggregated number of databases per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "databasesTotal", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "databases", + "collections", + "documents", + "storage", + "databasesReads", + "databasesWrites" + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "documentsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "documents": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } + }, + "usageVectorsDB": { + "description": "UsageVectorsDB", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of database reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of database writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "documentsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "documents", + "storage", + "databaseReads", + "databaseWrites" + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "documentsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "documents": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } + }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnPoint" + }, + { + "$ref": "#\/definitions\/columnLine" + }, + { + "$ref": "#\/definitions\/columnPolygon" + }, + { + "$ref": "#\/definitions\/columnVarchar" + }, + { + "$ref": "#\/definitions\/columnText" + }, + { + "$ref": "#\/definitions\/columnMediumtext" + }, + { + "$ref": "#\/definitions\/columnLongtext" + }, + { + "$ref": "#\/definitions\/columnString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/columnBoolean", + "integer": "#\/definitions\/columnInteger", + "double": "#\/definitions\/columnFloat", + "string": "#\/definitions\/columnString", + "datetime": "#\/definitions\/columnDatetime", + "relationship": "#\/definitions\/columnRelationship", + "point": "#\/definitions\/columnPoint", + "linestring": "#\/definitions\/columnLine", + "polygon": "#\/definitions\/columnPolygon", + "varchar": "#\/definitions\/columnVarchar", + "text": "#\/definitions\/columnText", + "mediumtext": "#\/definitions\/columnMediumtext", + "longtext": "#\/definitions\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/columnBoolean": { + "type": "boolean" + }, + "#\/definitions\/columnInteger": { + "type": "integer" + }, + "#\/definitions\/columnFloat": { + "type": "double" + }, + "#\/definitions\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/columnDatetime": { + "type": "datetime" + }, + "#\/definitions\/columnRelationship": { + "type": "relationship" + }, + "#\/definitions\/columnPoint": { + "type": "point" + }, + "#\/definitions\/columnLine": { + "type": "linestring" + }, + "#\/definitions\/columnPolygon": { + "type": "polygon" + }, + "#\/definitions\/columnVarchar": { + "type": "varchar" + }, + "#\/definitions\/columnText": { + "type": "text" + }, + "#\/definitions\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/columnLongtext": { + "type": "longtext" + }, + "#\/definitions\/columnString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum row size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used row size in bytes based on defined columns.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnPoint" + }, + { + "$ref": "#\/definitions\/columnLine" + }, + { + "$ref": "#\/definitions\/columnPolygon" + }, + { + "$ref": "#\/definitions\/columnVarchar" + }, + { + "$ref": "#\/definitions\/columnText" + }, + { + "$ref": "#\/definitions\/columnMediumtext" + }, + { + "$ref": "#\/definitions\/columnLongtext" + }, + { + "$ref": "#\/definitions\/columnString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/columnBoolean", + "integer": "#\/definitions\/columnInteger", + "double": "#\/definitions\/columnFloat", + "string": "#\/definitions\/columnString", + "datetime": "#\/definitions\/columnDatetime", + "relationship": "#\/definitions\/columnRelationship", + "point": "#\/definitions\/columnPoint", + "linestring": "#\/definitions\/columnLine", + "polygon": "#\/definitions\/columnPolygon", + "varchar": "#\/definitions\/columnVarchar", + "text": "#\/definitions\/columnText", + "mediumtext": "#\/definitions\/columnMediumtext", + "longtext": "#\/definitions\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/columnBoolean": { + "type": "boolean" + }, + "#\/definitions\/columnInteger": { + "type": "integer" + }, + "#\/definitions\/columnFloat": { + "type": "double" + }, + "#\/definitions\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/columnDatetime": { + "type": "datetime" + }, + "#\/definitions\/columnRelationship": { + "type": "relationship" + }, + "#\/definitions\/columnPoint": { + "type": "point" + }, + "#\/definitions\/columnLine": { + "type": "linestring" + }, + "#\/definitions\/columnPolygon": { + "type": "polygon" + }, + "#\/definitions\/columnVarchar": { + "type": "varchar" + }, + "#\/definitions\/columnText": { + "type": "text" + }, + "#\/definitions\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/columnLongtext": { + "type": "longtext" + }, + "#\/definitions\/columnString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ], + "example": { + "total": 5, + "columns": "" + } + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "columnPoint": { + "description": "ColumnPoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + 0, + 0 + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "columnLine": { + "description": "ColumnLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "columnPolygon": { + "description": "ColumnPolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "columnVarchar": { + "description": "ColumnVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnText": { + "description": "ColumnText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnMediumtext": { + "description": "ColumnMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnLongtext": { + "description": "ColumnLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "index": { + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index attributes length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } + }, + "columnIndex": { + "description": "Index", + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "columns", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Presence sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "userInternalId": { + "type": "string", + "description": "User internal ID.", + "x-example": "1" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "x-nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "additionalProperties": true, + "x-additional-properties-key": "metadata", + "required": [ + "$id", + "$sequence", + "$createdAt", + "$updatedAt", + "$permissions", + "userInternalId", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userInternalId": "1", + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "x-nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "x-nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/algoArgon2" + }, + { + "$ref": "#\/definitions\/algoScrypt" + }, + { + "$ref": "#\/definitions\/algoScryptModified" + }, + { + "$ref": "#\/definitions\/algoBcrypt" + }, + { + "$ref": "#\/definitions\/algoPhpass" + }, + { + "$ref": "#\/definitions\/algoSha" + }, + { + "$ref": "#\/definitions\/algoMd5" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/definitions\/algoArgon2", + "scrypt": "#\/definitions\/algoScrypt", + "scryptMod": "#\/definitions\/algoScryptModified", + "bcrypt": "#\/definitions\/algoBcrypt", + "phpass": "#\/definitions\/algoPhpass", + "sha": "#\/definitions\/algoSha", + "md5": "#\/definitions\/algoMd5" + } + } + }, + "x-nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "x-nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "x-example": 100, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { + "type": "string" + }, + "x-example": [ + "jpg", + "png" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Image transformations are enabled.", + "x-example": false + }, + "totalSize": { + "type": "integer", + "description": "Total size of this bucket in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus", + "transformations", + "totalSize" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false, + "transformations": false, + "totalSize": 128 + } + }, + "resourceToken": { + "description": "ResourceToken", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "files" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "resourceId", + "resourceType", + "expire", + "secret", + "accessedAt" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } + }, + "site": { + "description": "Site", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Site ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Site creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Site update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Site name.", + "x-example": "My Site" + }, + "enabled": { + "type": "boolean", + "description": "Site enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "framework": { + "type": "string", + "description": "Site framework.", + "x-example": "react" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Site's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "deploymentScreenshotLight": { + "type": "string", + "description": "Screenshot of active deployment with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentScreenshotDark": { + "type": "string", + "description": "Screenshot of active deployment with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentId": { + "type": "string", + "description": "Site's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "vars": { + "type": "array", + "description": "Site variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": [] + }, + "timeout": { + "type": "integer", + "description": "Site request timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the site dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the site.", + "x-example": "npm run build" + }, + "startCommand": { + "type": "string", + "description": "Custom command to use when starting site runtime.", + "x-example": "node custom-server.mjs" + }, + "outputDirectory": { + "type": "string", + "description": "The directory where the site build output is located.", + "x-example": "build" + }, + "installationId": { + "type": "string", + "description": "Site VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "x-example": "sites\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for SSR executions.", + "x-example": "s-1vcpu-512mb" + }, + "buildRuntime": { + "type": "string", + "description": "Site build runtime.", + "x-example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework adapter.", + "x-example": "static" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "enabled", + "live", + "logging", + "framework", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "deploymentScreenshotLight", + "deploymentScreenshotDark", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "vars", + "timeout", + "installCommand", + "buildCommand", + "startCommand", + "outputDirectory", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "startCommand": "node custom-server.mjs", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } + }, + "templateSite": { + "description": "Template Site", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Site Template ID.", + "x-example": "starter" + }, + "name": { + "type": "string", + "description": "Site Template Name.", + "x-example": "Starter site" + }, + "tagline": { + "type": "string", + "description": "Short description of template", + "x-example": "Minimal web app integrating with Appwrite." + }, + "demoUrl": { + "type": "string", + "description": "URL hosting a template demo.", + "x-example": "https:\/\/nextjs-starter.appwrite.network\/" + }, + "screenshotDark": { + "type": "string", + "description": "File URL with preview screenshot in dark theme preference.", + "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png" + }, + "screenshotLight": { + "type": "string", + "description": "File URL with preview screenshot in light theme preference.", + "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png" + }, + "useCases": { + "type": "array", + "description": "Site use cases.", + "items": { + "type": "string" + }, + "x-example": "Starter" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks that can be used with this template.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateFramework" + }, + "x-example": [] + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "x-example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "x-example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "x-example": "main" + }, + "variables": { + "type": "array", + "description": "Site variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateVariable" + }, + "x-example": [] + } + }, + "required": [ + "key", + "name", + "tagline", + "demoUrl", + "screenshotDark", + "screenshotLight", + "useCases", + "frameworks", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables" + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } + }, + "templateFramework": { + "description": "Template Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parent framework key.", + "x-example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "x-example": "SvelteKit" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "The output directory to store the build output.", + "x-example": ".\/build" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "x-example": ".\/svelte-kit\/starter" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime used during build step of template.", + "x-example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework runtime", + "x-example": "ssr" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for SPA. Only relevant for static serve runtime.", + "x-example": "index.html" + } + }, + "required": [ + "key", + "name", + "installCommand", + "buildCommand", + "outputDirectory", + "providerRootDirectory", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution and build runtime.", + "x-example": "python-3.8" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentId": { + "type": "string", + "description": "Function's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb" + } + }, + "templateFunction": { + "description": "Template Function", + "type": "object", + "properties": { + "icon": { + "type": "string", + "description": "Function Template Icon.", + "x-example": "icon-lightning-bolt" + }, + "id": { + "type": "string", + "description": "Function Template ID.", + "x-example": "starter" + }, + "name": { + "type": "string", + "description": "Function Template Name.", + "x-example": "Starter function" + }, + "tagline": { + "type": "string", + "description": "Function Template Tagline.", + "x-example": "A simple function to get started." + }, + "permissions": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "any" + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "cron": { + "type": "string", + "description": "Function execution schedult in CRON format.", + "x-example": "0 0 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "useCases": { + "type": "array", + "description": "Function use cases.", + "items": { + "type": "string" + }, + "x-example": "Starter" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes that can be used with this template.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateRuntime" + }, + "x-example": [] + }, + "instructions": { + "type": "string", + "description": "Function Template Instructions.", + "x-example": "For documentation and instructions check out <link>." + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "x-example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "x-example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "x-example": "main" + }, + "variables": { + "type": "array", + "description": "Function variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/templateVariable" + }, + "x-example": [] + }, + "scopes": { + "type": "array", + "description": "Function scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + } + }, + "required": [ + "icon", + "id", + "name", + "tagline", + "permissions", + "events", + "cron", + "timeout", + "useCases", + "runtimes", + "instructions", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables", + "scopes" + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out <link>.", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } + }, + "templateRuntime": { + "description": "Template Runtime", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "node-19.0" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "node\/starter" + } + }, + "required": [ + "name", + "commands", + "entrypoint", + "providerRootDirectory" + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } + }, + "templateVariable": { + "description": "Template Variable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Variable Name.", + "x-example": "APPWRITE_DATABASE_ID" + }, + "description": { + "type": "string", + "description": "Variable Description.", + "x-example": "The ID of the Appwrite database that contains the collection to sync." + }, + "value": { + "type": "string", + "description": "Variable Value.", + "x-example": "512" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false + }, + "placeholder": { + "type": "string", + "description": "Variable Placeholder.", + "x-example": "64a55...7b912" + }, + "required": { + "type": "boolean", + "description": "Is the variable required?", + "x-example": false + }, + "type": { + "type": "string", + "description": "Variable Type.", + "x-example": "password" + } + }, + "required": [ + "name", + "description", + "value", + "secret", + "placeholder", + "required", + "type" + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } + }, + "installation": { + "description": "Installation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name.", + "x-example": "appwrite" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "5322" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "provider", + "organization", + "providerInstallationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } + }, + "providerRepository": { + "description": "ProviderRepository", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "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" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "x-example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "x-example": [ + "PORT", + "NODE_ENV" + ] + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ] + } + }, + "providerRepositoryFramework": { + "description": "ProviderRepositoryFramework", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "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" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "x-example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "x-example": [ + "PORT", + "NODE_ENV" + ] + }, + "framework": { + "type": "string", + "description": "Auto-detected framework. Empty if type is not \"framework\".", + "x-example": "nextjs" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables", + "framework" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ], + "framework": "nextjs" + } + }, + "providerRepositoryRuntime": { + "description": "ProviderRepositoryRuntime", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "x-example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "x-example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "x-example": "github" + }, + "private": { + "type": "boolean", + "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" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "x-example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "x-example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "x-example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "x-example": [ + "PORT", + "NODE_ENV" + ] + }, + "runtime": { + "type": "string", + "description": "Auto-detected runtime. Empty if type is not \"runtime\".", + "x-example": "node-22" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables", + "runtime" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ], + "runtime": "node-22" + } + }, + "detectionFramework": { + "description": "DetectionFramework", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Repository detection type.", + "x-example": "framework", + "enum": [ + "framework" + ] + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "object", + "$ref": "#\/definitions\/detectionVariable" + }, + "x-example": {}, + "x-nullable": true + }, + "framework": { + "type": "string", + "description": "Framework", + "x-example": "nuxt" + }, + "installCommand": { + "type": "string", + "description": "Site Install Command", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Site Build Command", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Site Output Directory", + "x-example": "dist" + } + }, + "required": [ + "type", + "framework", + "installCommand", + "buildCommand", + "outputDirectory" + ], + "example": { + "type": "framework", + "variables": {}, + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } + }, + "detectionRuntime": { + "description": "DetectionRuntime", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Repository detection type.", + "x-example": "runtime", + "enum": [ + "runtime" + ] + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "object", + "$ref": "#\/definitions\/detectionVariable" + }, + "x-example": {}, + "x-nullable": true + }, + "runtime": { + "type": "string", + "description": "Runtime", + "x-example": "node" + }, + "entrypoint": { + "type": "string", + "description": "Function Entrypoint", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "Function install and build commands", + "x-example": "npm install && npm run build" + } + }, + "required": [ + "type", + "runtime", + "entrypoint", + "commands" + ], + "example": { + "type": "runtime", + "variables": {}, + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } + }, + "detectionVariable": { + "description": "DetectionVariable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of environment variable", + "x-example": "NODE_ENV" + }, + "value": { + "type": "string", + "description": "Value of environment variable", + "x-example": "production" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "NODE_ENV", + "value": "production" + } + }, + "vcsContent": { + "description": "VcsContents", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", + "x-example": 1523, + "format": "int32", + "x-nullable": true + }, + "isDirectory": { + "type": "boolean", + "description": "If a content is a directory. Directories can be used to check nested contents.", + "x-example": true, + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Name of directory or file.", + "x-example": "Main.java" + } + }, + "required": [ + "name" + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } + }, + "branch": { + "description": "Branch", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Branch Name.", + "x-example": "main" + } + }, + "required": [ + "name" + ], + "example": { + "name": "main" + } + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "x-example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "x-example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { + "type": "string" + }, + "x-example": "amd64" + } + }, + "required": [ + "$id", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } + }, + "framework": { + "description": "Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Framework key.", + "x-example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "x-example": "SvelteKit" + }, + "buildRuntime": { + "type": "string", + "description": "Default runtime version.", + "x-example": "node-22" + }, + "runtimes": { + "type": "array", + "description": "List of supported runtime versions.", + "items": { + "type": "string" + }, + "x-example": [ + "static-1", + "node-22" + ] + }, + "adapters": { + "type": "array", + "description": "List of supported adapters.", + "items": { + "type": "object", + "$ref": "#\/definitions\/frameworkAdapter" + }, + "x-example": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "required": [ + "key", + "name", + "buildRuntime", + "runtimes", + "adapters" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "frameworkAdapter": { + "description": "Framework Adapter", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Adapter key.", + "x-example": "static" + }, + "installCommand": { + "type": "string", + "description": "Default command to download dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Default command to build site into output directory.", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Default output directory of build.", + "x-example": ".\/dist" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "key", + "installCommand", + "buildCommand", + "outputDirectory", + "fallbackFile" + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "sourceSize": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output size in bytes.", + "x-example": 128, + "format": "int32" + }, + "totalSize": { + "type": "integer", + "description": "The total size in bytes (source and build output).", + "x-example": 128, + "format": "int32" + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "screenshotLight": { + "type": "string", + "description": "Screenshot with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "screenshotDark": { + "type": "string", + "description": "Screenshot with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "canceled", + "failed" + ] + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildDuration": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "sourceSize", + "buildSize", + "totalSize", + "buildId", + "activate", + "screenshotLight", + "screenshotDark", + "status", + "buildLogs", + "buildDuration", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranch", + "providerBranchUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Project creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Project update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Project name.", + "x-example": "New Project" + }, + "description": { + "type": "string", + "description": "Project description.", + "x-example": "This is a new project." + }, + "teamId": { + "type": "string", + "description": "Project team ID.", + "x-example": "1592981250" + }, + "logo": { + "type": "string", + "description": "Project logo file ID.", + "x-example": "5f5c451b403cb" + }, + "url": { + "type": "string", + "description": "Project website URL.", + "x-example": "5f5c451b403cb" + }, + "legalName": { + "type": "string", + "description": "Company legal name.", + "x-example": "Company LTD." + }, + "legalCountry": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", + "x-example": "US" + }, + "legalState": { + "type": "string", + "description": "State name.", + "x-example": "New York" + }, + "legalCity": { + "type": "string", + "description": "City name.", + "x-example": "New York City." + }, + "legalAddress": { + "type": "string", + "description": "Company Address.", + "x-example": "620 Eighth Avenue, New York, NY 10018" + }, + "legalTaxId": { + "type": "string", + "description": "Company Tax ID.", + "x-example": "131102020" + }, + "authDuration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 60, + "format": "int32" + }, + "authLimit": { + "type": "integer", + "description": "Max users allowed. 0 is unlimited.", + "x-example": 100, + "format": "int32" + }, + "authSessionsLimit": { + "type": "integer", + "description": "Max sessions allowed per user. 100 maximum.", + "x-example": 10, + "format": "int32" + }, + "authPasswordHistory": { + "type": "integer", + "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", + "x-example": 5, + "format": "int32" + }, + "authPasswordDictionary": { + "type": "boolean", + "description": "Whether or not to check user's password against most commonly used passwords.", + "x-example": true + }, + "authPersonalDataCheck": { + "type": "boolean", + "description": "Whether or not to check the user password for similarity with their personal data.", + "x-example": true + }, + "authDisposableEmails": { + "type": "boolean", + "description": "Whether or not to disallow disposable email addresses during signup and email updates.", + "x-example": true + }, + "authCanonicalEmails": { + "type": "boolean", + "description": "Whether or not to require canonical email addresses during signup and email updates.", + "x-example": true + }, + "authFreeEmails": { + "type": "boolean", + "description": "Whether or not to disallow free email addresses during signup and email updates.", + "x-example": true + }, + "authMockNumbers": { + "type": "array", + "description": "An array of mock numbers and their corresponding verification codes (OTPs).", + "items": { + "type": "object", + "$ref": "#\/definitions\/mockNumber" + }, + "x-example": [ + {} + ] + }, + "authSessionAlerts": { + "type": "boolean", + "description": "Whether or not to send session alert emails to users.", + "x-example": true + }, + "authMembershipsUserName": { + "type": "boolean", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "authMembershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "authMembershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", + "x-example": true + }, + "authMembershipsUserId": { + "type": "boolean", + "description": "Whether or not to show user IDs in the teams membership response.", + "x-example": true + }, + "authMembershipsUserPhone": { + "type": "boolean", + "description": "Whether or not to show user phone numbers in the teams membership response.", + "x-example": true + }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, + "oAuthProviders": { + "type": "array", + "description": "List of Auth Providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/authProvider" + }, + "x-example": [ + {} + ] + }, + "platforms": { + "type": "array", + "description": "List of Platforms.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/platformWeb" + }, + { + "$ref": "#\/definitions\/platformApple" + }, + { + "$ref": "#\/definitions\/platformAndroid" + }, + { + "$ref": "#\/definitions\/platformWindows" + }, + { + "$ref": "#\/definitions\/platformLinux" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/definitions\/platformWeb", + "apple": "#\/definitions\/platformApple", + "android": "#\/definitions\/platformAndroid", + "windows": "#\/definitions\/platformWindows", + "linux": "#\/definitions\/platformLinux" + } + } + }, + "x-example": {} + }, + "webhooks": { + "type": "array", + "description": "List of Webhooks.", + "items": { + "type": "object", + "$ref": "#\/definitions\/webhook" + }, + "x-example": {} + }, + "keys": { + "type": "array", + "description": "List of API Keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/key" + }, + "x-example": {} + }, + "devKeys": { + "type": "array", + "description": "List of dev keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/devKey" + }, + "x-example": {} + }, + "smtpEnabled": { + "type": "boolean", + "description": "Status for custom SMTP", + "x-example": false + }, + "smtpSenderName": { + "type": "string", + "description": "SMTP sender name", + "x-example": "John Appwrite" + }, + "smtpSenderEmail": { + "type": "string", + "description": "SMTP sender email", + "x-example": "john@appwrite.io" + }, + "smtpReplyToName": { + "type": "string", + "description": "SMTP reply to name", + "x-example": "Support Team" + }, + "smtpReplyToEmail": { + "type": "string", + "description": "SMTP reply to email", + "x-example": "support@appwrite.io" + }, + "smtpHost": { + "type": "string", + "description": "SMTP server host name", + "x-example": "mail.appwrite.io" + }, + "smtpPort": { + "type": "integer", + "description": "SMTP server port", + "x-example": 25, + "format": "int32" + }, + "smtpUsername": { + "type": "string", + "description": "SMTP server username", + "x-example": "emailuser" + }, + "smtpPassword": { + "type": "string", + "description": "SMTP server password. This property is write-only and always returned empty.", + "x-example": "" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "x-example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "labels": { + "type": "array", + "description": "Labels for the project.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "status": { + "type": "string", + "description": "Project status.", + "x-example": "active" + }, + "authEmailPassword": { + "type": "boolean", + "description": "Email\/Password auth method status", + "x-example": true + }, + "authUsersAuthMagicURL": { + "type": "boolean", + "description": "Magic URL auth method status", + "x-example": true + }, + "authEmailOtp": { + "type": "boolean", + "description": "Email (OTP) auth method status", + "x-example": true + }, + "authAnonymous": { + "type": "boolean", + "description": "Anonymous auth method status", + "x-example": true + }, + "authInvites": { + "type": "boolean", + "description": "Invites auth method status", + "x-example": true + }, + "authJWT": { + "type": "boolean", + "description": "JWT auth method status", + "x-example": true + }, + "authPhone": { + "type": "boolean", + "description": "Phone auth method status", + "x-example": true + }, + "serviceStatusForAccount": { + "type": "boolean", + "description": "Account service status", + "x-example": true + }, + "serviceStatusForAvatars": { + "type": "boolean", + "description": "Avatars service status", + "x-example": true + }, + "serviceStatusForDatabases": { + "type": "boolean", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTablesdb": { + "type": "boolean", + "description": "TablesDB service status", + "x-example": true + }, + "serviceStatusForLocale": { + "type": "boolean", + "description": "Locale service status", + "x-example": true + }, + "serviceStatusForHealth": { + "type": "boolean", + "description": "Health service status", + "x-example": true + }, + "serviceStatusForProject": { + "type": "boolean", + "description": "Project service status", + "x-example": true + }, + "serviceStatusForStorage": { + "type": "boolean", + "description": "Storage service status", + "x-example": true + }, + "serviceStatusForTeams": { + "type": "boolean", + "description": "Teams service status", + "x-example": true + }, + "serviceStatusForUsers": { + "type": "boolean", + "description": "Users service status", + "x-example": true + }, + "serviceStatusForVcs": { + "type": "boolean", + "description": "VCS service status", + "x-example": true + }, + "serviceStatusForSites": { + "type": "boolean", + "description": "Sites service status", + "x-example": true + }, + "serviceStatusForFunctions": { + "type": "boolean", + "description": "Functions service status", + "x-example": true + }, + "serviceStatusForProxy": { + "type": "boolean", + "description": "Proxy service status", + "x-example": true + }, + "serviceStatusForGraphql": { + "type": "boolean", + "description": "GraphQL service status", + "x-example": true + }, + "serviceStatusForMigrations": { + "type": "boolean", + "description": "Migrations service status", + "x-example": true + }, + "serviceStatusForMessaging": { + "type": "boolean", + "description": "Messaging service status", + "x-example": true + }, + "protocolStatusForRest": { + "type": "boolean", + "description": "REST protocol status", + "x-example": true + }, + "protocolStatusForGraphql": { + "type": "boolean", + "description": "GraphQL protocol status", + "x-example": true + }, + "protocolStatusForWebsocket": { + "type": "boolean", + "description": "Websocket protocol status", + "x-example": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "logo", + "url", + "legalName", + "legalCountry", + "legalState", + "legalCity", + "legalAddress", + "legalTaxId", + "authDuration", + "authLimit", + "authSessionsLimit", + "authPasswordHistory", + "authPasswordDictionary", + "authPersonalDataCheck", + "authDisposableEmails", + "authCanonicalEmails", + "authFreeEmails", + "authMockNumbers", + "authSessionAlerts", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", + "authMembershipsUserId", + "authMembershipsUserPhone", + "authInvalidateSessions", + "oAuthProviders", + "platforms", + "webhooks", + "keys", + "devKeys", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyToName", + "smtpReplyToEmail", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "labels", + "status", + "authEmailPassword", + "authUsersAuthMagicURL", + "authEmailOtp", + "authAnonymous", + "authInvites", + "authJWT", + "authPhone", + "serviceStatusForAccount", + "serviceStatusForAvatars", + "serviceStatusForDatabases", + "serviceStatusForTablesdb", + "serviceStatusForLocale", + "serviceStatusForHealth", + "serviceStatusForProject", + "serviceStatusForStorage", + "serviceStatusForTeams", + "serviceStatusForUsers", + "serviceStatusForVcs", + "serviceStatusForSites", + "serviceStatusForFunctions", + "serviceStatusForProxy", + "serviceStatusForGraphql", + "serviceStatusForMigrations", + "serviceStatusForMessaging", + "protocolStatusForRest", + "protocolStatusForGraphql", + "protocolStatusForWebsocket" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authMembershipsUserId": true, + "authMembershipsUserPhone": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyToName": "Support Team", + "smtpReplyToEmail": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [ + "vip" + ], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true + } + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Webhook creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Webhook update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "x-example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "x-example": "https:\/\/example.com\/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { + "type": "string" + }, + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] + }, + "tls": { + "type": "boolean", + "description": "Indicates if SSL \/ TLS certificate verification is enabled.", + "x-example": true + }, + "authUsername": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "authPassword": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + }, + "secret": { + "type": "string", + "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", + "x-example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "x-example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "x-example": "Failed to connect to remote server." + }, + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "url", + "events", + "tls", + "authUsername", + "authPassword", + "secret", + "enabled", + "logs", + "attempts" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "ephemeralKey": { + "description": "Ephemeral Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "devKey": { + "description": "DevKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "Dev API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "mockNumber": { + "description": "Mock Number", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "x-example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "x-example": "123456" + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "number", + "otp", + "$createdAt", + "$updatedAt" + ], + "example": { + "number": "+1612842323", + "otp": "123456", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oAuth2Github": { + "description": "OAuth2GitHub", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", + "x-example": "e4d87900000000540733" + }, + "clientSecret": { + "type": "string", + "description": "GitHub OAuth2 client secret.", + "x-example": "5e07c00000000000000000000000000000198bcc" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "e4d87900000000540733", + "clientSecret": "5e07c00000000000000000000000000000198bcc" + } + }, + "oAuth2Discord": { + "description": "OAuth2Discord", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Discord OAuth2 client ID.", + "x-example": "950722000000343754" + }, + "clientSecret": { + "type": "string", + "description": "Discord OAuth2 client secret.", + "x-example": "YmPXnM000000000000000000002zFg5D" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "950722000000343754", + "clientSecret": "YmPXnM000000000000000000002zFg5D" + } + }, + "oAuth2Figma": { + "description": "OAuth2Figma", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Figma OAuth2 client ID.", + "x-example": "byay5H0000000000VtiI40" + }, + "clientSecret": { + "type": "string", + "description": "Figma OAuth2 client secret.", + "x-example": "yEpOYn0000000000000000004iIsU5" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "byay5H0000000000VtiI40", + "clientSecret": "yEpOYn0000000000000000004iIsU5" + } + }, + "oAuth2Dropbox": { + "description": "OAuth2Dropbox", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appKey": { + "type": "string", + "description": "Dropbox OAuth2 app key.", + "x-example": "jl000000000009t" + }, + "appSecret": { + "type": "string", + "description": "Dropbox OAuth2 app secret.", + "x-example": "g200000000000vw" + } + }, + "required": [ + "$id", + "enabled", + "appKey", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appKey": "jl000000000009t", + "appSecret": "g200000000000vw" + } + }, + "oAuth2Dailymotion": { + "description": "OAuth2Dailymotion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Dailymotion OAuth2 API key.", + "x-example": "07a9000000000000067f" + }, + "apiSecret": { + "type": "string", + "description": "Dailymotion OAuth2 API secret.", + "x-example": "a399a90000000000000000000000000000d90639" + } + }, + "required": [ + "$id", + "enabled", + "apiKey", + "apiSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "apiKey": "07a9000000000000067f", + "apiSecret": "a399a90000000000000000000000000000d90639" + } + }, + "oAuth2Bitbucket": { + "description": "OAuth2Bitbucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "key": { + "type": "string", + "description": "Bitbucket OAuth2 key.", + "x-example": "Knt70000000000ByRc" + }, + "secret": { + "type": "string", + "description": "Bitbucket OAuth2 secret.", + "x-example": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "required": [ + "$id", + "enabled", + "key", + "secret" + ], + "example": { + "$id": "github", + "enabled": false, + "key": "Knt70000000000ByRc", + "secret": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "oAuth2Bitly": { + "description": "OAuth2Bitly", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Bitly OAuth2 client ID.", + "x-example": "d95151000000000000000000000000000067af9b" + }, + "clientSecret": { + "type": "string", + "description": "Bitly OAuth2 client secret.", + "x-example": "a13e250000000000000000000000000000d73095" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "d95151000000000000000000000000000067af9b", + "clientSecret": "a13e250000000000000000000000000000d73095" + } + }, + "oAuth2Box": { + "description": "OAuth2Box", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Box OAuth2 client ID.", + "x-example": "deglcs00000000000000000000x2og6y" + }, + "clientSecret": { + "type": "string", + "description": "Box OAuth2 client secret.", + "x-example": "OKM1f100000000000000000000eshEif" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "deglcs00000000000000000000x2og6y", + "clientSecret": "OKM1f100000000000000000000eshEif" + } + }, + "oAuth2Autodesk": { + "description": "OAuth2Autodesk", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Autodesk OAuth2 client ID.", + "x-example": "5zw90v00000000000000000000kVYXN7" + }, + "clientSecret": { + "type": "string", + "description": "Autodesk OAuth2 client secret.", + "x-example": "7I000000000000MW" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "5zw90v00000000000000000000kVYXN7", + "clientSecret": "7I000000000000MW" + } + }, + "oAuth2Google": { + "description": "OAuth2Google", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Google OAuth2 client ID.", + "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + }, + "clientSecret": { + "type": "string", + "description": "Google OAuth2 client secret.", + "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "oAuth2Zoom": { + "description": "OAuth2Zoom", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoom OAuth2 client ID.", + "x-example": "QMAC00000000000000w0AQ" + }, + "clientSecret": { + "type": "string", + "description": "Zoom OAuth2 client secret.", + "x-example": "GAWsG4000000000000000000007U01ON" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "QMAC00000000000000w0AQ", + "clientSecret": "GAWsG4000000000000000000007U01ON" + } + }, + "oAuth2Zoho": { + "description": "OAuth2Zoho", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoho OAuth2 client ID.", + "x-example": "1000.83C178000000000000000000RPNX0B" + }, + "clientSecret": { + "type": "string", + "description": "Zoho OAuth2 client secret.", + "x-example": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "1000.83C178000000000000000000RPNX0B", + "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "oAuth2Yandex": { + "description": "OAuth2Yandex", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yandex OAuth2 client ID.", + "x-example": "6a8a6a0000000000000000000091483c" + }, + "clientSecret": { + "type": "string", + "description": "Yandex OAuth2 client secret.", + "x-example": "bbf98500000000000000000000c75a63" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a8a6a0000000000000000000091483c", + "clientSecret": "bbf98500000000000000000000c75a63" + } + }, + "oAuth2X": { + "description": "OAuth2X", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "X OAuth2 customer key.", + "x-example": "slzZV0000000000000NFLaWT" + }, + "secretKey": { + "type": "string", + "description": "X OAuth2 secret key.", + "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "slzZV0000000000000NFLaWT", + "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "oAuth2WordPress": { + "description": "OAuth2WordPress", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "WordPress OAuth2 client ID.", + "x-example": "130005" + }, + "clientSecret": { + "type": "string", + "description": "WordPress OAuth2 client secret.", + "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "130005", + "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "oAuth2Twitch": { + "description": "OAuth2Twitch", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Twitch OAuth2 client ID.", + "x-example": "vvi0in000000000000000000ikmt9p" + }, + "clientSecret": { + "type": "string", + "description": "Twitch OAuth2 client secret.", + "x-example": "pmapue000000000000000000zylw3v" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "vvi0in000000000000000000ikmt9p", + "clientSecret": "pmapue000000000000000000zylw3v" + } + }, + "oAuth2Stripe": { + "description": "OAuth2Stripe", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Stripe OAuth2 client ID.", + "x-example": "ca_UKibXX0000000000000000000006byvR" + }, + "apiSecretKey": { + "type": "string", + "description": "Stripe OAuth2 API secret key.", + "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "apiSecretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "ca_UKibXX0000000000000000000006byvR", + "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "oAuth2Spotify": { + "description": "OAuth2Spotify", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Spotify OAuth2 client ID.", + "x-example": "6ec271000000000000000000009beace" + }, + "clientSecret": { + "type": "string", + "description": "Spotify OAuth2 client secret.", + "x-example": "db068a000000000000000000008b5b9f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6ec271000000000000000000009beace", + "clientSecret": "db068a000000000000000000008b5b9f" + } + }, + "oAuth2Slack": { + "description": "OAuth2Slack", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Slack OAuth2 client ID.", + "x-example": "23000000089.15000000000023" + }, + "clientSecret": { + "type": "string", + "description": "Slack OAuth2 client secret.", + "x-example": "81656000000000000000000000f3d2fd" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "23000000089.15000000000023", + "clientSecret": "81656000000000000000000000f3d2fd" + } + }, + "oAuth2Podio": { + "description": "OAuth2Podio", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Podio OAuth2 client ID.", + "x-example": "appwrite-oauth-test-app" + }, + "clientSecret": { + "type": "string", + "description": "Podio OAuth2 client secret.", + "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-oauth-test-app", + "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "oAuth2Notion": { + "description": "OAuth2Notion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauthClientId": { + "type": "string", + "description": "Notion OAuth2 client ID.", + "x-example": "341d8700-0000-0000-0000-000000446ee3" + }, + "oauthClientSecret": { + "type": "string", + "description": "Notion OAuth2 client secret.", + "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "required": [ + "$id", + "enabled", + "oauthClientId", + "oauthClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", + "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "oAuth2Salesforce": { + "description": "OAuth2Salesforce", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "Salesforce OAuth2 consumer key.", + "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + }, + "customerSecret": { + "type": "string", + "description": "Salesforce OAuth2 consumer secret.", + "x-example": "3w000000000000e2" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "customerSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "customerSecret": "3w000000000000e2" + } + }, + "oAuth2Yahoo": { + "description": "OAuth2Yahoo", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yahoo OAuth2 client ID.", + "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" + }, + "clientSecret": { + "type": "string", + "description": "Yahoo OAuth2 client secret.", + "x-example": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "clientSecret": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "oAuth2Linkedin": { + "description": "OAuth2Linkedin", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "LinkedIn OAuth2 client ID.", + "x-example": "770000000000dv" + }, + "primaryClientSecret": { + "type": "string", + "description": "LinkedIn OAuth2 primary client secret.", + "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "primaryClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "770000000000dv", + "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "oAuth2Disqus": { + "description": "OAuth2Disqus", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "publicKey": { + "type": "string", + "description": "Disqus OAuth2 public key.", + "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + }, + "secretKey": { + "type": "string", + "description": "Disqus OAuth2 secret key.", + "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "required": [ + "$id", + "enabled", + "publicKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "oAuth2Amazon": { + "description": "OAuth2Amazon", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Amazon OAuth2 client ID.", + "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" + }, + "clientSecret": { + "type": "string", + "description": "Amazon OAuth2 client secret.", + "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "oAuth2Etsy": { + "description": "OAuth2Etsy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "keyString": { + "type": "string", + "description": "Etsy OAuth2 keystring.", + "x-example": "nsgzxh0000000000008j85a2" + }, + "sharedSecret": { + "type": "string", + "description": "Etsy OAuth2 shared secret.", + "x-example": "tp000000ru" + } + }, + "required": [ + "$id", + "enabled", + "keyString", + "sharedSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "keyString": "nsgzxh0000000000008j85a2", + "sharedSecret": "tp000000ru" + } + }, + "oAuth2Facebook": { + "description": "OAuth2Facebook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appId": { + "type": "string", + "description": "Facebook OAuth2 app ID.", + "x-example": "260600000007694" + }, + "appSecret": { + "type": "string", + "description": "Facebook OAuth2 app secret.", + "x-example": "2d0b2800000000000000000000d38af4" + } + }, + "required": [ + "$id", + "enabled", + "appId", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appId": "260600000007694", + "appSecret": "2d0b2800000000000000000000d38af4" + } + }, + "oAuth2Tradeshift": { + "description": "OAuth2Tradeshift", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauth2ClientId": { + "type": "string", + "description": "Tradeshift OAuth2 client ID.", + "x-example": "appwrite-test-org.appwrite-test-app" + }, + "oauth2ClientSecret": { + "type": "string", + "description": "Tradeshift OAuth2 client secret.", + "x-example": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "required": [ + "$id", + "enabled", + "oauth2ClientId", + "oauth2ClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauth2ClientId": "appwrite-test-org.appwrite-test-app", + "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "oAuth2Paypal": { + "description": "OAuth2Paypal", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "PayPal OAuth2 client ID.", + "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" + }, + "secretKey": { + "type": "string", + "description": "PayPal OAuth2 secret key.", + "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "oAuth2Gitlab": { + "description": "OAuth2Gitlab", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "GitLab OAuth2 application ID.", + "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" + }, + "secret": { + "type": "string", + "description": "GitLab OAuth2 secret.", + "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" + }, + "endpoint": { + "type": "string", + "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", + "x-example": "https:\/\/gitlab.com" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "secret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "endpoint": "https:\/\/gitlab.com" + } + }, + "oAuth2Authentik": { + "description": "OAuth2Authentik", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Authentik OAuth2 client ID.", + "x-example": "dTKOPa0000000000000000000000000000e7G8hv" + }, + "clientSecret": { + "type": "string", + "description": "Authentik OAuth2 client secret.", + "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" + }, + "endpoint": { + "type": "string", + "description": "Authentik OAuth2 endpoint domain.", + "x-example": "example.authentik.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dTKOPa0000000000000000000000000000e7G8hv", + "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "endpoint": "example.authentik.com" + } + }, + "oAuth2Auth0": { + "description": "OAuth2Auth0", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Auth0 OAuth2 client ID.", + "x-example": "OaOkIA000000000000000000005KLSYq" + }, + "clientSecret": { + "type": "string", + "description": "Auth0 OAuth2 client secret.", + "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" + }, + "endpoint": { + "type": "string", + "description": "Auth0 OAuth2 endpoint domain.", + "x-example": "example.us.auth0.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "OaOkIA000000000000000000005KLSYq", + "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "endpoint": "example.us.auth0.com" + } + }, + "oAuth2FusionAuth": { + "description": "OAuth2FusionAuth", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "FusionAuth OAuth2 client ID.", + "x-example": "b2222c00-0000-0000-0000-000000862097" + }, + "clientSecret": { + "type": "string", + "description": "FusionAuth OAuth2 client secret.", + "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" + }, + "endpoint": { + "type": "string", + "description": "FusionAuth OAuth2 endpoint domain.", + "x-example": "example.fusionauth.io" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "b2222c00-0000-0000-0000-000000862097", + "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", + "endpoint": "example.fusionauth.io" + } + }, + "oAuth2Keycloak": { + "description": "OAuth2Keycloak", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Keycloak OAuth2 client ID.", + "x-example": "appwrite-o0000000st-app" + }, + "clientSecret": { + "type": "string", + "description": "Keycloak OAuth2 client secret.", + "x-example": "jdjrJd00000000000000000000HUsaZO" + }, + "endpoint": { + "type": "string", + "description": "Keycloak OAuth2 endpoint domain.", + "x-example": "keycloak.example.com" + }, + "realmName": { + "type": "string", + "description": "Keycloak OAuth2 realm name.", + "x-example": "appwrite-realm" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint", + "realmName" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-o0000000st-app", + "clientSecret": "jdjrJd00000000000000000000HUsaZO", + "endpoint": "keycloak.example.com", + "realmName": "appwrite-realm" + } + }, + "oAuth2Oidc": { + "description": "OAuth2Oidc", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "OpenID Connect OAuth2 client ID.", + "x-example": "qibI2x0000000000000000000000000006L2YFoG" + }, + "clientSecret": { + "type": "string", + "description": "OpenID Connect OAuth2 client secret.", + "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", + "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/token" + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "wellKnownURL", + "authorizationURL", + "tokenUrl", + "userInfoUrl" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "qibI2x0000000000000000000000000006L2YFoG", + "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", + "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", + "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", + "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "oAuth2Okta": { + "description": "OAuth2Okta", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Okta OAuth2 client ID.", + "x-example": "0oa00000000000000698" + }, + "clientSecret": { + "type": "string", + "description": "Okta OAuth2 client secret.", + "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" + }, + "domain": { + "type": "string", + "description": "Okta OAuth2 domain.", + "x-example": "trial-6400025.okta.com" + }, + "authorizationServerId": { + "type": "string", + "description": "Okta OAuth2 authorization server ID.", + "x-example": "aus000000000000000h7z" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "domain", + "authorizationServerId" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "0oa00000000000000698", + "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "domain": "trial-6400025.okta.com", + "authorizationServerId": "aus000000000000000h7z" + } + }, + "oAuth2Kick": { + "description": "OAuth2Kick", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Kick OAuth2 client ID.", + "x-example": "01KQ7C00000000000001MFHS32" + }, + "clientSecret": { + "type": "string", + "description": "Kick OAuth2 client secret.", + "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "01KQ7C00000000000001MFHS32", + "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "oAuth2Apple": { + "description": "OAuth2Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "apple" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "serviceId": { + "type": "string", + "description": "Apple OAuth2 service ID.", + "x-example": "ip.appwrite.app.web" + }, + "keyId": { + "type": "string", + "description": "Apple OAuth2 key ID.", + "x-example": "P4000000N8" + }, + "teamId": { + "type": "string", + "description": "Apple OAuth2 team ID.", + "x-example": "D4000000R6" + }, + "p8File": { + "type": "string", + "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", + "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "required": [ + "$id", + "enabled", + "serviceId", + "keyId", + "teamId", + "p8File" + ], + "example": { + "$id": "apple", + "enabled": false, + "serviceId": "ip.appwrite.app.web", + "keyId": "P4000000N8", + "teamId": "D4000000R6", + "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "oAuth2Microsoft": { + "description": "OAuth2Microsoft", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "Microsoft OAuth2 application ID.", + "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" + }, + "applicationSecret": { + "type": "string", + "description": "Microsoft OAuth2 application secret.", + "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", + "x-example": "common" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "applicationSecret", + "tenant" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", + "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "tenant": "common" + } + }, + "oAuth2ProviderList": { + "description": "OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers in the given project.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of OAuth2 providers.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/oAuth2Github" + }, + { + "$ref": "#\/definitions\/oAuth2Discord" + }, + { + "$ref": "#\/definitions\/oAuth2Figma" + }, + { + "$ref": "#\/definitions\/oAuth2Dropbox" + }, + { + "$ref": "#\/definitions\/oAuth2Dailymotion" + }, + { + "$ref": "#\/definitions\/oAuth2Bitbucket" + }, + { + "$ref": "#\/definitions\/oAuth2Bitly" + }, + { + "$ref": "#\/definitions\/oAuth2Box" + }, + { + "$ref": "#\/definitions\/oAuth2Autodesk" + }, + { + "$ref": "#\/definitions\/oAuth2Google" + }, + { + "$ref": "#\/definitions\/oAuth2Zoom" + }, + { + "$ref": "#\/definitions\/oAuth2Zoho" + }, + { + "$ref": "#\/definitions\/oAuth2Yandex" + }, + { + "$ref": "#\/definitions\/oAuth2X" + }, + { + "$ref": "#\/definitions\/oAuth2WordPress" + }, + { + "$ref": "#\/definitions\/oAuth2Twitch" + }, + { + "$ref": "#\/definitions\/oAuth2Stripe" + }, + { + "$ref": "#\/definitions\/oAuth2Spotify" + }, + { + "$ref": "#\/definitions\/oAuth2Slack" + }, + { + "$ref": "#\/definitions\/oAuth2Podio" + }, + { + "$ref": "#\/definitions\/oAuth2Notion" + }, + { + "$ref": "#\/definitions\/oAuth2Salesforce" + }, + { + "$ref": "#\/definitions\/oAuth2Yahoo" + }, + { + "$ref": "#\/definitions\/oAuth2Linkedin" + }, + { + "$ref": "#\/definitions\/oAuth2Disqus" + }, + { + "$ref": "#\/definitions\/oAuth2Amazon" + }, + { + "$ref": "#\/definitions\/oAuth2Etsy" + }, + { + "$ref": "#\/definitions\/oAuth2Facebook" + }, + { + "$ref": "#\/definitions\/oAuth2Tradeshift" + }, + { + "$ref": "#\/definitions\/oAuth2Paypal" + }, + { + "$ref": "#\/definitions\/oAuth2Gitlab" + }, + { + "$ref": "#\/definitions\/oAuth2Authentik" + }, + { + "$ref": "#\/definitions\/oAuth2Auth0" + }, + { + "$ref": "#\/definitions\/oAuth2FusionAuth" + }, + { + "$ref": "#\/definitions\/oAuth2Keycloak" + }, + { + "$ref": "#\/definitions\/oAuth2Oidc" + }, + { + "$ref": "#\/definitions\/oAuth2Apple" + }, + { + "$ref": "#\/definitions\/oAuth2Okta" + }, + { + "$ref": "#\/definitions\/oAuth2Kick" + }, + { + "$ref": "#\/definitions\/oAuth2Microsoft" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/definitions\/oAuth2Github", + "discord": "#\/definitions\/oAuth2Discord", + "figma": "#\/definitions\/oAuth2Figma", + "dropbox": "#\/definitions\/oAuth2Dropbox", + "dailymotion": "#\/definitions\/oAuth2Dailymotion", + "bitbucket": "#\/definitions\/oAuth2Bitbucket", + "bitly": "#\/definitions\/oAuth2Bitly", + "box": "#\/definitions\/oAuth2Box", + "autodesk": "#\/definitions\/oAuth2Autodesk", + "google": "#\/definitions\/oAuth2Google", + "zoom": "#\/definitions\/oAuth2Zoom", + "zoho": "#\/definitions\/oAuth2Zoho", + "yandex": "#\/definitions\/oAuth2Yandex", + "x": "#\/definitions\/oAuth2X", + "wordpress": "#\/definitions\/oAuth2WordPress", + "twitch": "#\/definitions\/oAuth2Twitch", + "stripe": "#\/definitions\/oAuth2Stripe", + "spotify": "#\/definitions\/oAuth2Spotify", + "slack": "#\/definitions\/oAuth2Slack", + "podio": "#\/definitions\/oAuth2Podio", + "notion": "#\/definitions\/oAuth2Notion", + "salesforce": "#\/definitions\/oAuth2Salesforce", + "yahoo": "#\/definitions\/oAuth2Yahoo", + "linkedin": "#\/definitions\/oAuth2Linkedin", + "disqus": "#\/definitions\/oAuth2Disqus", + "amazon": "#\/definitions\/oAuth2Amazon", + "etsy": "#\/definitions\/oAuth2Etsy", + "facebook": "#\/definitions\/oAuth2Facebook", + "tradeshift": "#\/definitions\/oAuth2Tradeshift", + "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", + "paypal": "#\/definitions\/oAuth2Paypal", + "paypalSandbox": "#\/definitions\/oAuth2Paypal", + "gitlab": "#\/definitions\/oAuth2Gitlab", + "authentik": "#\/definitions\/oAuth2Authentik", + "auth0": "#\/definitions\/oAuth2Auth0", + "fusionauth": "#\/definitions\/oAuth2FusionAuth", + "keycloak": "#\/definitions\/oAuth2Keycloak", + "oidc": "#\/definitions\/oAuth2Oidc", + "apple": "#\/definitions\/oAuth2Apple", + "okta": "#\/definitions\/oAuth2Okta", + "kick": "#\/definitions\/oAuth2Kick", + "microsoft": "#\/definitions\/oAuth2Microsoft" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "policyPasswordDictionary": { + "description": "Policy Password Dictionary", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password dictionary policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordHistory": { + "description": "Policy Password History", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Password history length. A value of 0 means the policy is disabled.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 5 + } + }, + "policyPasswordPersonalData": { + "description": "Policy Password Personal Data", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password personal data policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionAlert": { + "description": "Policy Session Alert", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session alert policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionDuration": { + "description": "Policy Session Duration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "duration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 3600, + "format": "int32" + } + }, + "required": [ + "$id", + "duration" + ], + "example": { + "$id": "password-dictionary", + "duration": 3600 + } + }, + "policySessionInvalidation": { + "description": "Policy Session Invalidation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session invalidation policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionLimit": { + "description": "Policy Session Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 10 + } + }, + "policyUserLimit": { + "description": "Policy User Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "x-example": 100, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 100 + } + }, + "policyMembershipPrivacy": { + "description": "Policy Membership Privacy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "userId": { + "type": "boolean", + "description": "Whether user ID is visible in memberships.", + "x-example": true + }, + "userEmail": { + "type": "boolean", + "description": "Whether user email is visible in memberships.", + "x-example": true + }, + "userPhone": { + "type": "boolean", + "description": "Whether user phone is visible in memberships.", + "x-example": true + }, + "userName": { + "type": "boolean", + "description": "Whether user name is visible in memberships.", + "x-example": true + }, + "userMFA": { + "type": "boolean", + "description": "Whether user MFA status is visible in memberships.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "userEmail", + "userPhone", + "userName", + "userMFA" + ], + "example": { + "$id": "password-dictionary", + "userId": true, + "userEmail": true, + "userPhone": true, + "userName": true, + "userMFA": true + } + }, + "authProvider": { + "description": "AuthProvider", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Auth Provider.", + "x-example": "github" + }, + "name": { + "type": "string", + "description": "Auth Provider name.", + "x-example": "GitHub" + }, + "appId": { + "type": "string", + "description": "OAuth 2.0 application ID.", + "x-example": "259125845563242502" + }, + "secret": { + "type": "string", + "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Auth Provider is active and can be used to create session.", + "x-example": "" + } + }, + "required": [ + "key", + "name", + "appId", + "secret", + "enabled" + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "", + "enabled": "" + } + }, + "platformWeb": { + "description": "Platform Web", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": "app.example.com" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "hostname", + "key" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" + } + }, + "platformApple": { + "description": "Platform Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "bundleIdentifier" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" + } + }, + "platformAndroid": { + "description": "Platform Android", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "applicationId": { + "type": "string", + "description": "Android application ID.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "applicationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" + } + }, + "platformWindows": { + "description": "Platform Windows", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageIdentifierName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" + } + }, + "platformLinux": { + "description": "Platform Linux", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageName": { + "type": "string", + "description": "Linux package name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" + } + }, + "platformList": { + "description": "Platforms List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of platforms in the given project.", + "x-example": 5, + "format": "int32" + }, + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/platformWeb" + }, + { + "$ref": "#\/definitions\/platformApple" + }, + { + "$ref": "#\/definitions\/platformAndroid" + }, + { + "$ref": "#\/definitions\/platformWindows" + }, + { + "$ref": "#\/definitions\/platformLinux" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/definitions\/platformWeb", + "apple": "#\/definitions\/platformApple", + "android": "#\/definitions\/platformAndroid", + "windows": "#\/definitions\/platformWindows", + "linux": "#\/definitions\/platformLinux" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "platforms" + ], + "example": { + "total": 5, + "platforms": "" + } + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "secret", + "resourceType", + "resourceId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "healthAntivirus": { + "description": "Health Antivirus", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Antivirus version.", + "x-example": "1.0.0" + }, + "status": { + "type": "string", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] + } + }, + "required": [ + "version", + "status" + ], + "example": { + "version": "1.0.0", + "status": "online" + } + }, + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": [ + "size" + ], + "example": { + "size": 8 + } + }, + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "ping": { + "type": "integer", + "description": "Duration in milliseconds how long the health check took.", + "x-example": 128, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" + } + }, + "required": [ + "name", + "ping", + "status" + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } + }, + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } + }, + "healthTime": { + "description": "Health Time", + "type": "object", + "properties": { + "remoteTime": { + "type": "integer", + "description": "Current unix timestamp on trustful remote server.", + "x-example": 1639490751, + "format": "int32" + }, + "localTime": { + "type": "integer", + "description": "Current unix timestamp of local server where Appwrite runs.", + "x-example": 1639490844, + "format": "int32" + }, + "diff": { + "type": "integer", + "description": "Difference of unix remote and local timestamps in milliseconds.", + "x-example": 93, + "format": "int32" + } + }, + "required": [ + "remoteTime", + "localTime", + "diff" + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } + }, + "metric": { + "description": "Metric", + "type": "object", + "properties": { + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" + }, + "date": { + "type": "string", + "description": "The date at which this metric was aggregated in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "value", + "date" + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } + }, + "metricBreakdown": { + "description": "Metric Breakdown", + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c16897e", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Resource name.", + "x-example": "Documents" + }, + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "The estimated value of this metric at the end of the period.", + "x-example": 1, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "name", + "value" + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } + }, + "usageDatabases": { + "description": "UsageDatabases", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of databases.", + "x-example": 0, + "format": "int32" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated number of total databases storage in bytes.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "Aggregated number of databases per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "An array of the aggregated number of databases storage in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "databasesTotal", + "collectionsTotal", + "tablesTotal", + "documentsTotal", + "rowsTotal", + "storageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "databases", + "collections", + "tables", + "documents", + "rows", + "storage", + "databasesReads", + "databasesWrites" + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } + }, + "usageDatabase": { + "description": "UsageDatabase", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "collectionsTotal": { + "type": "integer", + "description": "Total aggregated number of collections.", + "x-example": 0, + "format": "int32" + }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents.", + "x-example": 0, + "format": "int32" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Total aggregated number of total storage used in bytes.", + "x-example": 0, + "format": "int32" + }, + "databaseReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databaseWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "Aggregated number of collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated storage used in bytes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databaseWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "collectionsTotal", + "tablesTotal", + "documentsTotal", + "rowsTotal", + "storageTotal", + "databaseReadsTotal", + "databaseWritesTotal", + "collections", + "tables", + "documents", + "rows", + "storage", + "databaseReads", + "databaseWrites" + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } + }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } + }, + "usageCollection": { + "description": "UsageCollection", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of of documents.", + "x-example": 0, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "Aggregated number of documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "documentsTotal", + "documents" + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } + }, + "usageUsers": { + "description": "UsageUsers", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of statistics of users.", + "x-example": 0, + "format": "int32" + }, + "sessionsTotal": { + "type": "integer", + "description": "Total aggregated number of active sessions.", + "x-example": 0, + "format": "int32" + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "sessions": { + "type": "array", + "description": "Aggregated number of active sessions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "usersTotal", + "sessionsTotal", + "users", + "sessions" + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } + }, + "usagePresence": { + "description": "UsagePresence", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "usersOnlineTotal": { + "type": "integer", + "description": "Current total number of online users.", + "x-example": 0, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "Aggregated number of online users per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "usersOnlineTotal", + "presences" + ], + "example": { + "range": "30d", + "usersOnlineTotal": 0, + "presences": [] + } + }, + "usageStorage": { + "description": "StorageUsage", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "bucketsTotal": { + "type": "integer", + "description": "Total aggregated number of buckets", + "x-example": 0, + "format": "int32" + }, + "filesTotal": { + "type": "integer", + "description": "Total aggregated number of files.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated number of files storage (in bytes).", + "x-example": 0, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "Aggregated number of buckets per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "files": { + "type": "array", + "description": "Aggregated number of files per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated number of files storage (in bytes) per period .", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "bucketsTotal", + "filesTotal", + "filesStorageTotal", + "buckets", + "files", + "storage" + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } + }, + "usageBuckets": { + "description": "UsageBuckets", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "filesTotal": { + "type": "integer", + "description": "Total aggregated number of bucket files.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated number of bucket files storage (in bytes).", + "x-example": 0, + "format": "int32" + }, + "files": { + "type": "array", + "description": "Aggregated number of bucket files per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "storage": { + "type": "array", + "description": "Aggregated number of bucket storage files (in bytes) per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "imageTransformations": { + "type": "array", + "description": "Aggregated number of files transformations per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "imageTransformationsTotal": { + "type": "integer", + "description": "Total aggregated number of files transformations.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "range", + "filesTotal", + "filesStorageTotal", + "files", + "storage", + "imageTransformations", + "imageTransformationsTotal" + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } + }, + "usageFunctions": { + "description": "UsageFunctions", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "functionsTotal": { + "type": "integer", + "description": "Total aggregated number of functions.", + "x-example": 0, + "format": "int32" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of functions deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of functions deployment storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of functions build.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of functions build storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of functions build compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of functions build mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of functions execution.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of functions execution compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of functions execution mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "Aggregated number of functions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": 0 + }, + "deployments": { + "type": "array", + "description": "Aggregated number of functions deployment per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of functions deployment storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed function builds.", + "x-example": 0, + "format": "int32" + }, + "builds": { + "type": "array", + "description": "Aggregated number of functions build per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of functions build storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of functions build compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated sum of functions build mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of functions execution per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of functions execution compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of functions mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful function builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed function builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "functionsTotal", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "functions", + "deployments", + "deploymentsStorage", + "buildsSuccessTotal", + "buildsFailedTotal", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed" + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } + }, + "usageFunction": { + "description": "UsageFunction", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of function deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of function deployments storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of function builds storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeAverage": { + "type": "integer", + "description": "Average builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "Aggregated number of function deployments per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of function deployments storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "builds": { + "type": "array", + "description": "Aggregated number of function builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of function builds storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of function builds compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated number of function builds mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of function executions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of function executions compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of function mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsSuccessTotal", + "buildsFailedTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsTimeAverage", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "deployments", + "deploymentsStorage", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed" + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } + }, + "usageSites": { + "description": "UsageSites", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "sitesTotal": { + "type": "integer", + "description": "Total aggregated number of sites.", + "x-example": 0, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "Aggregated number of sites per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of sites deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of sites deployment storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of sites build.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of sites build storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of sites build compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of sites build mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of sites execution.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of sites execution compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of sites execution mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "requestsTotal": { + "type": "integer", + "description": "Total aggregated number of requests.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "inboundTotal": { + "type": "integer", + "description": "Total aggregated inbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "inbound": { + "type": "array", + "description": "Aggregated number of inbound bandwidth per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "outboundTotal": { + "type": "integer", + "description": "Total aggregated outbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "outbound": { + "type": "array", + "description": "Aggregated number of outbound bandwidth per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deployments": { + "type": "array", + "description": "Aggregated number of sites deployment per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of sites deployment storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful site builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed site builds.", + "x-example": 0, + "format": "int32" + }, + "builds": { + "type": "array", + "description": "Aggregated number of sites build per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of sites build storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of sites build compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated sum of sites build mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of sites execution per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of sites execution compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of sites mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful site builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed site builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "sitesTotal", + "sites", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "requestsTotal", + "requests", + "inboundTotal", + "inbound", + "outboundTotal", + "outbound", + "deployments", + "deploymentsStorage", + "buildsSuccessTotal", + "buildsFailedTotal", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed" + ], + "example": { + "range": "30d", + "sitesTotal": 0, + "sites": [], + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [], + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } + }, + "usageSite": { + "description": "UsageSite", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "deploymentsTotal": { + "type": "integer", + "description": "Total aggregated number of function deployments.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of function deployments storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsSuccessTotal": { + "type": "integer", + "description": "Total aggregated number of successful function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsFailedTotal": { + "type": "integer", + "description": "Total aggregated number of failed function builds.", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "total aggregated sum of function builds storage.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsTimeAverage": { + "type": "integer", + "description": "Average builds compute time.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "executionsTimeTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions compute time.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated sum of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "Aggregated number of function deployments per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "deploymentsStorage": { + "type": "array", + "description": "Aggregated number of function deployments storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "builds": { + "type": "array", + "description": "Aggregated number of function builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsStorage": { + "type": "array", + "description": "Aggregated sum of function builds storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsTime": { + "type": "array", + "description": "Aggregated sum of function builds compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsMbSeconds": { + "type": "array", + "description": "Aggregated number of function builds mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of function executions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsTime": { + "type": "array", + "description": "Aggregated number of function executions compute time per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsMbSeconds": { + "type": "array", + "description": "Aggregated number of function mbSeconds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsSuccess": { + "type": "array", + "description": "Aggregated number of successful builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "buildsFailed": { + "type": "array", + "description": "Aggregated number of failed builds per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "requestsTotal": { + "type": "integer", + "description": "Total aggregated number of requests.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "inboundTotal": { + "type": "integer", + "description": "Total aggregated inbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "inbound": { + "type": "array", + "description": "Aggregated number of inbound bandwidth per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "outboundTotal": { + "type": "integer", + "description": "Total aggregated outbound bandwidth.", + "x-example": 0, + "format": "int32" + }, + "outbound": { + "type": "array", + "description": "Aggregated number of outbound bandwidth per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "deploymentsTotal", + "deploymentsStorageTotal", + "buildsTotal", + "buildsSuccessTotal", + "buildsFailedTotal", + "buildsStorageTotal", + "buildsTimeTotal", + "buildsTimeAverage", + "buildsMbSecondsTotal", + "executionsTotal", + "executionsTimeTotal", + "executionsMbSecondsTotal", + "deployments", + "deploymentsStorage", + "builds", + "buildsStorage", + "buildsTime", + "buildsMbSeconds", + "executions", + "executionsTime", + "executionsMbSeconds", + "buildsSuccess", + "buildsFailed", + "requestsTotal", + "requests", + "inboundTotal", + "inbound", + "outboundTotal", + "outbound" + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } + }, + "usageProject": { + "description": "UsageProject", + "type": "object", + "properties": { + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents in legacy\/tablesdb.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDocumentsTotal": { + "type": "integer", + "description": "Total aggregated number of documents in documentsdb.", + "x-example": 0, + "format": "int32" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, + "databasesTotal": { + "type": "integer", + "description": "Total aggregated number of databases.", + "x-example": 0, + "format": "int32" + }, + "documentsdbTotal": { + "type": "integer", + "description": "Total aggregated number of documentsdb.", + "x-example": 0, + "format": "int32" + }, + "databasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of databases storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of documentsdb databases storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of users.", + "x-example": 0, + "format": "int32" + }, + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of files storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "functionsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of functions storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "buildsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of builds storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of deployments storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "bucketsTotal": { + "type": "integer", + "description": "Total aggregated number of buckets.", + "x-example": 0, + "format": "int32" + }, + "executionsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "buildsMbSecondsTotal": { + "type": "integer", + "description": "Total aggregated number of function builds mbSeconds.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Total number of databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Total number of databases writes.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesReadsTotal": { + "type": "integer", + "description": "Total number of documentsdb databases reads.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesWritesTotal": { + "type": "integer", + "description": "Total number of documentsdb databases writes.", + "x-example": 0, + "format": "int32" + }, + "requests": { + "type": "array", + "description": "Aggregated number of requests per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "network": { + "type": "array", + "description": "Aggregated number of consumed bandwidth per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated number of executions per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "executionsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of executions by functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "bucketsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of usage by buckets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "databasesStorageBreakdown": { + "type": "array", + "description": "An array of the aggregated breakdown of storage usage by databases.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "executionsMbSecondsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "buildsMbSecondsBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of build mbSeconds by functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "functionsStorageBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of functions storage size (in bytes).", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "authPhoneTotal": { + "type": "integer", + "description": "Total aggregated number of phone auth.", + "x-example": 0, + "format": "int32" + }, + "authPhoneEstimate": { + "type": "number", + "description": "Estimated total aggregated cost of phone auth.", + "x-example": 0, + "format": "double" + }, + "authPhoneCountryBreakdown": { + "type": "array", + "description": "Aggregated breakdown in totals of phone auth by country.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metricBreakdown" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "An array of aggregated number of database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "An array of aggregated number of database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesReads": { + "type": "array", + "description": "An array of aggregated number of documentsdb database reads.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesWrites": { + "type": "array", + "description": "An array of aggregated number of documentsdb database writes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesStorage": { + "type": "array", + "description": "An array of aggregated sum of documentsdb databases storage size (in bytes) per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "imageTransformations": { + "type": "array", + "description": "An array of aggregated number of image transformations.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "imageTransformationsTotal": { + "type": "integer", + "description": "Total aggregated number of image transformations.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB databases.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbCollectionsTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB collections.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDocumentsTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB documents.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesStorageTotal": { + "type": "integer", + "description": "Total aggregated VectorsDB storage (bytes).", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesReadsTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB reads.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabasesWritesTotal": { + "type": "integer", + "description": "Total aggregated number of VectorsDB writes.", + "x-example": 0, + "format": "int32" + }, + "vectorsdbDatabases": { + "type": "array", + "description": "Aggregated VectorsDB databases per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "vectorsdbCollections": { + "type": "array", + "description": "Aggregated VectorsDB collections per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "vectorsdbDocuments": { + "type": "array", + "description": "Aggregated VectorsDB documents per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesStorage": { + "type": "array", + "description": "Aggregated VectorsDB storage per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesReads": { + "type": "array", + "description": "Aggregated VectorsDB reads per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesWrites": { + "type": "array", + "description": "Aggregated VectorsDB writes per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, + "embeddingsText": { + "type": "object", + "description": "Aggregated number of text embedding calls per period.", + "x-example": [], + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextTokens": { + "type": "object", + "description": "Aggregated number of tokens processed by text embeddings per period.", + "x-example": [], + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextDuration": { + "type": "object", + "description": "Aggregated duration spent generating text embeddings per period.", + "x-example": [], + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextErrors": { + "type": "object", + "description": "Aggregated number of errors while generating text embeddings per period.", + "x-example": [], + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextTotal": { + "type": "object", + "description": "Total aggregated number of text embedding calls.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextTokensTotal": { + "type": "object", + "description": "Total aggregated number of tokens processed by text.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextDurationTotal": { + "type": "object", + "description": "Total aggregated duration spent generating text embeddings.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + }, + "embeddingsTextErrorsTotal": { + "type": "object", + "description": "Total aggregated number of errors while generating text embeddings.", + "x-example": 0, + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + } + } + }, + "required": [ + "executionsTotal", + "documentsTotal", + "documentsdbDocumentsTotal", + "rowsTotal", + "databasesTotal", + "documentsdbTotal", + "databasesStorageTotal", + "documentsdbDatabasesStorageTotal", + "usersTotal", + "filesStorageTotal", + "functionsStorageTotal", + "buildsStorageTotal", + "deploymentsStorageTotal", + "bucketsTotal", + "executionsMbSecondsTotal", + "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "documentsdbDatabasesReadsTotal", + "documentsdbDatabasesWritesTotal", + "requests", + "network", + "users", + "executions", + "executionsBreakdown", + "bucketsBreakdown", + "databasesStorageBreakdown", + "executionsMbSecondsBreakdown", + "buildsMbSecondsBreakdown", + "functionsStorageBreakdown", + "authPhoneTotal", + "authPhoneEstimate", + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites", + "documentsdbDatabasesReads", + "documentsdbDatabasesWrites", + "documentsdbDatabasesStorage", + "imageTransformations", + "imageTransformationsTotal", + "vectorsdbDatabasesTotal", + "vectorsdbCollectionsTotal", + "vectorsdbDocumentsTotal", + "vectorsdbDatabasesStorageTotal", + "vectorsdbDatabasesReadsTotal", + "vectorsdbDatabasesWritesTotal", + "vectorsdbDatabases", + "vectorsdbCollections", + "vectorsdbDocuments", + "vectorsdbDatabasesStorage", + "vectorsdbDatabasesReads", + "vectorsdbDatabasesWrites", + "embeddingsText", + "embeddingsTextTokens", + "embeddingsTextDuration", + "embeddingsTextErrors", + "embeddingsTextTotal", + "embeddingsTextTokensTotal", + "embeddingsTextDurationTotal", + "embeddingsTextErrorsTotal" + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "documentsdbDocumentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "documentsdbTotal": 0, + "databasesStorageTotal": 0, + "documentsdbDatabasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "documentsdbDatabasesReadsTotal": 0, + "documentsdbDatabasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "documentsdbDatabasesReads": [], + "documentsdbDatabasesWrites": [], + "documentsdbDatabasesStorage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0, + "vectorsdbDatabasesTotal": 0, + "vectorsdbCollectionsTotal": 0, + "vectorsdbDocumentsTotal": 0, + "vectorsdbDatabasesStorageTotal": 0, + "vectorsdbDatabasesReadsTotal": 0, + "vectorsdbDatabasesWritesTotal": 0, + "vectorsdbDatabases": [], + "vectorsdbCollections": [], + "vectorsdbDocuments": [], + "vectorsdbDatabasesStorage": [], + "vectorsdbDatabasesReads": [], + "vectorsdbDatabasesWrites": [], + "embeddingsText": [], + "embeddingsTextTokens": [], + "embeddingsTextDuration": [], + "embeddingsTextErrors": [], + "embeddingsTextTotal": 0, + "embeddingsTextTokensTotal": 0, + "embeddingsTextDurationTotal": 0, + "embeddingsTextErrorsTotal": 0 + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } + }, + "proxyRule": { + "description": "Rule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Rule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Rule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": "appwrite.company.com" + }, + "type": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", + "x-example": "deployment" + }, + "trigger": { + "type": "string", + "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", + "x-example": "manual" + }, + "redirectUrl": { + "type": "string", + "description": "URL to redirect to. Used if type is \"redirect\"", + "x-example": "https:\/\/appwrite.io\/docs" + }, + "redirectStatusCode": { + "type": "integer", + "description": "Status code to apply during redirect. Used if type is \"redirect\"", + "x-example": 301, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "ID of deployment. Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" + }, + "deploymentResourceType": { + "type": "string", + "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "x-example": "function", + "enum": [ + "function", + "site" + ], + "x-nullable": true + }, + "deploymentResourceId": { + "type": "string", + "description": "ID deployment's resource. Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" + }, + "deploymentVcsProviderBranch": { + "type": "string", + "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", + "x-example": "main" + }, + "status": { + "type": "string", + "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] + }, + "logs": { + "type": "string", + "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", + "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + }, + "renewAt": { + "type": "string", + "description": "Certificate auto-renewal date in ISO 8601 format.", + "x-example": "datetime" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "type", + "trigger", + "redirectUrl", + "redirectStatusCode", + "deploymentId", + "deploymentResourceId", + "deploymentVcsProviderBranch", + "status", + "logs", + "renewAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "main", + "status": "verified", + "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", + "renewAt": "datetime" + } + }, + "schedule": { + "description": "Schedule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Schedule ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Schedule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Schedule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type associated with this schedule.", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "The resource ID associated with this schedule.", + "x-example": "5e5ea5c16897e" + }, + "resourceUpdatedAt": { + "type": "string", + "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { + "type": "string", + "description": "The project ID associated with this schedule.", + "x-example": "5e5ea5c16897e" + }, + "schedule": { + "type": "string", + "description": "The CRON schedule expression.", + "x-example": "5 4 * * *" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Schedule data used to store resource-specific context needed for execution.", + "x-example": [] + }, + "active": { + "type": "boolean", + "description": "Whether the schedule is active.", + "x-example": true + }, + "region": { + "type": "string", + "description": "The region where the schedule is deployed.", + "x-example": "fra" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "resourceType", + "resourceId", + "resourceUpdatedAt", + "projectId", + "schedule", + "data", + "active", + "region" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "function", + "resourceId": "5e5ea5c16897e", + "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "schedule": "5 4 * * *", + "data": [], + "active": true, + "region": "fra" + } + }, + "emailTemplate": { + "description": "EmailTemplate", + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Template type", + "x-example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." + }, + "senderName": { + "type": "string", + "description": "Name of the sender", + "x-example": "My User" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "x-example": "mail@appwrite.io" + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" + }, + "replyToName": { + "type": "string", + "description": "Reply to name", + "x-example": "Support Team" + }, + "subject": { + "type": "string", + "description": "Email subject", + "x-example": "Please verify your email address" + } + }, + "required": [ + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" + ], + "example": { + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" + } + }, + "consoleVariables": { + "description": "Console Variables", + "type": "object", + "properties": { + "_APP_DOMAIN_TARGET_CNAME": { + "type": "string", + "description": "CNAME target for your Appwrite custom domains.", + "x-example": "appwrite.io" + }, + "_APP_DOMAIN_TARGET_A": { + "type": "string", + "description": "A target for your Appwrite custom domains.", + "x-example": "127.0.0.1" + }, + "_APP_COMPUTE_BUILD_TIMEOUT": { + "type": "integer", + "description": "Maximum build timeout in seconds.", + "x-example": 900, + "format": "int32" + }, + "_APP_DOMAIN_TARGET_AAAA": { + "type": "string", + "description": "AAAA target for your Appwrite custom domains.", + "x-example": "::1" + }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, + "_APP_STORAGE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for file upload in bytes.", + "x-example": "30000000", + "format": "int32" + }, + "_APP_COMPUTE_SIZE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for deployment in bytes.", + "x-example": "30000000", + "format": "int32" + }, + "_APP_USAGE_STATS": { + "type": "string", + "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", + "x-example": "enabled" + }, + "_APP_VCS_ENABLED": { + "type": "boolean", + "description": "Defines if VCS (Version Control System) is enabled.", + "x-example": true + }, + "_APP_DOMAIN_ENABLED": { + "type": "boolean", + "description": "Defines if main domain is configured. If so, custom domains can be created.", + "x-example": true + }, + "_APP_ASSISTANT_ENABLED": { + "type": "boolean", + "description": "Defines if AI assistant is enabled.", + "x-example": true + }, + "_APP_DOMAIN_SITES": { + "type": "string", + "description": "A comma separated list of domains to use for site URLs.", + "x-example": "sites.localhost,sites.example.com" + }, + "_APP_DOMAIN_FUNCTIONS": { + "type": "string", + "description": "A domain to use for function URLs.", + "x-example": "functions.localhost" + }, + "_APP_OPTIONS_FORCE_HTTPS": { + "type": "string", + "description": "Defines if HTTPS is enforced for all requests.", + "x-example": "enabled" + }, + "_APP_DOMAINS_NAMESERVERS": { + "type": "string", + "description": "Comma-separated list of nameservers.", + "x-example": "ns1.example.com,ns2.example.com" + }, + "_APP_DB_ADAPTER": { + "type": "string", + "description": "Database adapter in use.", + "x-example": "mysql" + }, + "supportForRelationships": { + "type": "boolean", + "description": "Whether the database adapter supports relationships.", + "x-example": true + }, + "supportForOperators": { + "type": "boolean", + "description": "Whether the database adapter supports operators.", + "x-example": true + }, + "supportForSpatials": { + "type": "boolean", + "description": "Whether the database adapter supports spatial attributes.", + "x-example": true + }, + "supportForSpatialIndexNull": { + "type": "boolean", + "description": "Whether the database adapter supports spatial indexes on nullable columns.", + "x-example": false + }, + "supportForFulltextWildcard": { + "type": "boolean", + "description": "Whether the database adapter supports fulltext wildcard search.", + "x-example": true + }, + "supportForMultipleFulltextIndexes": { + "type": "boolean", + "description": "Whether the database adapter supports multiple fulltext indexes per collection.", + "x-example": true + }, + "supportForAttributeResizing": { + "type": "boolean", + "description": "Whether the database adapter supports resizing attributes.", + "x-example": true + }, + "supportForSchemas": { + "type": "boolean", + "description": "Whether the database adapter supports fixed schemas with row width limits.", + "x-example": true + }, + "maxIndexLength": { + "type": "integer", + "description": "Maximum index length supported by the database adapter.", + "x-example": 768, + "format": "int32" + }, + "supportForIntegerIds": { + "type": "boolean", + "description": "Whether the database adapter uses integer sequence IDs.", + "x-example": true + } + }, + "required": [ + "_APP_DOMAIN_TARGET_CNAME", + "_APP_DOMAIN_TARGET_A", + "_APP_COMPUTE_BUILD_TIMEOUT", + "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", + "_APP_STORAGE_LIMIT", + "_APP_COMPUTE_SIZE_LIMIT", + "_APP_USAGE_STATS", + "_APP_VCS_ENABLED", + "_APP_DOMAIN_ENABLED", + "_APP_ASSISTANT_ENABLED", + "_APP_DOMAIN_SITES", + "_APP_DOMAIN_FUNCTIONS", + "_APP_OPTIONS_FORCE_HTTPS", + "_APP_DOMAINS_NAMESERVERS", + "_APP_DB_ADAPTER", + "supportForRelationships", + "supportForOperators", + "supportForSpatials", + "supportForSpatialIndexNull", + "supportForFulltextWildcard", + "supportForMultipleFulltextIndexes", + "supportForAttributeResizing", + "supportForSchemas", + "maxIndexLength", + "supportForIntegerIds" + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_COMPUTE_BUILD_TIMEOUT": 900, + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", + "_APP_DB_ADAPTER": "mysql", + "supportForRelationships": true, + "supportForOperators": true, + "supportForSpatials": true, + "supportForSpatialIndexNull": false, + "supportForFulltextWildcard": true, + "supportForMultipleFulltextIndexes": true, + "supportForAttributeResizing": true, + "supportForSchemas": true, + "maxIndexLength": 768, + "supportForIntegerIds": true + } + }, + "consoleOAuth2ProviderParameter": { + "description": "Console OAuth2 Provider Parameter", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", + "x-example": "clientId" + }, + "name": { + "type": "string", + "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", + "x-example": "Client ID or App ID" + }, + "example": { + "type": "string", + "description": "Example value for this parameter.", + "x-example": "e4d87900000000540733" + }, + "hint": { + "type": "string", + "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", + "x-example": "Example of wrong value: 370006" + } + }, + "required": [ + "$id", + "name", + "example", + "hint" + ], + "example": { + "$id": "clientId", + "name": "Client ID or App ID", + "example": "e4d87900000000540733", + "hint": "Example of wrong value: 370006" + } + }, + "consoleOAuth2Provider": { + "description": "Console OAuth2 Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "parameters": { + "type": "array", + "description": "List of parameters required to configure this OAuth2 provider.", + "items": { + "type": "object", + "$ref": "#\/definitions\/consoleOAuth2ProviderParameter" + }, + "x-example": "" + } + }, + "required": [ + "$id", + "parameters" + ], + "example": { + "$id": "github", + "parameters": "" + } + }, + "consoleOAuth2ProviderList": { + "description": "Console OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers exposed by the server.", + "x-example": 5, + "format": "int32" + }, + "oAuth2Providers": { + "type": "array", + "description": "List of OAuth2 providers, each with the parameters required to configure it.", + "items": { + "type": "object", + "$ref": "#\/definitions\/consoleOAuth2Provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "oAuth2Providers" + ], + "example": { + "total": 5, + "oAuth2Providers": "" + } + }, + "consoleKeyScope": { + "description": "Console Key Scope", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Scope ID.", + "x-example": "users.read" + }, + "description": { + "type": "string", + "description": "Scope description.", + "x-example": "Access to read your project's users" + }, + "category": { + "type": "string", + "description": "Scope category.", + "x-example": "Auth" + }, + "deprecated": { + "type": "boolean", + "description": "Scope is deprecated.", + "x-example": true + } + }, + "required": [ + "$id", + "description", + "category", + "deprecated" + ], + "example": { + "$id": "users.read", + "description": "Access to read your project's users", + "category": "Auth", + "deprecated": true + } + }, + "consoleKeyScopeList": { + "description": "Console Key Scopes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of key scopes exposed by the server.", + "x-example": 5, + "format": "int32" + }, + "scopes": { + "type": "array", + "description": "List of key scopes, each with its ID and description.", + "items": { + "type": "object", + "$ref": "#\/definitions\/consoleKeyScope" + }, + "x-example": "" + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "x-nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "processing", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "processing" + } + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "x-nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + }, + "migration": { + "description": "Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Migration ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Migration creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Migration status ( pending, processing, failed, completed ) ", + "x-example": "pending" + }, + "stage": { + "type": "string", + "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", + "x-example": "init" + }, + "source": { + "type": "string", + "description": "A string containing the type of source of the migration.", + "x-example": "Appwrite" + }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, + "resources": { + "type": "array", + "description": "Resources to migrate.", + "items": { + "type": "string" + }, + "x-example": [ + "user" + ] + }, + "resourceId": { + "type": "string", + "description": "Id of the resource to migrate.", + "x-example": "databaseId:collectionId" + }, + "statusCounters": { + "type": "object", + "additionalProperties": true, + "description": "A group of counters that represent the total progress of the migration.", + "x-example": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}" + }, + "resourceData": { + "type": "object", + "additionalProperties": true, + "description": "An array of objects containing the report data of the resources that were migrated.", + "x-example": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]" + }, + "errors": { + "type": "array", + "description": "All errors that occurred during the migration process.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Migration options used during the migration process.", + "x-example": "{\"bucketId\": \"exports\", \"notify\": false}" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "stage", + "source", + "destination", + "resources", + "resourceId", + "statusCounters", + "resourceData", + "errors", + "options" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [], + "options": "{\"bucketId\": \"exports\", \"notify\": false}" + } + }, + "migrationReport": { + "description": "Migration Report", + "type": "object", + "properties": { + "user": { + "type": "integer", + "description": "Number of users to be migrated.", + "x-example": 20, + "format": "int32" + }, + "team": { + "type": "integer", + "description": "Number of teams to be migrated.", + "x-example": 20, + "format": "int32" + }, + "database": { + "type": "integer", + "description": "Number of databases to be migrated.", + "x-example": 20, + "format": "int32" + }, + "row": { + "type": "integer", + "description": "Number of rows to be migrated.", + "x-example": 20, + "format": "int32" + }, + "file": { + "type": "integer", + "description": "Number of files to be migrated.", + "x-example": 20, + "format": "int32" + }, + "bucket": { + "type": "integer", + "description": "Number of buckets to be migrated.", + "x-example": 20, + "format": "int32" + }, + "function": { + "type": "integer", + "description": "Number of functions to be migrated.", + "x-example": 20, + "format": "int32" + }, + "site": { + "type": "integer", + "description": "Number of sites to be migrated.", + "x-example": 5, + "format": "int32" + }, + "provider": { + "type": "integer", + "description": "Number of providers to be migrated.", + "x-example": 5, + "format": "int32" + }, + "topic": { + "type": "integer", + "description": "Number of topics to be migrated.", + "x-example": 10, + "format": "int32" + }, + "subscriber": { + "type": "integer", + "description": "Number of subscribers to be migrated.", + "x-example": 100, + "format": "int32" + }, + "message": { + "type": "integer", + "description": "Number of messages to be migrated.", + "x-example": 50, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of files to be migrated in mb.", + "x-example": 30000, + "format": "int32" + }, + "version": { + "type": "string", + "description": "Version of the Appwrite instance to be migrated.", + "x-example": "1.4.0" + } + }, + "required": [ + "user", + "team", + "database", + "row", + "file", + "bucket", + "function", + "site", + "provider", + "topic", + "subscriber", + "message", + "size", + "version" + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "site": 5, + "provider": 5, + "topic": 10, + "subscriber": 100, + "message": 50, + "size": 30000, + "version": "1.4.0" + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json new file mode 100644 index 0000000000..3d066900c9 --- /dev/null +++ b/app/config/specs/swagger2-latest-server.json @@ -0,0 +1,68959 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.9.3", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "host": "cloud.appwrite.io", + "x-host-docs": "<REGION>.cloud.appwrite.io", + "basePath": "\/v1", + "schemes": [ + "https" + ], + "consumes": [ + "application\/json", + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "securityDefinitions": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_PROJECT_ID>" + } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_API_KEY>" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_JWT>" + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "demo": "en" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header" + }, + "ForwardedUserAgent": { + "type": "apiKey", + "name": "X-Forwarded-User-Agent", + "description": "The user agent string of the client that made the request", + "in": "header" + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", + "in": "header" + } + }, + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "account", + "weight": 9, + "cookies": false, + "type": "", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "account", + "weight": 8, + "cookies": false, + "type": "", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "account", + "weight": 34, + "cookies": false, + "type": "", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "tokens", + "weight": 29, + "cookies": false, + "type": "", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" + } + } + } + } + ] + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 31, + "cookies": false, + "type": "", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "weight": 166, + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "schema": { + "$ref": "#\/definitions\/mfaType" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaAuthenticator", + "group": "mfa", + "weight": 168, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaAuthenticator", + "group": "mfa", + "weight": 169, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 170, + "cookies": false, + "type": "", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "schema": { + "$ref": "#\/definitions\/mfaChallenge" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaChallenge", + "group": "mfa", + "weight": 174, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "factor": { + "type": "string", + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [] + } + }, + "required": [ + "factor" + ] + } + } + ] + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaChallenge", + "group": "mfa", + "weight": 175, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "challengeId": { + "type": "string", + "description": "ID of the challenge.", + "default": null, + "x-example": "<CHALLENGE_ID>" + }, + "otp": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + ] + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 167, + "cookies": false, + "type": "", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 173, + "cookies": false, + "type": "", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 171, + "cookies": false, + "type": "", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 172, + "cookies": false, + "type": "", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "account", + "weight": 32, + "cookies": false, + "type": "", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "account", + "weight": 33, + "cookies": false, + "type": "", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": null + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "account", + "weight": 35, + "cookies": false, + "type": "", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + ] + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "account", + "weight": 30, + "cookies": false, + "type": "", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "account", + "weight": 36, + "cookies": false, + "type": "", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + ] + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecovery", + "group": "recovery", + "weight": 39, + "cookies": false, + "type": "", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "default": null, + "x-example": "<SECRET>" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 11, + "cookies": false, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 12, + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "weight": 17, + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailPasswordSession", + "group": "sessions", + "weight": 16, + "cookies": false, + "type": "", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + ] + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMagicURLSession", + "group": "sessions", + "weight": 26, + "cookies": false, + "type": "", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "weight": 27, + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 18, + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "weight": 13, + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "weight": 15, + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 14, + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "account", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailToken", + "group": "tokens", + "weight": 25, + "cookies": false, + "type": "", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMagicURLToken", + "group": "tokens", + "weight": 24, + "cookies": false, + "type": "", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "type": "boolean", + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "default": false, + "x-example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + ] + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "consumes": [], + "produces": [ + "text\/html" + ], + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "301": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Token", + "group": "tokens", + "weight": 23, + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "required": true, + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneToken", + "group": "tokens", + "weight": 28, + "cookies": false, + "type": "", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "default": null, + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + ] + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailVerification", + "group": "verification", + "weight": 40, + "cookies": false, + "type": "", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + ] + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "verification", + "weight": 41, + "cookies": false, + "type": "", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPhoneVerification", + "group": "verification", + "weight": 42, + "cookies": false, + "type": "", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "verification", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "weight": 177, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "weight": 176, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "weight": 180, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "weight": 178, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "weight": 179, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "weight": 182, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "", + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "weight": 181, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "<TEXT>", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "weight": 183, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "type": "object", + "default": [], + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": "2", + "default": 1, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "light", + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "", + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "type": "boolean", + "x-example": "true", + "default": false, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "en-US", + "default": "", + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "type": "string", + "x-example": "america\/new_york", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "", + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "type": "number", + "format": "float", + "x-example": "100", + "default": 0, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "type": "boolean", + "x-example": "true", + "default": false, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [], + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "", + "in": "query" + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "list", + "group": "databases", + "weight": 191, + "cookies": false, + "type": "", + "demo": "databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "queries", + "search", + "total" + ], + "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.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "databasesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "create", + "group": "databases", + "weight": 187, + "cookies": false, + "type": "", + "demo": "databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 259, + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 255, + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 256, + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 257, + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 258, + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 260, + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "get", + "group": "databases", + "weight": 188, + "cookies": false, + "type": "", + "demo": "databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "update", + "group": "databases", + "weight": 189, + "cookies": false, + "type": "", + "demo": "databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "delete", + "group": "databases", + "weight": 190, + "cookies": false, + "type": "", + "demo": "databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "desc": "", + "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.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "schema": { + "$ref": "#\/definitions\/collectionList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 199, + "cookies": false, + "type": "", + "demo": "databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collections", + "operationId": "databasesCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 195, + "cookies": false, + "type": "", + "demo": "databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 196, + "cookies": false, + "type": "", + "demo": "databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 197, + "cookies": false, + "type": "", + "demo": "databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 198, + "cookies": false, + "type": "", + "demo": "databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "schema": { + "$ref": "#\/definitions\/attributeList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listAttributes", + "group": "attributes", + "weight": 216, + "cookies": false, + "type": "", + "demo": "databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createBooleanAttribute", + "group": "attributes", + "weight": 217, + "cookies": false, + "type": "", + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "schema": { + "$ref": "#\/definitions\/attributeBoolean" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateBooleanAttribute", + "group": "attributes", + "weight": 218, + "cookies": false, + "type": "", + "demo": "databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDatetimeAttribute", + "group": "attributes", + "weight": 219, + "cookies": false, + "type": "", + "demo": "databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update datetime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "schema": { + "$ref": "#\/definitions\/attributeDatetime" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "group": "attributes", + "weight": 220, + "cookies": false, + "type": "", + "demo": "databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEmailAttribute", + "group": "attributes", + "weight": 221, + "cookies": false, + "type": "", + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "schema": { + "$ref": "#\/definitions\/attributeEmail" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEmailAttribute", + "group": "attributes", + "weight": 222, + "cookies": false, + "type": "", + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEnumAttribute", + "group": "attributes", + "weight": 223, + "cookies": false, + "type": "", + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "schema": { + "$ref": "#\/definitions\/attributeEnum" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEnumAttribute", + "group": "attributes", + "weight": 224, + "cookies": false, + "type": "", + "demo": "databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFloatAttribute", + "group": "attributes", + "weight": 225, + "cookies": false, + "type": "", + "demo": "databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "schema": { + "$ref": "#\/definitions\/attributeFloat" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFloatAttribute", + "group": "attributes", + "weight": 226, + "cookies": false, + "type": "", + "demo": "databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateFloatColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIntegerAttribute", + "group": "attributes", + "weight": 227, + "cookies": false, + "type": "", + "demo": "databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIntegerColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "schema": { + "$ref": "#\/definitions\/attributeInteger" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIntegerAttribute", + "group": "attributes", + "weight": 228, + "cookies": false, + "type": "", + "demo": "databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIntegerColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIpAttribute", + "group": "attributes", + "weight": 229, + "cookies": false, + "type": "", + "demo": "databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIpColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "schema": { + "$ref": "#\/definitions\/attributeIp" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIpAttribute", + "group": "attributes", + "weight": 230, + "cookies": false, + "type": "", + "demo": "databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIpColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a geometric line attribute.", + "responses": { + "202": { + "description": "AttributeLine", + "schema": { + "$ref": "#\/definitions\/attributeLine" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createLineAttribute", + "group": "attributes", + "weight": 231, + "cookies": false, + "type": "", + "demo": "databases\/create-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLineColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeLine", + "schema": { + "$ref": "#\/definitions\/attributeLine" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateLineAttribute", + "group": "attributes", + "weight": 232, + "cookies": false, + "type": "", + "demo": "databases\/update-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLineColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a longtext attribute.\n", + "responses": { + "202": { + "description": "AttributeLongtext", + "schema": { + "$ref": "#\/definitions\/attributeLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextAttribute", + "group": "attributes", + "weight": 249, + "cookies": false, + "type": "", + "demo": "databases\/create-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeLongtext", + "schema": { + "$ref": "#\/definitions\/attributeLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextAttribute", + "group": "attributes", + "weight": 250, + "cookies": false, + "type": "", + "demo": "databases\/update-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a mediumtext attribute.\n", + "responses": { + "202": { + "description": "AttributeMediumtext", + "schema": { + "$ref": "#\/definitions\/attributeMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextAttribute", + "group": "attributes", + "weight": 247, + "cookies": false, + "type": "", + "demo": "databases\/create-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeMediumtext", + "schema": { + "$ref": "#\/definitions\/attributeMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextAttribute", + "group": "attributes", + "weight": 248, + "cookies": false, + "type": "", + "demo": "databases\/update-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a geometric point attribute.", + "responses": { + "202": { + "description": "AttributePoint", + "schema": { + "$ref": "#\/definitions\/attributePoint" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPointAttribute", + "group": "attributes", + "weight": 233, + "cookies": false, + "type": "", + "demo": "databases\/create-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPointColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePoint", + "schema": { + "$ref": "#\/definitions\/attributePoint" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePointAttribute", + "group": "attributes", + "weight": 234, + "cookies": false, + "type": "", + "demo": "databases\/update-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePointColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a geometric polygon attribute.", + "responses": { + "202": { + "description": "AttributePolygon", + "schema": { + "$ref": "#\/definitions\/attributePolygon" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPolygonAttribute", + "group": "attributes", + "weight": 235, + "cookies": false, + "type": "", + "demo": "databases\/create-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPolygonColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePolygon", + "schema": { + "$ref": "#\/definitions\/attributePolygon" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePolygonAttribute", + "group": "attributes", + "weight": 236, + "cookies": false, + "type": "", + "demo": "databases\/update-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePolygonColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createRelationshipAttribute", + "group": "attributes", + "weight": 237, + "cookies": false, + "type": "", + "demo": "databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRelationshipColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID.", + "default": null, + "x-example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "schema": { + "$ref": "#\/definitions\/attributeRelationship" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "group": "attributes", + "weight": 238, + "cookies": false, + "type": "", + "demo": "databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRelationshipColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringAttribute", + "group": "attributes", + "weight": 239, + "cookies": false, + "type": "", + "demo": "databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createStringColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "schema": { + "$ref": "#\/definitions\/attributeString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringAttribute", + "group": "attributes", + "weight": 240, + "cookies": false, + "type": "", + "demo": "databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateStringColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { + "post": { + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a text attribute.\n", + "responses": { + "202": { + "description": "AttributeText", + "schema": { + "$ref": "#\/definitions\/attributeText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextAttribute", + "group": "attributes", + "weight": 245, + "cookies": false, + "type": "", + "demo": "databases\/create-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { + "patch": { + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeText", + "schema": { + "$ref": "#\/definitions\/attributeText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextAttribute", + "group": "attributes", + "weight": 246, + "cookies": false, + "type": "", + "demo": "databases\/update-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createUrlAttribute", + "group": "attributes", + "weight": 241, + "cookies": false, + "type": "", + "demo": "databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createUrlColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "schema": { + "$ref": "#\/definitions\/attributeUrl" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateUrlAttribute", + "group": "attributes", + "weight": 242, + "cookies": false, + "type": "", + "demo": "databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateUrlColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "post": { + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a varchar attribute.\n", + "responses": { + "202": { + "description": "AttributeVarchar", + "schema": { + "$ref": "#\/definitions\/attributeVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharAttribute", + "group": "attributes", + "weight": 243, + "cookies": false, + "type": "", + "demo": "databases\/create-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { + "patch": { + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeVarchar", + "schema": { + "$ref": "#\/definitions\/attributeVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharAttribute", + "group": "attributes", + "weight": 244, + "cookies": false, + "type": "", + "demo": "databases\/update-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar attribute.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/attributeBoolean" + }, + { + "$ref": "#\/definitions\/attributeInteger" + }, + { + "$ref": "#\/definitions\/attributeFloat" + }, + { + "$ref": "#\/definitions\/attributeEmail" + }, + { + "$ref": "#\/definitions\/attributeEnum" + }, + { + "$ref": "#\/definitions\/attributeUrl" + }, + { + "$ref": "#\/definitions\/attributeIp" + }, + { + "$ref": "#\/definitions\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/attributeBoolean", + "integer": "#\/definitions\/attributeInteger", + "double": "#\/definitions\/attributeFloat", + "string": "#\/definitions\/attributeString", + "datetime": "#\/definitions\/attributeDatetime", + "relationship": "#\/definitions\/attributeRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/attributeBoolean": { + "type": "boolean" + }, + "#\/definitions\/attributeInteger": { + "type": "integer" + }, + "#\/definitions\/attributeFloat": { + "type": "double" + }, + "#\/definitions\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/attributeDatetime": { + "type": "datetime" + }, + "#\/definitions\/attributeRelationship": { + "type": "relationship" + }, + "#\/definitions\/attributeString": { + "type": "string" + } + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getAttribute", + "group": "attributes", + "weight": 214, + "cookies": false, + "type": "", + "demo": "databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteAttribute", + "group": "attributes", + "weight": 215, + "cookies": false, + "type": "", + "demo": "databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 210, + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 202, + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "desc": "Create documents", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 207, + "cookies": false, + "type": "", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "documents" + ] + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 205, + "cookies": false, + "type": "", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRows" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 209, + "cookies": false, + "type": "", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRows" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 203, + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 206, + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 204, + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 208, + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 213, + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 212, + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 254, + "cookies": false, + "type": "", + "demo": "databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listIndexes" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 251, + "cookies": false, + "type": "", + "demo": "databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "DatabasesIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get an index by its unique ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 252, + "cookies": false, + "type": "", + "demo": "databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 253, + "cookies": false, + "type": "", + "demo": "databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "documentsdb", + "weight": 338, + "cookies": false, + "type": "", + "demo": "documentsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "documentsDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "documentsdb", + "weight": 334, + "cookies": false, + "type": "", + "demo": "documentsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 366, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 362, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 363, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 364, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 365, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 367, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "documentsdb", + "weight": 335, + "cookies": false, + "type": "", + "demo": "documentsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "documentsdb", + "weight": 336, + "cookies": false, + "type": "", + "demo": "documentsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "documentsdb", + "weight": 337, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "schema": { + "$ref": "#\/definitions\/collectionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 345, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "documentsDBCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 341, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "documentsDBGetCollection", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 342, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { + "$ref": "#\/definitions\/collection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 343, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 344, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 359, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 351, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "put": { + "summary": "Upsert documents", + "operationId": "documentsDBUpsertDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 356, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "documentsDBUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 354, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "documentsDBDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 358, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 352, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 355, + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 353, + "cookies": false, + "type": "", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 357, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "weight": 361, + "cookies": false, + "type": "", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "weight": 360, + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "documentsDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 350, + "cookies": false, + "type": "", + "demo": "documentsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "documentsDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 347, + "cookies": false, + "type": "", + "demo": "documentsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "DocumentsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "documentsDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 348, + "cookies": false, + "type": "", + "demo": "documentsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "documentsDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "documentsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 349, + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/functions": { + "get": { + "summary": "List functions", + "operationId": "functionsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "schema": { + "$ref": "#\/definitions\/functionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "functions", + "weight": 422, + "cookies": false, + "type": "", + "demo": "functions\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create function", + "operationId": "functionsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "functions", + "weight": 419, + "cookies": false, + "type": "", + "demo": "functions\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<FUNCTION_ID>" + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": null, + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Function maximum execution time in seconds.", + "default": 15, + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "functionId", + "name", + "runtime" + ] + } + } + ] + } + }, + "\/functions\/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "schema": { + "$ref": "#\/definitions\/runtimeList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRuntimes", + "group": "runtimes", + "weight": 424, + "cookies": false, + "type": "", + "demo": "functions\/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "schema": { + "$ref": "#\/definitions\/specificationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "runtimes", + "weight": 425, + "cookies": false, + "type": "", + "demo": "functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/{functionId}": { + "get": { + "summary": "Get function", + "operationId": "functionsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "functions", + "weight": 420, + "cookies": false, + "type": "", + "demo": "functions\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "functions", + "weight": 421, + "cookies": false, + "type": "", + "demo": "functions\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": "", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "execute": { + "type": "array", + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Maximum execution time in seconds.", + "default": 15, + "x-example": 1, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "default": null, + "x-example": "<PROVIDER_REPOSITORY_ID>", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a function by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "functions", + "weight": 423, + "cookies": false, + "type": "", + "demo": "functions\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "responses": { + "200": { + "description": "Function", + "schema": { + "$ref": "#\/definitions\/function" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFunctionDeployment", + "group": "functions", + "weight": 428, + "cookies": false, + "type": "", + "demo": "functions\/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "functionsListDeployments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { + "$ref": "#\/definitions\/deploymentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 429, + "cookies": false, + "type": "", + "demo": "functions\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "functionsCreateDeployment", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 426, + "cookies": false, + "type": "upload", + "demo": "functions\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "entrypoint", + "description": "Entrypoint File.", + "required": false, + "type": "string", + "x-example": "<ENTRYPOINT>", + "in": "formData" + }, + { + "name": "commands", + "description": "Build Commands.", + "required": false, + "type": "string", + "x-example": "<COMMANDS>", + "in": "formData" + }, + { + "name": "code", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "activate", + "description": "Automatically activate the deployment when it is finished building.", + "required": true, + "type": "boolean", + "x-example": false, + "in": "formData" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 434, + "cookies": false, + "type": "", + "demo": "functions\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + }, + "buildId": { + "type": "string", + "description": "Build unique ID.", + "default": "", + "x-example": "<BUILD_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 431, + "cookies": false, + "type": "", + "demo": "functions\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "default": null, + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "default": null, + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "default": null, + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "default": null, + "x-example": "commit", + "enum": [ + "commit", + "branch", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 432, + "cookies": false, + "type": "", + "demo": "functions\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "default": null, + "x-example": "branch", + "enum": [ + "branch", + "commit" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "functionsGetDeployment", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 427, + "cookies": false, + "type": "", + "demo": "functions\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a code deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 430, + "cookies": false, + "type": "", + "demo": "functions\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "functions" + ], + "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 433, + "cookies": false, + "type": "location", + "demo": "functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source", + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 435, + "cookies": false, + "type": "", + "demo": "functions\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "weight": 438, + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "consumes": [ + "application\/json" + ], + "produces": [ + "multipart\/form-data" + ], + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "weight": 436, + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "<BODY>" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "<PATH>" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": "<SCHEDULED_AT>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getExecution", + "group": "executions", + "weight": 437, + "cookies": false, + "type": "", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "<EXECUTION_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteExecution", + "group": "executions", + "weight": 439, + "cookies": false, + "type": "", + "demo": "functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "<EXECUTION_ID>", + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 444, + "cookies": false, + "type": "", + "demo": "functions\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 442, + "cookies": false, + "type": "", + "demo": "functions\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + ] + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 443, + "cookies": false, + "type": "", + "demo": "functions\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 445, + "cookies": false, + "type": "", + "demo": "functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 446, + "cookies": false, + "type": "", + "demo": "functions\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "type": "string", + "x-example": "<FUNCTION_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "weight": 117, + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "mutation", + "group": "graphql", + "weight": 116, + "cookies": false, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } + ] + } + }, + "\/health": { + "get": { + "summary": "Get HTTP", + "operationId": "healthGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite HTTP server is up and responsive.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "health", + "weight": 449, + "cookies": false, + "type": "", + "demo": "health\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/anti-virus": { + "get": { + "summary": "Get antivirus", + "operationId": "healthGetAntivirus", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Antivirus", + "schema": { + "$ref": "#\/definitions\/healthAntivirus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAntivirus", + "group": "health", + "weight": 458, + "cookies": false, + "type": "", + "demo": "health\/get-antivirus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/cache": { + "get": { + "summary": "Get cache", + "operationId": "healthGetCache", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCache", + "group": "health", + "weight": 452, + "cookies": false, + "type": "", + "demo": "health\/get-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/certificate": { + "get": { + "summary": "Get the SSL certificate for a domain", + "operationId": "healthGetCertificate", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the SSL certificate for a domain", + "responses": { + "200": { + "description": "Health Certificate", + "schema": { + "$ref": "#\/definitions\/healthCertificate" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCertificate", + "group": "health", + "weight": 455, + "cookies": false, + "type": "", + "demo": "health\/get-certificate.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "string", + "required": false, + "type": "string", + "in": "query" + } + ] + } + }, + "\/health\/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite database servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDB", + "group": "health", + "weight": 451, + "cookies": false, + "type": "", + "demo": "health\/get-db.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/pubsub": { + "get": { + "summary": "Get pubsub", + "operationId": "healthGetPubSub", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPubSub", + "group": "health", + "weight": 453, + "cookies": false, + "type": "", + "demo": "health\/get-pub-sub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/queue\/audits": { + "get": { + "summary": "Get audits queue", + "operationId": "healthGetQueueAudits", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueAudits", + "group": "queue", + "weight": 459, + "cookies": false, + "type": "", + "demo": "health\/get-queue-audits.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/builds": { + "get": { + "summary": "Get builds queue", + "operationId": "healthGetQueueBuilds", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueBuilds", + "group": "queue", + "weight": 463, + "cookies": false, + "type": "", + "demo": "health\/get-queue-builds.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/certificates": { + "get": { + "summary": "Get certificates queue", + "operationId": "healthGetQueueCertificates", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueCertificates", + "group": "queue", + "weight": 462, + "cookies": false, + "type": "", + "demo": "health\/get-queue-certificates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/databases": { + "get": { + "summary": "Get databases queue", + "operationId": "healthGetQueueDatabases", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDatabases", + "group": "queue", + "weight": 464, + "cookies": false, + "type": "", + "demo": "health\/get-queue-databases.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Queue name for which to check the queue size", + "required": false, + "type": "string", + "x-example": "<NAME>", + "default": "database_db_main", + "in": "query" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/deletes": { + "get": { + "summary": "Get deletes queue", + "operationId": "healthGetQueueDeletes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueDeletes", + "group": "queue", + "weight": 465, + "cookies": false, + "type": "", + "demo": "health\/get-queue-deletes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/failed\/{name}": { + "get": { + "summary": "Get number of failed queue jobs", + "operationId": "healthGetFailedJobs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Returns the amount of failed jobs in a given queue.\n", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFailedJobs", + "group": "queue", + "weight": 472, + "cookies": false, + "type": "", + "demo": "health\/get-failed-jobs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name of the queue", + "required": true, + "type": "string", + "x-example": "v1-database", + "enum": [ + "v1-database", + "v1-deletes", + "v1-audits", + "v1-mails", + "v1-functions", + "v1-stats-resources", + "v1-stats-usage", + "v1-webhooks", + "v1-certificates", + "v1-builds", + "v1-screenshots", + "v1-messaging", + "v1-migrations" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/functions": { + "get": { + "summary": "Get functions queue", + "operationId": "healthGetQueueFunctions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueFunctions", + "group": "queue", + "weight": 469, + "cookies": false, + "type": "", + "demo": "health\/get-queue-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/logs": { + "get": { + "summary": "Get logs queue", + "operationId": "healthGetQueueLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueLogs", + "group": "queue", + "weight": 461, + "cookies": false, + "type": "", + "demo": "health\/get-queue-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/mails": { + "get": { + "summary": "Get mails queue", + "operationId": "healthGetQueueMails", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMails", + "group": "queue", + "weight": 466, + "cookies": false, + "type": "", + "demo": "health\/get-queue-mails.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/messaging": { + "get": { + "summary": "Get messaging queue", + "operationId": "healthGetQueueMessaging", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMessaging", + "group": "queue", + "weight": 467, + "cookies": false, + "type": "", + "demo": "health\/get-queue-messaging.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/migrations": { + "get": { + "summary": "Get migrations queue", + "operationId": "healthGetQueueMigrations", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueMigrations", + "group": "queue", + "weight": 468, + "cookies": false, + "type": "", + "demo": "health\/get-queue-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-resources": { + "get": { + "summary": "Get stats resources queue", + "operationId": "healthGetQueueStatsResources", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueStatsResources", + "group": "queue", + "weight": 470, + "cookies": false, + "type": "", + "demo": "health\/get-queue-stats-resources.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/stats-usage": { + "get": { + "summary": "Get stats usage queue", + "operationId": "healthGetQueueUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueUsage", + "group": "queue", + "weight": 471, + "cookies": false, + "type": "", + "demo": "health\/get-queue-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/queue\/webhooks": { + "get": { + "summary": "Get webhooks queue", + "operationId": "healthGetQueueWebhooks", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { + "$ref": "#\/definitions\/healthQueue" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQueueWebhooks", + "group": "queue", + "weight": 460, + "cookies": false, + "type": "", + "demo": "health\/get-queue-webhooks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "threshold", + "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "required": false, + "type": "integer", + "format": "int32", + "default": 5000, + "in": "query" + } + ] + } + }, + "\/health\/storage": { + "get": { + "summary": "Get storage", + "operationId": "healthGetStorage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorage", + "group": "storage", + "weight": 457, + "cookies": false, + "type": "", + "demo": "health\/get-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/storage\/local": { + "get": { + "summary": "Get local storage", + "operationId": "healthGetStorageLocal", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite local storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { + "$ref": "#\/definitions\/healthStatus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStorageLocal", + "group": "storage", + "weight": 456, + "cookies": false, + "type": "", + "demo": "health\/get-storage-local.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/health\/time": { + "get": { + "summary": "Get time", + "operationId": "healthGetTime", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "responses": { + "200": { + "description": "Health Time", + "schema": { + "$ref": "#\/definitions\/healthTime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTime", + "group": "health", + "weight": 454, + "cookies": false, + "type": "", + "demo": "health\/get-time.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "schema": { + "$ref": "#\/definitions\/locale" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 49, + "cookies": false, + "type": "", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "schema": { + "$ref": "#\/definitions\/localeCodeList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "weight": 50, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "schema": { + "$ref": "#\/definitions\/continentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listContinents", + "group": null, + "weight": 54, + "cookies": false, + "type": "", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { + "$ref": "#\/definitions\/countryList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "weight": 51, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { + "$ref": "#\/definitions\/countryList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesEU", + "group": null, + "weight": 52, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "schema": { + "$ref": "#\/definitions\/phoneList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "weight": 53, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "schema": { + "$ref": "#\/definitions\/currencyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCurrencies", + "group": null, + "weight": 55, + "cookies": false, + "type": "", + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "schema": { + "$ref": "#\/definitions\/languageList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLanguages", + "group": null, + "weight": 56, + "cookies": false, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "schema": { + "$ref": "#\/definitions\/messageList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessages", + "group": "messages", + "weight": 158, + "cookies": false, + "type": "", + "demo": "messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmail", + "group": "messages", + "weight": 155, + "cookies": false, + "type": "", + "demo": "messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<MESSAGE_ID>" + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>" + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "messages", + "weight": 162, + "cookies": false, + "type": "", + "demo": "messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "subject": { + "type": "string", + "description": "Email Subject.", + "default": null, + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false, + "x-nullable": true + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": null, + "x-example": false, + "x-nullable": true + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPush", + "group": "messages", + "weight": 157, + "cookies": false, + "type": "", + "demo": "messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<MESSAGE_ID>" + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": "", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": "", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": "", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": "", + "x-example": "<ID1:ID2>" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "default": "", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "default": "", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null, + "format": "int32" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] + } + }, + "required": [ + "messageId" + ] + } + } + ] + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePush", + "group": "messages", + "weight": 164, + "cookies": false, + "type": "", + "demo": "messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": null, + "x-example": "<TITLE>", + "x-nullable": true + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": null, + "x-example": "<BODY>", + "x-nullable": true + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": null, + "x-example": "<ACTION>", + "x-nullable": true + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": null, + "x-example": "<ID1:ID2>", + "x-nullable": true + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "default": null, + "x-example": "<ICON>", + "x-nullable": true + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "default": null, + "x-example": "<SOUND>", + "x-nullable": true + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<COLOR>", + "x-nullable": true + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "default": null, + "x-example": "<TAG>", + "x-nullable": true + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "default": null, + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [], + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSms", + "group": "messages", + "weight": 156, + "cookies": false, + "type": "", + "demo": "messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<MESSAGE_ID>" + }, + "content": { + "type": "string", + "description": "SMS Content.", + "default": null, + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "messageId", + "content" + ] + } + } + ] + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSms", + "group": "messages", + "weight": 163, + "cookies": false, + "type": "", + "demo": "messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": null, + "x-example": null, + "x-nullable": true, + "items": { + "type": "string" + } + }, + "content": { + "type": "string", + "description": "Email Content.", + "default": null, + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": null, + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "schema": { + "$ref": "#\/definitions\/message" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMessage", + "group": "messages", + "weight": 161, + "cookies": false, + "type": "", + "demo": "messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "messages", + "weight": 165, + "cookies": false, + "type": "", + "demo": "messaging\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/logs": { + "get": { + "summary": "List message logs", + "operationId": "messagingListMessageLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the message activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMessageLogs", + "group": "logs", + "weight": 159, + "cookies": false, + "type": "", + "demo": "messaging\/list-message-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "messages", + "weight": 160, + "cookies": false, + "type": "", + "demo": "messaging\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "type": "string", + "x-example": "<MESSAGE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "schema": { + "$ref": "#\/definitions\/providerList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviders", + "group": "providers", + "weight": 129, + "cookies": false, + "type": "", + "demo": "messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createApnsProvider", + "group": "providers", + "weight": 128, + "cookies": false, + "type": "", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateApnsProvider", + "group": "providers", + "weight": 142, + "cookies": false, + "type": "", + "demo": "messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "authKey": { + "type": "string", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFcmProvider", + "group": "providers", + "weight": 127, + "cookies": false, + "type": "", + "demo": "messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFcmProvider", + "group": "providers", + "weight": 141, + "cookies": false, + "type": "", + "demo": "messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMailgunProvider", + "group": "providers", + "weight": 118, + "cookies": false, + "type": "", + "demo": "messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMailgunProvider", + "group": "providers", + "weight": 132, + "cookies": false, + "type": "", + "demo": "messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMsg91Provider", + "group": "providers", + "weight": 122, + "cookies": false, + "type": "", + "demo": "messaging\/create-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMsg91Provider", + "group": "providers", + "weight": 136, + "cookies": false, + "type": "", + "demo": "messaging\/update-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Resend provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createResendProvider", + "group": "providers", + "weight": 120, + "cookies": false, + "type": "", + "demo": "messaging\/create-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Resend provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateResendProvider", + "group": "providers", + "weight": 134, + "cookies": false, + "type": "", + "demo": "messaging\/update-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSendgridProvider", + "group": "providers", + "weight": 119, + "cookies": false, + "type": "", + "demo": "messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSendgridProvider", + "group": "providers", + "weight": 133, + "cookies": false, + "type": "", + "demo": "messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSmtpProvider", + "group": "providers", + "weight": 121, + "cookies": false, + "type": "", + "demo": "messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": null, + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "default": 587, + "x-example": 1, + "format": "int32" + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": true, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + ] + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateSmtpProvider", + "group": "providers", + "weight": 135, + "cookies": false, + "type": "", + "demo": "messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": "", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "<PASSWORD>" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "default": "", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTelesignProvider", + "group": "providers", + "weight": 123, + "cookies": false, + "type": "", + "demo": "messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTelesignProvider", + "group": "providers", + "weight": 137, + "cookies": false, + "type": "", + "demo": "messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextmagicProvider", + "group": "providers", + "weight": 124, + "cookies": false, + "type": "", + "demo": "messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextmagicProvider", + "group": "providers", + "weight": 138, + "cookies": false, + "type": "", + "demo": "messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTwilioProvider", + "group": "providers", + "weight": 125, + "cookies": false, + "type": "", + "demo": "messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTwilioProvider", + "group": "providers", + "weight": 139, + "cookies": false, + "type": "", + "demo": "messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVonageProvider", + "group": "providers", + "weight": 126, + "cookies": false, + "type": "", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Provider name.", + "default": null, + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVonageProvider", + "group": "providers", + "weight": 140, + "cookies": false, + "type": "", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getProvider", + "group": "providers", + "weight": 131, + "cookies": false, + "type": "", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteProvider", + "group": "providers", + "weight": 143, + "cookies": false, + "type": "", + "demo": "messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/providers\/{providerId}\/logs": { + "get": { + "summary": "List provider logs", + "operationId": "messagingListProviderLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the provider activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listProviderLogs", + "group": "providers", + "weight": 130, + "cookies": false, + "type": "", + "demo": "messaging\/list-provider-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "<PROVIDER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/subscribers\/{subscriberId}\/logs": { + "get": { + "summary": "List subscriber logs", + "operationId": "messagingListSubscriberLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the subscriber activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscriberLogs", + "group": "subscribers", + "weight": 152, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscriber-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "schema": { + "$ref": "#\/definitions\/topicList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopics", + "group": "topics", + "weight": 145, + "cookies": false, + "type": "", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTopic", + "group": "topics", + "weight": 144, + "cookies": false, + "type": "", + "demo": "messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "default": null, + "x-example": "<TOPIC_ID>" + }, + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [ + "users" + ], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "topicId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTopic", + "group": "topics", + "weight": 147, + "cookies": false, + "type": "", + "demo": "messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "schema": { + "$ref": "#\/definitions\/topic" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTopic", + "group": "topics", + "weight": 148, + "cookies": false, + "type": "", + "demo": "messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Topic Name.", + "default": null, + "x-example": "<NAME>", + "x-nullable": true + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": null, + "x-example": "[\"any\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTopic", + "group": "topics", + "weight": 149, + "cookies": false, + "type": "", + "demo": "messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/logs": { + "get": { + "summary": "List topic logs", + "operationId": "messagingListTopicLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get the topic activity logs listed by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTopicLogs", + "group": "topics", + "weight": 146, + "cookies": false, + "type": "", + "demo": "messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "schema": { + "$ref": "#\/definitions\/subscriberList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscribers", + "group": "subscribers", + "weight": 151, + "cookies": false, + "type": "", + "demo": "messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "weight": 150, + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "default": null, + "x-example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "default": null, + "x-example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "schema": { + "$ref": "#\/definitions\/subscriber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriber", + "group": "subscribers", + "weight": 153, + "cookies": false, + "type": "", + "demo": "messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "weight": 154, + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "<TOPIC_ID>", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "<SUBSCRIBER_ID>", + "in": "path" + } + ] + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesListPresences", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "List presence logs.", + "responses": { + "200": { + "description": "Presences List", + "schema": { + "$ref": "#\/definitions\/presenceList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPresences", + "group": "presences", + "weight": 416, + "cookies": false, + "type": "", + "demo": "presences\/list-presences.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGetPresence", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPresence", + "group": "presences", + "weight": 415, + "cookies": false, + "type": "", + "demo": "presences\/get-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsertPresence", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertPresence", + "group": "presences", + "weight": 413, + "cookies": false, + "type": "", + "demo": "presences\/upsert-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertPresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "userId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/presence" + } + ], + "description": "", + "demo": "presences\/upsert-presence.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "default": null, + "x-example": "<STATUS>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": [], + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + ] + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdatePresence", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID.", + "responses": { + "200": { + "description": "Presence", + "schema": { + "$ref": "#\/definitions\/presence" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePresence", + "group": "presences", + "weight": 417, + "cookies": false, + "type": "", + "demo": "presences\/update-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "client" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updatePresence", + "namespace": "presences", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "expiresAt", + "metadata", + "permissions" + ], + "required": [ + "presenceId", + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/presence" + } + ], + "description": "", + "demo": "presences\/update-presence.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Presence status.", + "default": null, + "x-example": "<STATUS>", + "x-nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDeletePresence", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePresence", + "group": "presences", + "weight": 418, + "cookies": false, + "type": "", + "demo": "presences\/delete-presence.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "type": "string", + "x-example": "<PRESENCE_ID>", + "in": "path" + } + ] + } + }, + "\/project": { + "delete": { + "summary": "Delete project", + "operationId": "projectDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 594, + "cookies": false, + "type": "", + "demo": "project\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/auth-methods\/{methodId}": { + "patch": { + "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", + "operationId": "projectUpdateAuthMethod", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAuthMethod", + "group": null, + "weight": 643, + "cookies": false, + "type": "", + "demo": "project\/update-auth-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "methodId", + "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", + "required": true, + "type": "string", + "x-example": "email-password", + "enum": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Auth method status.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/keys": { + "get": { + "summary": "List project keys", + "operationId": "projectListKeys", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all API keys from the current project.", + "responses": { + "200": { + "description": "API Keys List", + "schema": { + "$ref": "#\/definitions\/keyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listKeys", + "group": "keys", + "weight": 610, + "cookies": false, + "type": "", + "demo": "project\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project key", + "operationId": "projectCreateKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "responses": { + "201": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createKey", + "group": "keys", + "weight": 608, + "cookies": false, + "type": "", + "demo": "project\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "keyId": { + "type": "string", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<KEY_ID>" + }, + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + ] + } + }, + "\/project\/keys\/ephemeral": { + "post": { + "summary": "Create ephemeral project key", + "operationId": "projectCreateEphemeralKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "responses": { + "201": { + "description": "Ephemeral Key", + "schema": { + "$ref": "#\/definitions\/ephemeralKey" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEphemeralKey", + "group": "keys", + "weight": 609, + "cookies": false, + "type": "", + "demo": "project\/create-ephemeral-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "duration": { + "type": "integer", + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "default": null, + "x-example": 1, + "format": "int32" + } + }, + "required": [ + "scopes", + "duration" + ] + } + } + ] + } + }, + "\/project\/keys\/{keyId}": { + "get": { + "summary": "Get project key", + "operationId": "projectGetKey", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a key by its unique ID. ", + "responses": { + "200": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getKey", + "group": "keys", + "weight": 611, + "cookies": false, + "type": "", + "demo": "project\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update project key", + "operationId": "projectUpdateKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "schema": { + "$ref": "#\/definitions\/key" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateKey", + "group": "keys", + "weight": 613, + "cookies": false, + "type": "", + "demo": "project\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "templates.read", + "templates.write", + "oauth2.read", + "oauth2.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "rules.read", + "rules.write", + "presences.read", + "presences.write" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + ] + }, + "delete": { + "summary": "Delete project key", + "operationId": "projectDeleteKey", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "weight": 612, + "cookies": false, + "type": "", + "demo": "project\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "type": "string", + "x-example": "<KEY_ID>", + "in": "path" + } + ] + } + }, + "\/project\/labels": { + "put": { + "summary": "Update project labels", + "operationId": "projectUpdateLabels", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": null, + "weight": 595, + "cookies": false, + "type": "", + "demo": "project\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + ] + } + }, + "\/project\/mock-phones": { + "get": { + "summary": "List project mock phones", + "operationId": "projectListMockPhones", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", + "responses": { + "200": { + "description": "Mock Numbers List", + "schema": { + "$ref": "#\/definitions\/mockNumberList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMockPhones", + "group": "mocks", + "weight": 628, + "cookies": false, + "type": "", + "demo": "project\/list-mock-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project mock phone", + "operationId": "projectCreateMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", + "responses": { + "201": { + "description": "Mock Number", + "schema": { + "$ref": "#\/definitions\/mockNumber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMockPhone", + "group": "mocks", + "weight": 627, + "cookies": false, + "type": "", + "demo": "project\/create-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + }, + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "number", + "otp" + ] + } + } + ] + } + }, + "\/project\/mock-phones\/{number}": { + "get": { + "summary": "Get project mock phone", + "operationId": "projectGetMockPhone", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "schema": { + "$ref": "#\/definitions\/mockNumber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMockPhone", + "group": "mocks", + "weight": 629, + "cookies": false, + "type": "", + "demo": "project\/get-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" + } + ] + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "schema": { + "$ref": "#\/definitions\/mockNumber" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMockPhone", + "group": "mocks", + "weight": 630, + "cookies": false, + "type": "", + "demo": "project\/update-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "default": null, + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + ] + }, + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMockPhone", + "group": "mocks", + "weight": 631, + "cookies": false, + "type": "", + "demo": "project\/delete-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" + } + ] + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2 Providers List", + "schema": { + "$ref": "#\/definitions\/oAuth2ProviderList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Providers", + "group": "oauth2", + "weight": 644, + "cookies": false, + "type": "", + "demo": "project\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/oauth2\/amazon": { + "patch": { + "summary": "Update project OAuth2 Amazon", + "operationId": "projectUpdateOAuth2Amazon", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Amazon configuration.", + "responses": { + "200": { + "description": "OAuth2Amazon", + "schema": { + "$ref": "#\/definitions\/oAuth2Amazon" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Amazon", + "group": "oauth2", + "weight": 671, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-amazon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/apple": { + "patch": { + "summary": "Update project OAuth2 Apple", + "operationId": "projectUpdateOAuth2Apple", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Apple configuration.", + "responses": { + "200": { + "description": "OAuth2Apple", + "schema": { + "$ref": "#\/definitions\/oAuth2Apple" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Apple", + "group": "oauth2", + "weight": 686, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-apple.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "serviceId": { + "type": "string", + "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", + "default": null, + "x-example": "<SERVICE_ID>", + "x-nullable": true + }, + "keyId": { + "type": "string", + "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", + "default": null, + "x-example": "<KEY_ID>", + "x-nullable": true + }, + "teamId": { + "type": "string", + "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", + "default": null, + "x-example": "<TEAM_ID>", + "x-nullable": true + }, + "p8File": { + "type": "string", + "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "default": null, + "x-example": "<P8_FILE>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/auth0": { + "patch": { + "summary": "Update project OAuth2 Auth0", + "operationId": "projectUpdateOAuth2Auth0", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Auth0 configuration.", + "responses": { + "200": { + "description": "OAuth2Auth0", + "schema": { + "$ref": "#\/definitions\/oAuth2Auth0" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Auth0", + "group": "oauth2", + "weight": 680, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-auth-0.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Auth0 instance. For example: example.us.auth0.com", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/authentik": { + "patch": { + "summary": "Update project OAuth2 Authentik", + "operationId": "projectUpdateOAuth2Authentik", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Authentik configuration.", + "responses": { + "200": { + "description": "OAuth2Authentik", + "schema": { + "$ref": "#\/definitions\/oAuth2Authentik" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Authentik", + "group": "oauth2", + "weight": 679, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-authentik.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Authentik instance. For example: example.authentik.com", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/autodesk": { + "patch": { + "summary": "Update project OAuth2 Autodesk", + "operationId": "projectUpdateOAuth2Autodesk", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Autodesk configuration.", + "responses": { + "200": { + "description": "OAuth2Autodesk", + "schema": { + "$ref": "#\/definitions\/oAuth2Autodesk" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Autodesk", + "group": "oauth2", + "weight": 654, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-autodesk.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/bitbucket": { + "patch": { + "summary": "Update project OAuth2 Bitbucket", + "operationId": "projectUpdateOAuth2Bitbucket", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitbucket configuration.", + "responses": { + "200": { + "description": "OAuth2Bitbucket", + "schema": { + "$ref": "#\/definitions\/oAuth2Bitbucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitbucket", + "group": "oauth2", + "weight": 651, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitbucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", + "default": null, + "x-example": "<KEY>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/bitly": { + "patch": { + "summary": "Update project OAuth2 Bitly", + "operationId": "projectUpdateOAuth2Bitly", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitly configuration.", + "responses": { + "200": { + "description": "OAuth2Bitly", + "schema": { + "$ref": "#\/definitions\/oAuth2Bitly" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Bitly", + "group": "oauth2", + "weight": 652, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-bitly.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/box": { + "patch": { + "summary": "Update project OAuth2 Box", + "operationId": "projectUpdateOAuth2Box", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Box configuration.", + "responses": { + "200": { + "description": "OAuth2Box", + "schema": { + "$ref": "#\/definitions\/oAuth2Box" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Box", + "group": "oauth2", + "weight": 653, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-box.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/dailymotion": { + "patch": { + "summary": "Update project OAuth2 Dailymotion", + "operationId": "projectUpdateOAuth2Dailymotion", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dailymotion configuration.", + "responses": { + "200": { + "description": "OAuth2Dailymotion", + "schema": { + "$ref": "#\/definitions\/oAuth2Dailymotion" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dailymotion", + "group": "oauth2", + "weight": 650, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dailymotion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", + "default": null, + "x-example": "<API_KEY>", + "x-nullable": true + }, + "apiSecret": { + "type": "string", + "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", + "default": null, + "x-example": "<API_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/discord": { + "patch": { + "summary": "Update project OAuth2 Discord", + "operationId": "projectUpdateOAuth2Discord", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Discord configuration.", + "responses": { + "200": { + "description": "OAuth2Discord", + "schema": { + "$ref": "#\/definitions\/oAuth2Discord" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Discord", + "group": "oauth2", + "weight": 647, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-discord.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/disqus": { + "patch": { + "summary": "Update project OAuth2 Disqus", + "operationId": "projectUpdateOAuth2Disqus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Disqus configuration.", + "responses": { + "200": { + "description": "OAuth2Disqus", + "schema": { + "$ref": "#\/definitions\/oAuth2Disqus" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Disqus", + "group": "oauth2", + "weight": 670, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-disqus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "default": null, + "x-example": "<PUBLIC_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/dropbox": { + "patch": { + "summary": "Update project OAuth2 Dropbox", + "operationId": "projectUpdateOAuth2Dropbox", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dropbox configuration.", + "responses": { + "200": { + "description": "OAuth2Dropbox", + "schema": { + "$ref": "#\/definitions\/oAuth2Dropbox" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Dropbox", + "group": "oauth2", + "weight": 649, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-dropbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appKey": { + "type": "string", + "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", + "default": null, + "x-example": "<APP_KEY>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", + "default": null, + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/etsy": { + "patch": { + "summary": "Update project OAuth2 Etsy", + "operationId": "projectUpdateOAuth2Etsy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Etsy configuration.", + "responses": { + "200": { + "description": "OAuth2Etsy", + "schema": { + "$ref": "#\/definitions\/oAuth2Etsy" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Etsy", + "group": "oauth2", + "weight": 672, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-etsy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "keyString": { + "type": "string", + "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", + "default": null, + "x-example": "<KEY_STRING>", + "x-nullable": true + }, + "sharedSecret": { + "type": "string", + "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", + "default": null, + "x-example": "<SHARED_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/facebook": { + "patch": { + "summary": "Update project OAuth2 Facebook", + "operationId": "projectUpdateOAuth2Facebook", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Facebook configuration.", + "responses": { + "200": { + "description": "OAuth2Facebook", + "schema": { + "$ref": "#\/definitions\/oAuth2Facebook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Facebook", + "group": "oauth2", + "weight": 673, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-facebook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", + "default": null, + "x-example": "<APP_ID>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", + "default": null, + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/figma": { + "patch": { + "summary": "Update project OAuth2 Figma", + "operationId": "projectUpdateOAuth2Figma", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Figma configuration.", + "responses": { + "200": { + "description": "OAuth2Figma", + "schema": { + "$ref": "#\/definitions\/oAuth2Figma" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Figma", + "group": "oauth2", + "weight": 648, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-figma.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/fusionauth": { + "patch": { + "summary": "Update project OAuth2 FusionAuth", + "operationId": "projectUpdateOAuth2FusionAuth", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 FusionAuth configuration.", + "responses": { + "200": { + "description": "OAuth2FusionAuth", + "schema": { + "$ref": "#\/definitions\/oAuth2FusionAuth" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2FusionAuth", + "group": "oauth2", + "weight": 681, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-fusion-auth.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/github": { + "patch": { + "summary": "Update project OAuth2 GitHub", + "operationId": "projectUpdateOAuth2GitHub", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 GitHub configuration.", + "responses": { + "200": { + "description": "OAuth2GitHub", + "schema": { + "$ref": "#\/definitions\/oAuth2Github" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2GitHub", + "group": "oauth2", + "weight": 646, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-git-hub.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/gitlab": { + "patch": { + "summary": "Update project OAuth2 Gitlab", + "operationId": "projectUpdateOAuth2Gitlab", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Gitlab configuration.", + "responses": { + "200": { + "description": "OAuth2Gitlab", + "schema": { + "$ref": "#\/definitions\/oAuth2Gitlab" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Gitlab", + "group": "oauth2", + "weight": 678, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-gitlab.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "default": null, + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/google": { + "patch": { + "summary": "Update project OAuth2 Google", + "operationId": "projectUpdateOAuth2Google", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Google configuration.", + "responses": { + "200": { + "description": "OAuth2Google", + "schema": { + "$ref": "#\/definitions\/oAuth2Google" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Google", + "group": "oauth2", + "weight": 655, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-google.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/keycloak": { + "patch": { + "summary": "Update project OAuth2 Keycloak", + "operationId": "projectUpdateOAuth2Keycloak", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Keycloak configuration.", + "responses": { + "200": { + "description": "OAuth2Keycloak", + "schema": { + "$ref": "#\/definitions\/oAuth2Keycloak" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Keycloak", + "group": "oauth2", + "weight": 682, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-keycloak.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Keycloak instance. For example: keycloak.example.com", + "default": null, + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "realmName": { + "type": "string", + "description": "Keycloak realm name. For example: appwrite-realm", + "default": null, + "x-example": "<REALM_NAME>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/kick": { + "patch": { + "summary": "Update project OAuth2 Kick", + "operationId": "projectUpdateOAuth2Kick", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Kick configuration.", + "responses": { + "200": { + "description": "OAuth2Kick", + "schema": { + "$ref": "#\/definitions\/oAuth2Kick" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Kick", + "group": "oauth2", + "weight": 685, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-kick.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/linkedin": { + "patch": { + "summary": "Update project OAuth2 Linkedin", + "operationId": "projectUpdateOAuth2Linkedin", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Linkedin configuration.", + "responses": { + "200": { + "description": "OAuth2Linkedin", + "schema": { + "$ref": "#\/definitions\/oAuth2Linkedin" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Linkedin", + "group": "oauth2", + "weight": 669, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-linkedin.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "primaryClientSecret": { + "type": "string", + "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", + "default": null, + "x-example": "<PRIMARY_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/microsoft": { + "patch": { + "summary": "Update project OAuth2 Microsoft", + "operationId": "projectUpdateOAuth2Microsoft", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Microsoft configuration.", + "responses": { + "200": { + "description": "OAuth2Microsoft", + "schema": { + "$ref": "#\/definitions\/oAuth2Microsoft" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Microsoft", + "group": "oauth2", + "weight": 687, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-microsoft.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", + "default": null, + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "applicationSecret": { + "type": "string", + "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "default": null, + "x-example": "<APPLICATION_SECRET>", + "x-nullable": true + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", + "default": null, + "x-example": "<TENANT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/notion": { + "patch": { + "summary": "Update project OAuth2 Notion", + "operationId": "projectUpdateOAuth2Notion", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Notion configuration.", + "responses": { + "200": { + "description": "OAuth2Notion", + "schema": { + "$ref": "#\/definitions\/oAuth2Notion" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Notion", + "group": "oauth2", + "weight": 666, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-notion.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "oauthClientId": { + "type": "string", + "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", + "default": null, + "x-example": "<OAUTH_CLIENT_ID>", + "x-nullable": true + }, + "oauthClientSecret": { + "type": "string", + "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", + "default": null, + "x-example": "<OAUTH_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/oidc": { + "patch": { + "summary": "Update project OAuth2 Oidc", + "operationId": "projectUpdateOAuth2Oidc", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Oidc configuration.", + "responses": { + "200": { + "description": "OAuth2Oidc", + "schema": { + "$ref": "#\/definitions\/oAuth2Oidc" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Oidc", + "group": "oauth2", + "weight": 683, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-oidc.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/okta": { + "patch": { + "summary": "Update project OAuth2 Okta", + "operationId": "projectUpdateOAuth2Okta", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Okta configuration.", + "responses": { + "200": { + "description": "OAuth2Okta", + "schema": { + "$ref": "#\/definitions\/oAuth2Okta" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Okta", + "group": "oauth2", + "weight": 684, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-okta.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "domain": { + "type": "string", + "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", + "default": null, + "x-example": null, + "x-nullable": true + }, + "authorizationServerId": { + "type": "string", + "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", + "default": null, + "x-example": "<AUTHORIZATION_SERVER_ID>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/paypal": { + "patch": { + "summary": "Update project OAuth2 Paypal", + "operationId": "projectUpdateOAuth2Paypal", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Paypal configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "schema": { + "$ref": "#\/definitions\/oAuth2Paypal" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Paypal", + "group": "oauth2", + "weight": 676, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/paypalSandbox": { + "patch": { + "summary": "Update project OAuth2 PaypalSandbox", + "operationId": "projectUpdateOAuth2PaypalSandbox", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 PaypalSandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "schema": { + "$ref": "#\/definitions\/oAuth2Paypal" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2PaypalSandbox", + "group": "oauth2", + "weight": 677, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-paypal-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/podio": { + "patch": { + "summary": "Update project OAuth2 Podio", + "operationId": "projectUpdateOAuth2Podio", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Podio configuration.", + "responses": { + "200": { + "description": "OAuth2Podio", + "schema": { + "$ref": "#\/definitions\/oAuth2Podio" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Podio", + "group": "oauth2", + "weight": 665, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-podio.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/salesforce": { + "patch": { + "summary": "Update project OAuth2 Salesforce", + "operationId": "projectUpdateOAuth2Salesforce", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Salesforce configuration.", + "responses": { + "200": { + "description": "OAuth2Salesforce", + "schema": { + "$ref": "#\/definitions\/oAuth2Salesforce" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Salesforce", + "group": "oauth2", + "weight": 667, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-salesforce.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "default": null, + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "customerSecret": { + "type": "string", + "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", + "default": null, + "x-example": "<CUSTOMER_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/slack": { + "patch": { + "summary": "Update project OAuth2 Slack", + "operationId": "projectUpdateOAuth2Slack", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Slack configuration.", + "responses": { + "200": { + "description": "OAuth2Slack", + "schema": { + "$ref": "#\/definitions\/oAuth2Slack" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Slack", + "group": "oauth2", + "weight": 664, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-slack.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/spotify": { + "patch": { + "summary": "Update project OAuth2 Spotify", + "operationId": "projectUpdateOAuth2Spotify", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Spotify configuration.", + "responses": { + "200": { + "description": "OAuth2Spotify", + "schema": { + "$ref": "#\/definitions\/oAuth2Spotify" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Spotify", + "group": "oauth2", + "weight": 663, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-spotify.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/stripe": { + "patch": { + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Stripe configuration.", + "responses": { + "200": { + "description": "OAuth2Stripe", + "schema": { + "$ref": "#\/definitions\/oAuth2Stripe" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Stripe", + "group": "oauth2", + "weight": 662, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-stripe.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "apiSecretKey": { + "type": "string", + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "default": null, + "x-example": "<API_SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/tradeshift": { + "patch": { + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "schema": { + "$ref": "#\/definitions\/oAuth2Tradeshift" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Tradeshift", + "group": "oauth2", + "weight": 674, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "default": null, + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "default": null, + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/tradeshiftBox": { + "patch": { + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "schema": { + "$ref": "#\/definitions\/oAuth2Tradeshift" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2TradeshiftSandbox", + "group": "oauth2", + "weight": 675, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "oauth2ClientId": { + "type": "string", + "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "default": null, + "x-example": "<OAUTH2_CLIENT_ID>", + "x-nullable": true + }, + "oauth2ClientSecret": { + "type": "string", + "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "default": null, + "x-example": "<OAUTH2_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/twitch": { + "patch": { + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Twitch configuration.", + "responses": { + "200": { + "description": "OAuth2Twitch", + "schema": { + "$ref": "#\/definitions\/oAuth2Twitch" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Twitch", + "group": "oauth2", + "weight": 661, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-twitch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/wordpress": { + "patch": { + "summary": "Update project OAuth2 WordPress", + "operationId": "projectUpdateOAuth2WordPress", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 WordPress configuration.", + "responses": { + "200": { + "description": "OAuth2WordPress", + "schema": { + "$ref": "#\/definitions\/oAuth2WordPress" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2WordPress", + "group": "oauth2", + "weight": 660, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-word-press.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/x": { + "patch": { + "summary": "Update project OAuth2 X", + "operationId": "projectUpdateOAuth2X", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 X configuration.", + "responses": { + "200": { + "description": "OAuth2X", + "schema": { + "$ref": "#\/definitions\/oAuth2X" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2X", + "group": "oauth2", + "weight": 659, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2x.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "customerKey": { + "type": "string", + "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", + "default": null, + "x-example": "<CUSTOMER_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", + "default": null, + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/yahoo": { + "patch": { + "summary": "Update project OAuth2 Yahoo", + "operationId": "projectUpdateOAuth2Yahoo", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yahoo configuration.", + "responses": { + "200": { + "description": "OAuth2Yahoo", + "schema": { + "$ref": "#\/definitions\/oAuth2Yahoo" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yahoo", + "group": "oauth2", + "weight": 668, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yahoo.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/yandex": { + "patch": { + "summary": "Update project OAuth2 Yandex", + "operationId": "projectUpdateOAuth2Yandex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yandex configuration.", + "responses": { + "200": { + "description": "OAuth2Yandex", + "schema": { + "$ref": "#\/definitions\/oAuth2Yandex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Yandex", + "group": "oauth2", + "weight": 658, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-yandex.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/zoho": { + "patch": { + "summary": "Update project OAuth2 Zoho", + "operationId": "projectUpdateOAuth2Zoho", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoho configuration.", + "responses": { + "200": { + "description": "OAuth2Zoho", + "schema": { + "$ref": "#\/definitions\/oAuth2Zoho" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoho", + "group": "oauth2", + "weight": 657, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/zoom": { + "patch": { + "summary": "Update project OAuth2 Zoom", + "operationId": "projectUpdateOAuth2Zoom", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoom configuration.", + "responses": { + "200": { + "description": "OAuth2Zoom", + "schema": { + "$ref": "#\/definitions\/oAuth2Zoom" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Zoom", + "group": "oauth2", + "weight": 656, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-zoom.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", + "default": null, + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", + "default": null, + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/oauth2\/{provider}": { + "get": { + "summary": "Get project OAuth2 provider", + "operationId": "projectGetOAuth2Provider", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/oAuth2Github" + }, + { + "$ref": "#\/definitions\/oAuth2Discord" + }, + { + "$ref": "#\/definitions\/oAuth2Figma" + }, + { + "$ref": "#\/definitions\/oAuth2Dropbox" + }, + { + "$ref": "#\/definitions\/oAuth2Dailymotion" + }, + { + "$ref": "#\/definitions\/oAuth2Bitbucket" + }, + { + "$ref": "#\/definitions\/oAuth2Bitly" + }, + { + "$ref": "#\/definitions\/oAuth2Box" + }, + { + "$ref": "#\/definitions\/oAuth2Autodesk" + }, + { + "$ref": "#\/definitions\/oAuth2Google" + }, + { + "$ref": "#\/definitions\/oAuth2Zoom" + }, + { + "$ref": "#\/definitions\/oAuth2Zoho" + }, + { + "$ref": "#\/definitions\/oAuth2Yandex" + }, + { + "$ref": "#\/definitions\/oAuth2X" + }, + { + "$ref": "#\/definitions\/oAuth2WordPress" + }, + { + "$ref": "#\/definitions\/oAuth2Twitch" + }, + { + "$ref": "#\/definitions\/oAuth2Stripe" + }, + { + "$ref": "#\/definitions\/oAuth2Spotify" + }, + { + "$ref": "#\/definitions\/oAuth2Slack" + }, + { + "$ref": "#\/definitions\/oAuth2Podio" + }, + { + "$ref": "#\/definitions\/oAuth2Notion" + }, + { + "$ref": "#\/definitions\/oAuth2Salesforce" + }, + { + "$ref": "#\/definitions\/oAuth2Yahoo" + }, + { + "$ref": "#\/definitions\/oAuth2Linkedin" + }, + { + "$ref": "#\/definitions\/oAuth2Disqus" + }, + { + "$ref": "#\/definitions\/oAuth2Amazon" + }, + { + "$ref": "#\/definitions\/oAuth2Etsy" + }, + { + "$ref": "#\/definitions\/oAuth2Facebook" + }, + { + "$ref": "#\/definitions\/oAuth2Tradeshift" + }, + { + "$ref": "#\/definitions\/oAuth2Paypal" + }, + { + "$ref": "#\/definitions\/oAuth2Gitlab" + }, + { + "$ref": "#\/definitions\/oAuth2Authentik" + }, + { + "$ref": "#\/definitions\/oAuth2Auth0" + }, + { + "$ref": "#\/definitions\/oAuth2FusionAuth" + }, + { + "$ref": "#\/definitions\/oAuth2Keycloak" + }, + { + "$ref": "#\/definitions\/oAuth2Oidc" + }, + { + "$ref": "#\/definitions\/oAuth2Apple" + }, + { + "$ref": "#\/definitions\/oAuth2Okta" + }, + { + "$ref": "#\/definitions\/oAuth2Kick" + }, + { + "$ref": "#\/definitions\/oAuth2Microsoft" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/definitions\/oAuth2Github", + "discord": "#\/definitions\/oAuth2Discord", + "figma": "#\/definitions\/oAuth2Figma", + "dropbox": "#\/definitions\/oAuth2Dropbox", + "dailymotion": "#\/definitions\/oAuth2Dailymotion", + "bitbucket": "#\/definitions\/oAuth2Bitbucket", + "bitly": "#\/definitions\/oAuth2Bitly", + "box": "#\/definitions\/oAuth2Box", + "autodesk": "#\/definitions\/oAuth2Autodesk", + "google": "#\/definitions\/oAuth2Google", + "zoom": "#\/definitions\/oAuth2Zoom", + "zoho": "#\/definitions\/oAuth2Zoho", + "yandex": "#\/definitions\/oAuth2Yandex", + "x": "#\/definitions\/oAuth2X", + "wordpress": "#\/definitions\/oAuth2WordPress", + "twitch": "#\/definitions\/oAuth2Twitch", + "stripe": "#\/definitions\/oAuth2Stripe", + "spotify": "#\/definitions\/oAuth2Spotify", + "slack": "#\/definitions\/oAuth2Slack", + "podio": "#\/definitions\/oAuth2Podio", + "notion": "#\/definitions\/oAuth2Notion", + "salesforce": "#\/definitions\/oAuth2Salesforce", + "yahoo": "#\/definitions\/oAuth2Yahoo", + "linkedin": "#\/definitions\/oAuth2Linkedin", + "disqus": "#\/definitions\/oAuth2Disqus", + "amazon": "#\/definitions\/oAuth2Amazon", + "etsy": "#\/definitions\/oAuth2Etsy", + "facebook": "#\/definitions\/oAuth2Facebook", + "tradeshift": "#\/definitions\/oAuth2Tradeshift", + "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", + "paypal": "#\/definitions\/oAuth2Paypal", + "paypalSandbox": "#\/definitions\/oAuth2Paypal", + "gitlab": "#\/definitions\/oAuth2Gitlab", + "authentik": "#\/definitions\/oAuth2Authentik", + "auth0": "#\/definitions\/oAuth2Auth0", + "fusionauth": "#\/definitions\/oAuth2FusionAuth", + "keycloak": "#\/definitions\/oAuth2Keycloak", + "oidc": "#\/definitions\/oAuth2Oidc", + "apple": "#\/definitions\/oAuth2Apple", + "okta": "#\/definitions\/oAuth2Okta", + "kick": "#\/definitions\/oAuth2Kick", + "microsoft": "#\/definitions\/oAuth2Microsoft" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getOAuth2Provider", + "group": "oauth2", + "weight": 645, + "cookies": false, + "type": "", + "demo": "project\/get-o-auth-2-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 provider key. For example: github, google, apple.", + "required": true, + "type": "string", + "x-example": "<PROVIDER>", + "in": "path" + } + ] + } + }, + "\/project\/platforms": { + "get": { + "summary": "List project platforms", + "operationId": "projectListPlatforms", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", + "responses": { + "200": { + "description": "Platforms List", + "schema": { + "$ref": "#\/definitions\/platformList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPlatforms", + "group": "platforms", + "weight": 626, + "cookies": false, + "type": "", + "demo": "project\/list-platforms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/project\/platforms\/android": { + "post": { + "summary": "Create project Android platform", + "operationId": "projectCreateAndroidPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Android", + "schema": { + "$ref": "#\/definitions\/platformAndroid" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAndroidPlatform", + "group": "platforms", + "weight": 622, + "cookies": false, + "type": "", + "demo": "project\/create-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "default": null, + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "platformId", + "name", + "applicationId" + ] + } + } + ] + } + }, + "\/project\/platforms\/android\/{platformId}": { + "put": { + "summary": "Update project Android platform", + "operationId": "projectUpdateAndroidPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", + "responses": { + "200": { + "description": "Platform Android", + "schema": { + "$ref": "#\/definitions\/platformAndroid" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAndroidPlatform", + "group": "platforms", + "weight": 617, + "cookies": false, + "type": "", + "demo": "project\/update-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "default": null, + "x-example": "<APPLICATION_ID>" + } + }, + "required": [ + "name", + "applicationId" + ] + } + } + ] + } + }, + "\/project\/platforms\/apple": { + "post": { + "summary": "Create project Apple platform", + "operationId": "projectCreateApplePlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Apple", + "schema": { + "$ref": "#\/definitions\/platformApple" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createApplePlatform", + "group": "platforms", + "weight": 621, + "cookies": false, + "type": "", + "demo": "project\/create-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "default": null, + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "platformId", + "name", + "bundleIdentifier" + ] + } + } + ] + } + }, + "\/project\/platforms\/apple\/{platformId}": { + "put": { + "summary": "Update project Apple platform", + "operationId": "projectUpdateApplePlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", + "responses": { + "200": { + "description": "Platform Apple", + "schema": { + "$ref": "#\/definitions\/platformApple" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateApplePlatform", + "group": "platforms", + "weight": 616, + "cookies": false, + "type": "", + "demo": "project\/update-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "default": null, + "x-example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "name", + "bundleIdentifier" + ] + } + } + ] + } + }, + "\/project\/platforms\/linux": { + "post": { + "summary": "Create project Linux platform", + "operationId": "projectCreateLinuxPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Linux", + "schema": { + "$ref": "#\/definitions\/platformLinux" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLinuxPlatform", + "group": "platforms", + "weight": 624, + "cookies": false, + "type": "", + "demo": "project\/create-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageName" + ] + } + } + ] + } + }, + "\/project\/platforms\/linux\/{platformId}": { + "put": { + "summary": "Update project Linux platform", + "operationId": "projectUpdateLinuxPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", + "responses": { + "200": { + "description": "Platform Linux", + "schema": { + "$ref": "#\/definitions\/platformLinux" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLinuxPlatform", + "group": "platforms", + "weight": 619, + "cookies": false, + "type": "", + "demo": "project\/update-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_NAME>" + } + }, + "required": [ + "name", + "packageName" + ] + } + } + ] + } + }, + "\/project\/platforms\/web": { + "post": { + "summary": "Create project web platform", + "operationId": "projectCreateWebPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Web", + "schema": { + "$ref": "#\/definitions\/platformWeb" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWebPlatform", + "group": "platforms", + "weight": 620, + "cookies": false, + "type": "", + "demo": "project\/create-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "default": null, + "x-example": "app.example.com" + } + }, + "required": [ + "platformId", + "name", + "hostname" + ] + } + } + ] + } + }, + "\/project\/platforms\/web\/{platformId}": { + "put": { + "summary": "Update project web platform", + "operationId": "projectUpdateWebPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", + "responses": { + "200": { + "description": "Platform Web", + "schema": { + "$ref": "#\/definitions\/platformWeb" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWebPlatform", + "group": "platforms", + "weight": 615, + "cookies": false, + "type": "", + "demo": "project\/update-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "hostname": { + "type": "string", + "description": "Platform web hostname. Max length: 256 chars.", + "default": null, + "x-example": "app.example.com" + } + }, + "required": [ + "name", + "hostname" + ] + } + } + ] + } + }, + "\/project\/platforms\/windows": { + "post": { + "summary": "Create project Windows platform", + "operationId": "projectCreateWindowsPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Windows", + "schema": { + "$ref": "#\/definitions\/platformWindows" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createWindowsPlatform", + "group": "platforms", + "weight": 623, + "cookies": false, + "type": "", + "demo": "project\/create-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "platformId": { + "type": "string", + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<PLATFORM_ID>" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageIdentifierName" + ] + } + } + ] + } + }, + "\/project\/platforms\/windows\/{platformId}": { + "put": { + "summary": "Update project Windows platform", + "operationId": "projectUpdateWindowsPlatform", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", + "responses": { + "200": { + "description": "Platform Windows", + "schema": { + "$ref": "#\/definitions\/platformWindows" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateWindowsPlatform", + "group": "platforms", + "weight": 618, + "cookies": false, + "type": "", + "demo": "project\/update-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name. Max length: 256 chars.", + "default": null, + "x-example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "name", + "packageIdentifierName" + ] + } + } + ] + } + }, + "\/project\/platforms\/{platformId}": { + "get": { + "summary": "Get project platform", + "operationId": "projectGetPlatform", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", + "responses": { + "200": { + "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/platformWeb" + }, + { + "$ref": "#\/definitions\/platformApple" + }, + { + "$ref": "#\/definitions\/platformAndroid" + }, + { + "$ref": "#\/definitions\/platformWindows" + }, + { + "$ref": "#\/definitions\/platformLinux" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/definitions\/platformWeb", + "apple": "#\/definitions\/platformApple", + "android": "#\/definitions\/platformAndroid", + "windows": "#\/definitions\/platformWindows", + "linux": "#\/definitions\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPlatform", + "group": "platforms", + "weight": 625, + "cookies": false, + "type": "", + "demo": "project\/get-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete project platform", + "operationId": "projectDeletePlatform", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePlatform", + "group": "platforms", + "weight": 614, + "cookies": false, + "type": "", + "demo": "project\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "type": "string", + "x-example": "<PLATFORM_ID>", + "in": "path" + } + ] + } + }, + "\/project\/policies": { + "get": { + "summary": "List project policies", + "operationId": "projectListPolicies", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all project policies and their current configuration.", + "responses": { + "200": { + "description": "Policies List", + "schema": { + "$ref": "#\/definitions\/policyList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPolicies", + "group": "policies", + "weight": 632, + "cookies": false, + "type": "", + "demo": "project\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/project\/policies\/membership-privacy": { + "patch": { + "summary": "Update membership privacy policy", + "operationId": "projectUpdateMembershipPrivacyPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipPrivacyPolicy", + "group": "policies", + "weight": 634, + "cookies": false, + "type": "", + "demo": "project\/update-membership-privacy-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "boolean", + "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true if you want make user email visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userPhone": { + "type": "boolean", + "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userName": { + "type": "boolean", + "description": "Set to true if you want make user name visible to all team members, or false to hide it.", + "default": null, + "x-example": false + }, + "userMFA": { + "type": "boolean", + "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", + "default": null, + "x-example": false + } + } + } + } + ] + } + }, + "\/project\/policies\/password-dictionary": { + "patch": { + "summary": "Update password dictionary policy", + "operationId": "projectUpdatePasswordDictionaryPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordDictionaryPolicy", + "group": "policies", + "weight": 635, + "cookies": false, + "type": "", + "demo": "project\/update-password-dictionary-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/password-history": { + "patch": { + "summary": "Update password history policy", + "operationId": "projectUpdatePasswordHistoryPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordHistoryPolicy", + "group": "policies", + "weight": 636, + "cookies": false, + "type": "", + "demo": "project\/update-password-history-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + ] + } + }, + "\/project\/policies\/password-personal-data": { + "patch": { + "summary": "Update password personal data policy", + "operationId": "projectUpdatePasswordPersonalDataPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordPersonalDataPolicy", + "group": "policies", + "weight": 637, + "cookies": false, + "type": "", + "demo": "project\/update-password-personal-data-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/session-alert": { + "patch": { + "summary": "Update session alert policy", + "operationId": "projectUpdateSessionAlertPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionAlertPolicy", + "group": "policies", + "weight": 638, + "cookies": false, + "type": "", + "demo": "project\/update-session-alert-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/session-duration": { + "patch": { + "summary": "Update session duration policy", + "operationId": "projectUpdateSessionDurationPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update maximum duration how long sessions created within a project should stay active for.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionDurationPolicy", + "group": "policies", + "weight": 639, + "cookies": false, + "type": "", + "demo": "project\/update-session-duration-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", + "default": null, + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "duration" + ] + } + } + ] + } + }, + "\/project\/policies\/session-invalidation": { + "patch": { + "summary": "Update session invalidation policy", + "operationId": "projectUpdateSessionInvalidationPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionInvalidationPolicy", + "group": "policies", + "weight": 640, + "cookies": false, + "type": "", + "demo": "project\/update-session-invalidation-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/policies\/session-limit": { + "patch": { + "summary": "Update session limit policy", + "operationId": "projectUpdateSessionLimitPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSessionLimitPolicy", + "group": "policies", + "weight": 641, + "cookies": false, + "type": "", + "demo": "project\/update-session-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + ] + } + }, + "\/project\/policies\/user-limit": { + "patch": { + "summary": "Update user limit policy", + "operationId": "projectUpdateUserLimitPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUserLimitPolicy", + "group": "policies", + "weight": 642, + "cookies": false, + "type": "", + "demo": "project\/update-user-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "total" + ] + } + } + ] + } + }, + "\/project\/policies\/{policyId}": { + "get": { + "summary": "Get project policy", + "operationId": "projectGetPolicy", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", + "responses": { + "200": { + "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/policyPasswordDictionary" + }, + { + "$ref": "#\/definitions\/policyPasswordHistory" + }, + { + "$ref": "#\/definitions\/policyPasswordPersonalData" + }, + { + "$ref": "#\/definitions\/policySessionAlert" + }, + { + "$ref": "#\/definitions\/policySessionDuration" + }, + { + "$ref": "#\/definitions\/policySessionInvalidation" + }, + { + "$ref": "#\/definitions\/policySessionLimit" + }, + { + "$ref": "#\/definitions\/policyUserLimit" + }, + { + "$ref": "#\/definitions\/policyMembershipPrivacy" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/definitions\/policyPasswordDictionary", + "password-history": "#\/definitions\/policyPasswordHistory", + "password-personal-data": "#\/definitions\/policyPasswordPersonalData", + "session-alert": "#\/definitions\/policySessionAlert", + "session-duration": "#\/definitions\/policySessionDuration", + "session-invalidation": "#\/definitions\/policySessionInvalidation", + "session-limit": "#\/definitions\/policySessionLimit", + "user-limit": "#\/definitions\/policyUserLimit", + "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPolicy", + "group": "policies", + "weight": 633, + "cookies": false, + "type": "", + "demo": "project\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "policies.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "required": true, + "type": "string", + "x-example": "password-dictionary", + "enum": [ + "password-dictionary", + "password-history", + "password-personal-data", + "session-alert", + "session-duration", + "session-invalidation", + "session-limit", + "user-limit", + "membership-privacy" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/project\/protocols\/{protocolId}": { + "patch": { + "summary": "Update project protocol", + "operationId": "projectUpdateProtocol", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateProtocol", + "group": null, + "weight": 596, + "cookies": false, + "type": "", + "demo": "project\/update-protocol.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "protocolId", + "description": "Protocol name. Can be one of: rest, graphql, websocket", + "required": true, + "type": "string", + "x-example": "rest", + "enum": [ + "rest", + "graphql", + "websocket" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Protocol status.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/services\/{serviceId}": { + "patch": { + "summary": "Update project service", + "operationId": "projectUpdateService", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateService", + "group": null, + "weight": 597, + "cookies": false, + "type": "", + "demo": "project\/update-service.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "serviceId", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", + "required": true, + "type": "string", + "x-example": "account", + "enum": [ + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging" + ], + "x-enum-name": null, + "x-enum-keys": [], + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Service status.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, + "\/project\/smtp": { + "patch": { + "summary": "Update project SMTP configuration", + "operationId": "projectUpdateSMTP", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSMTP", + "group": "smtp", + "weight": 598, + "cookies": false, + "type": "", + "demo": "project\/update-smtp.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "SMTP server hostname (domain)", + "default": null, + "x-example": null, + "x-nullable": true + }, + "port": { + "type": "integer", + "description": "SMTP server port", + "default": null, + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "SMTP server username. Leave empty for no authorization.", + "default": null, + "x-example": "<USERNAME>", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", + "default": null, + "x-example": "<PASSWORD>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email address shown in inbox as the sender of the email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name shown in inbox as the sender of the email.", + "default": null, + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Email used when user replies to the email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Name used when user replies to the email.", + "default": null, + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + }, + "secure": { + "type": "string", + "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", + "default": null, + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": null, + "x-enum-keys": [], + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/project\/smtp\/tests": { + "post": { + "summary": "Create project SMTP test", + "operationId": "projectCreateSMTPTest", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Send a test email to verify SMTP configuration. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSMTPTest", + "group": "smtp", + "weight": 599, + "cookies": false, + "type": "", + "demo": "project\/create-smtp-test.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + } + } + ] + } + }, + "\/project\/templates\/email": { + "get": { + "summary": "List project email templates", + "operationId": "projectListEmailTemplates", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", + "responses": { + "200": { + "description": "Email Templates List", + "schema": { + "$ref": "#\/definitions\/emailTemplateList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listEmailTemplates", + "group": "templates", + "weight": 600, + "cookies": false, + "type": "", + "demo": "project\/list-email-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "patch": { + "summary": "Update project email template", + "operationId": "projectUpdateEmailTemplate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailTemplate", + "group": "templates", + "weight": 602, + "cookies": false, + "type": "", + "demo": "project\/update-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "default": null, + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [] + }, + "locale": { + "type": "string", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "default": "", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [] + }, + "subject": { + "type": "string", + "description": "Subject of the email template. Can be up to 255 characters.", + "default": null, + "x-example": "<SUBJECT>", + "x-nullable": true + }, + "message": { + "type": "string", + "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", + "default": null, + "x-example": "<MESSAGE>", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name of the email sender.", + "default": null, + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Reply to name.", + "default": null, + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + } + }, + "required": [ + "templateId" + ] + } + } + ] + } + }, + "\/project\/templates\/email\/{templateId}": { + "get": { + "summary": "Get project email template", + "operationId": "projectGetEmailTemplate", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", + "responses": { + "200": { + "description": "EmailTemplate", + "schema": { + "$ref": "#\/definitions\/emailTemplate" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getEmailTemplate", + "group": "templates", + "weight": 601, + "cookies": false, + "type": "", + "demo": "project\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "required": true, + "type": "string", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "EmailTemplateType", + "x-enum-keys": [], + "in": "path" + }, + { + "name": "locale", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ar-ae", + "ar-bh", + "ar-dz", + "ar-eg", + "ar-iq", + "ar-jo", + "ar-kw", + "ar-lb", + "ar-ly", + "ar-ma", + "ar-om", + "ar-qa", + "ar-sa", + "ar-sy", + "ar-tn", + "ar-ye", + "as", + "az", + "be", + "bg", + "bh", + "bn", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "de-at", + "de-ch", + "de-li", + "de-lu", + "el", + "en", + "en-au", + "en-bz", + "en-ca", + "en-gb", + "en-ie", + "en-jm", + "en-nz", + "en-tt", + "en-us", + "en-za", + "eo", + "es", + "es-ar", + "es-bo", + "es-cl", + "es-co", + "es-cr", + "es-do", + "es-ec", + "es-gt", + "es-hn", + "es-mx", + "es-ni", + "es-pa", + "es-pe", + "es-pr", + "es-py", + "es-sv", + "es-uy", + "es-ve", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "fr-lu", + "ga", + "gd", + "he", + "hi", + "hr", + "hu", + "id", + "is", + "it", + "it-ch", + "ja", + "ji", + "ko", + "ku", + "lt", + "lv", + "mk", + "ml", + "ms", + "mt", + "nb", + "ne", + "nl", + "nl-be", + "nn", + "no", + "pa", + "pl", + "pt", + "pt-br", + "rm", + "ro", + "ro-md", + "ru", + "ru-md", + "sb", + "sk", + "sl", + "sq", + "sr", + "sv", + "sv-fi", + "th", + "tn", + "tr", + "ts", + "ua", + "ur", + "ve", + "vi", + "xh", + "zh-cn", + "zh-hk", + "zh-sg", + "zh-tw", + "zu" + ], + "x-enum-name": "EmailTemplateLocale", + "x-enum-keys": [], + "default": "", + "in": "query" + } + ] + } + }, + "\/project\/variables": { + "get": { + "summary": "List project variables", + "operationId": "projectListVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a list of all project environment variables.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 604, + "cookies": false, + "type": "", + "demo": "project\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project variable", + "operationId": "projectCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 603, + "cookies": false, + "type": "", + "demo": "project\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<VARIABLE_ID>" + }, + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + ] + } + }, + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get project variable", + "operationId": "projectGetVariable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Get a variable by its unique ID. ", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 605, + "cookies": false, + "type": "", + "demo": "project\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update project variable", + "operationId": "projectUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 607, + "cookies": false, + "type": "", + "demo": "project\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "default": null, + "x-example": false, + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete project variable", + "operationId": "projectDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "project" + ], + "description": "Delete a variable by its unique ID. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 606, + "cookies": false, + "type": "", + "demo": "project\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/sites": { + "get": { + "summary": "List sites", + "operationId": "sitesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all the project's sites. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Sites List", + "schema": { + "$ref": "#\/definitions\/siteList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "sites", + "weight": 476, + "cookies": false, + "type": "", + "demo": "sites\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create site", + "operationId": "sitesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new site.", + "responses": { + "201": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "sites", + "weight": 474, + "cookies": false, + "type": "", + "demo": "sites\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "siteId": { + "type": "string", + "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<SITE_ID>" + }, + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "default": null, + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "default": true, + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "default": 30, + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "default": "", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "default": "", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "default": "", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "default": "", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "default": null, + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "default": "", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "default": "", + "x-example": "<FALLBACK_FILE>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "siteId", + "name", + "framework", + "buildRuntime" + ] + } + } + ] + } + }, + "\/sites\/frameworks": { + "get": { + "summary": "List frameworks", + "operationId": "sitesListFrameworks", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all frameworks that are currently available on the server instance.", + "responses": { + "200": { + "description": "Frameworks List", + "schema": { + "$ref": "#\/definitions\/frameworkList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFrameworks", + "group": "frameworks", + "weight": 479, + "cookies": false, + "type": "", + "demo": "sites\/list-frameworks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "sitesListSpecifications", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "List allowed site specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "schema": { + "$ref": "#\/definitions\/specificationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "frameworks", + "weight": 502, + "cookies": false, + "type": "", + "demo": "sites\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/{siteId}": { + "get": { + "summary": "Get site", + "operationId": "sitesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "sites", + "weight": 475, + "cookies": false, + "type": "", + "demo": "sites\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update site", + "operationId": "sitesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Update site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "sites", + "weight": 477, + "cookies": false, + "type": "", + "demo": "sites\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "default": null, + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "default": true, + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "default": 30, + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "default": "", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "default": "", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "default": "", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "default": "", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "default": "", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "default": "", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "default": "", + "x-example": "<FALLBACK_FILE>" + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name", + "framework" + ] + } + } + ] + }, + "delete": { + "summary": "Delete site", + "operationId": "sitesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "sites" + ], + "description": "Delete a site by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "sites", + "weight": 478, + "cookies": false, + "type": "", + "demo": "sites\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployment": { + "patch": { + "summary": "Update site's deployment", + "operationId": "sitesUpdateSiteDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "responses": { + "200": { + "description": "Site", + "schema": { + "$ref": "#\/definitions\/site" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSiteDeployment", + "group": "sites", + "weight": 485, + "cookies": false, + "type": "", + "demo": "sites\/update-site-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "sitesListDeployments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { + "$ref": "#\/definitions\/deploymentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDeployments", + "group": "deployments", + "weight": 484, + "cookies": false, + "type": "", + "demo": "sites\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "sitesCreateDeployment", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "weight": 480, + "cookies": false, + "type": "upload", + "demo": "sites\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "installCommand", + "description": "Install Commands.", + "required": false, + "type": "string", + "x-example": "<INSTALL_COMMAND>", + "in": "formData" + }, + { + "name": "buildCommand", + "description": "Build Commands.", + "required": false, + "type": "string", + "x-example": "<BUILD_COMMAND>", + "in": "formData" + }, + { + "name": "outputDirectory", + "description": "Output Directory.", + "required": false, + "type": "string", + "x-example": "<OUTPUT_DIRECTORY>", + "in": "formData" + }, + { + "name": "code", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "activate", + "description": "Automatically activate the deployment when it is finished building.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "formData" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "sitesCreateDuplicateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDuplicateDeployment", + "group": "deployments", + "weight": 488, + "cookies": false, + "type": "", + "demo": "sites\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "default": null, + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "sitesCreateTemplateDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTemplateDeployment", + "group": "deployments", + "weight": 481, + "cookies": false, + "type": "", + "demo": "sites\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "Repository name of the template.", + "default": null, + "x-example": "<REPOSITORY>" + }, + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "default": null, + "x-example": "<OWNER>" + }, + "rootDirectory": { + "type": "string", + "description": "Path to site code in the template repo.", + "default": null, + "x-example": "<ROOT_DIRECTORY>" + }, + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "default": null, + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "sitesCreateVcsDeployment", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVcsDeployment", + "group": "deployments", + "weight": 482, + "cookies": false, + "type": "", + "demo": "sites\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "default": null, + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "default": null, + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "sitesGetDeployment", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeployment", + "group": "deployments", + "weight": 483, + "cookies": false, + "type": "", + "demo": "sites\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "sitesDeleteDeployment", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "sites" + ], + "description": "Delete a site deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "weight": 486, + "cookies": false, + "type": "", + "demo": "sites\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "sitesGetDeploymentDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "sites" + ], + "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "weight": 487, + "cookies": false, + "type": "location", + "demo": "sites\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [], + "default": "source", + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "sitesUpdateDeploymentStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "schema": { + "$ref": "#\/definitions\/deployment" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "weight": 489, + "cookies": false, + "type": "", + "demo": "sites\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "<DEPLOYMENT_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/logs": { + "get": { + "summary": "List logs", + "operationId": "sitesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all site logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "schema": { + "$ref": "#\/definitions\/executionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 491, + "cookies": false, + "type": "", + "demo": "sites\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/logs\/{logId}": { + "get": { + "summary": "Get log", + "operationId": "sitesGetLog", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a site request log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { + "$ref": "#\/definitions\/execution" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getLog", + "group": "logs", + "weight": 490, + "cookies": false, + "type": "", + "demo": "sites\/get-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "type": "string", + "x-example": "<LOG_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete log", + "operationId": "sitesDeleteLog", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Delete a site log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteLog", + "group": "logs", + "weight": 492, + "cookies": false, + "type": "", + "demo": "sites\/delete-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "type": "string", + "x-example": "<LOG_ID>", + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "sitesListVariables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a list of all variables of a specific site.", + "responses": { + "200": { + "description": "Variables List", + "schema": { + "$ref": "#\/definitions\/variableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listVariables", + "group": "variables", + "weight": 495, + "cookies": false, + "type": "", + "demo": "sites\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "sitesCreateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", + "responses": { + "201": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", + "weight": 493, + "cookies": false, + "type": "", + "demo": "sites\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "key", + "value" + ] + } + } + ] + } + }, + "\/sites\/{siteId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "sitesGetVariable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getVariable", + "group": "variables", + "weight": 494, + "cookies": false, + "type": "", + "demo": "sites\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "sitesUpdateVariable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "sites" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "schema": { + "$ref": "#\/definitions\/variable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "weight": 496, + "cookies": false, + "type": "", + "demo": "sites\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "default": null, + "x-example": "<KEY>" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "default": null, + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "default": null, + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key" + ] + } + } + ] + }, + "delete": { + "summary": "Delete variable", + "operationId": "sitesDeleteVariable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "sites" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteVariable", + "group": "variables", + "weight": 497, + "cookies": false, + "type": "", + "demo": "sites\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "type": "string", + "x-example": "<SITE_ID>", + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "type": "string", + "x-example": "<VARIABLE_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "schema": { + "$ref": "#\/definitions\/bucketList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBuckets", + "group": "buckets", + "weight": 545, + "cookies": false, + "type": "", + "demo": "storage\/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "schema": { + "$ref": "#\/definitions\/bucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBucket", + "group": "buckets", + "weight": 543, + "cookies": false, + "type": "", + "demo": "storage\/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<BUCKET_ID>" + }, + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "default": true, + "x-example": false + } + }, + "required": [ + "bucketId", + "name" + ] + } + } + ] + } + }, + "\/storage\/buckets\/{bucketId}": { + "get": { + "summary": "Get bucket", + "operationId": "storageGetBucket", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "schema": { + "$ref": "#\/definitions\/bucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBucket", + "group": "buckets", + "weight": 544, + "cookies": false, + "type": "", + "demo": "storage\/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update bucket", + "operationId": "storageUpdateBucket", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "schema": { + "$ref": "#\/definitions\/bucket" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBucket", + "group": "buckets", + "weight": 546, + "cookies": false, + "type": "", + "demo": "storage\/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", + "default": {}, + "x-example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "default": "none", + "x-example": "none", + "enum": [ + "none", + "gzip", + "zstd" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete bucket", + "operationId": "storageDeleteBucket", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "storage" + ], + "description": "Delete a storage bucket by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBucket", + "group": "buckets", + "weight": 547, + "cookies": false, + "type": "", + "demo": "storage\/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "schema": { + "$ref": "#\/definitions\/fileList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "weight": 550, + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "consumes": [ + "multipart\/form-data" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "weight": 548, + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "x-upload-id": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "formData" + }, + { + "name": "file", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "permissions", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "x-example": "[\"read(\"any\")\"]", + "in": "formData" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFile", + "group": "files", + "weight": 549, + "cookies": false, + "type": "", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "schema": { + "$ref": "#\/definitions\/file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFile", + "group": "files", + "weight": 551, + "cookies": false, + "type": "", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "weight": 552, + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileDownload", + "group": "files", + "weight": 554, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFilePreview", + "group": "files", + "weight": 553, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [], + "default": "center", + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [], + "default": "", + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "consumes": [], + "produces": [ + "*\/*" + ], + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFileView", + "group": "files", + "weight": 555, + "cookies": false, + "type": "location", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "<TOKEN>", + "default": "", + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 265, + "cookies": false, + "type": "", + "demo": "tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 261, + "cookies": false, + "type": "", + "demo": "tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 332, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 328, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 329, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 330, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 331, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 333, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 262, + "cookies": false, + "type": "", + "demo": "tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 263, + "cookies": false, + "type": "", + "demo": "tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 264, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": "tables", + "weight": 272, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDBCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": "tables", + "weight": 268, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TABLE_ID>" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": "tables", + "weight": 269, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDBUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": "tables", + "weight": 270, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDBDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": "tables", + "weight": 271, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 277, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 278, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 279, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 280, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 281, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 282, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 283, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 284, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 285, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 286, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 287, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 288, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 289, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 290, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 291, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { + "post": { + "summary": "Create line column", + "operationId": "tablesDBCreateLineColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a geometric line column.", + "responses": { + "202": { + "description": "ColumnLine", + "schema": { + "$ref": "#\/definitions\/columnLine" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLineColumn", + "group": "columns", + "weight": 292, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { + "patch": { + "summary": "Update line column", + "operationId": "tablesDBUpdateLineColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a line column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnLine", + "schema": { + "$ref": "#\/definitions\/columnLine" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLineColumn", + "group": "columns", + "weight": 293, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "default": null, + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + "post": { + "summary": "Create longtext column", + "operationId": "tablesDBCreateLongtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a longtext column.\n", + "responses": { + "202": { + "description": "ColumnLongtext", + "schema": { + "$ref": "#\/definitions\/columnLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createLongtextColumn", + "group": "columns", + "weight": 310, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { + "patch": { + "summary": "Update longtext column", + "operationId": "tablesDBUpdateLongtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnLongtext", + "schema": { + "$ref": "#\/definitions\/columnLongtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLongtextColumn", + "group": "columns", + "weight": 311, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { + "post": { + "summary": "Create mediumtext column", + "operationId": "tablesDBCreateMediumtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a mediumtext column.\n", + "responses": { + "202": { + "description": "ColumnMediumtext", + "schema": { + "$ref": "#\/definitions\/columnMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMediumtextColumn", + "group": "columns", + "weight": 308, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext column", + "operationId": "tablesDBUpdateMediumtextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnMediumtext", + "schema": { + "$ref": "#\/definitions\/columnMediumtext" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMediumtextColumn", + "group": "columns", + "weight": 309, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { + "post": { + "summary": "Create point column", + "operationId": "tablesDBCreatePointColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a geometric point column.", + "responses": { + "202": { + "description": "ColumnPoint", + "schema": { + "$ref": "#\/definitions\/columnPoint" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPointColumn", + "group": "columns", + "weight": 294, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { + "patch": { + "summary": "Update point column", + "operationId": "tablesDBUpdatePointColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a point column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPoint", + "schema": { + "$ref": "#\/definitions\/columnPoint" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePointColumn", + "group": "columns", + "weight": 295, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "default": null, + "x-example": "[1, 2]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { + "post": { + "summary": "Create polygon column", + "operationId": "tablesDBCreatePolygonColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a geometric polygon column.", + "responses": { + "202": { + "description": "ColumnPolygon", + "schema": { + "$ref": "#\/definitions\/columnPolygon" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPolygonColumn", + "group": "columns", + "weight": 296, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { + "patch": { + "summary": "Update polygon column", + "operationId": "tablesDBUpdatePolygonColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPolygon", + "schema": { + "$ref": "#\/definitions\/columnPolygon" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePolygonColumn", + "group": "columns", + "weight": 297, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "default": null, + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 298, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "<RELATED_TABLE_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 300, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "deprecated": { + "since": "1.9.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for text columns, in number of characters.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 301, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { + "post": { + "summary": "Create text column", + "operationId": "tablesDBCreateTextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a text column.\n", + "responses": { + "202": { + "description": "ColumnText", + "schema": { + "$ref": "#\/definitions\/columnText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextColumn", + "group": "columns", + "weight": 306, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { + "patch": { + "summary": "Update text column", + "operationId": "tablesDBUpdateTextColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnText", + "schema": { + "$ref": "#\/definitions\/columnText" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTextColumn", + "group": "columns", + "weight": 307, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 302, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 303, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { + "post": { + "summary": "Create varchar column", + "operationId": "tablesDBCreateVarcharColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a varchar column.\n", + "responses": { + "202": { + "description": "ColumnVarchar", + "schema": { + "$ref": "#\/definitions\/columnVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVarcharColumn", + "group": "columns", + "weight": 304, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { + "patch": { + "summary": "Update varchar column", + "operationId": "tablesDBUpdateVarcharColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnVarchar", + "schema": { + "$ref": "#\/definitions\/columnVarchar" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVarcharColumn", + "group": "columns", + "weight": 305, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar column.", + "default": null, + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/columnBoolean", + "integer": "#\/definitions\/columnInteger", + "double": "#\/definitions\/columnFloat", + "string": "#\/definitions\/columnString", + "datetime": "#\/definitions\/columnDatetime", + "relationship": "#\/definitions\/columnRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/columnBoolean": { + "type": "boolean" + }, + "#\/definitions\/columnInteger": { + "type": "integer" + }, + "#\/definitions\/columnFloat": { + "type": "double" + }, + "#\/definitions\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/columnDatetime": { + "type": "datetime" + }, + "#\/definitions\/columnRelationship": { + "type": "relationship" + }, + "#\/definitions\/columnString": { + "type": "string" + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 275, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDBDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 276, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 299, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [], + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null, + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 315, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 312, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "TablesDBIndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 313, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 314, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 324, + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 316, + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<ROW_ID>" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "put": { + "summary": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 321, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDBUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 319, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDBDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 323, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 317, + "cookies": false, + "type": "", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 320, + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 318, + "cookies": false, + "type": "", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 322, + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 327, + "cookies": false, + "type": "", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 326, + "cookies": false, + "type": "", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "<TABLE_ID>", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "<ROW_ID>", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "schema": { + "$ref": "#\/definitions\/teamList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "teams", + "weight": 526, + "cookies": false, + "type": "", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "weight": 524, + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TEAM_ID>" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "default": [ + "owner" + ], + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + ] + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "weight": 525, + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "schema": { + "$ref": "#\/definitions\/team" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "weight": 528, + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "weight": 527, + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 533, + "cookies": false, + "type": "", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team membership", + "operationId": "teamsCreateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMembership", + "group": "memberships", + "weight": 531, + "cookies": false, + "type": "", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to a team.", + "default": "", + "x-example": "<USER_ID>" + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMembership", + "group": "memberships", + "weight": 532, + "cookies": false, + "type": "", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "weight": 534, + "cookies": false, + "type": "", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + ] + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "weight": 535, + "cookies": false, + "type": "", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "schema": { + "$ref": "#\/definitions\/membership" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembershipStatus", + "group": "memberships", + "weight": 536, + "cookies": false, + "type": "", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "<MEMBERSHIP_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "<USER_ID>" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "default": null, + "x-example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + ] + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "teams", + "weight": 529, + "cookies": false, + "type": "", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "teams", + "weight": 530, + "cookies": false, + "type": "", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "<TEAM_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "List tokens", + "operationId": "tokensList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Resource Tokens List", + "schema": { + "$ref": "#\/definitions\/resourceTokenList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "files", + "weight": 540, + "cookies": false, + "type": "", + "demo": "tokens\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file token", + "operationId": "tokensCreateFileToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", + "responses": { + "201": { + "description": "ResourceToken", + "schema": { + "$ref": "#\/definitions\/resourceToken" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFileToken", + "group": "files", + "weight": 538, + "cookies": false, + "type": "", + "demo": "tokens\/create-file-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "<BUCKET_ID>", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "<FILE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "Token expiry date", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + ] + } + }, + "\/tokens\/{tokenId}": { + "get": { + "summary": "Get token", + "operationId": "tokensGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "Get a token by its unique ID.", + "responses": { + "200": { + "description": "ResourceToken", + "schema": { + "$ref": "#\/definitions\/resourceToken" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tokens", + "weight": 539, + "cookies": false, + "type": "", + "demo": "tokens\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "type": "string", + "x-example": "<TOKEN_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update token", + "operationId": "tokensUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tokens" + ], + "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "responses": { + "200": { + "description": "ResourceToken", + "schema": { + "$ref": "#\/definitions\/resourceToken" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tokens", + "weight": 541, + "cookies": false, + "type": "", + "demo": "tokens\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "type": "string", + "x-example": "<TOKEN_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "expire": { + "type": "string", + "description": "File token expiry date", + "default": null, + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + ] + }, + "delete": { + "summary": "Delete token", + "operationId": "tokensDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tokens" + ], + "description": "Delete a token by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tokens", + "weight": 542, + "cookies": false, + "type": "", + "demo": "tokens\/delete.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "type": "string", + "x-example": "<TOKEN_ID>", + "in": "path" + } + ] + } + }, + "\/users": { + "get": { + "summary": "List users", + "operationId": "usersList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "schema": { + "$ref": "#\/definitions\/userList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "users", + "weight": 71, + "cookies": false, + "type": "", + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user", + "operationId": "usersCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "users", + "weight": 62, + "cookies": false, + "type": "", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": null, + "x-example": "+12065550100", + "format": "phone", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "default": "", + "x-example": null + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + ] + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArgon2User", + "group": "users", + "weight": 65, + "cookies": false, + "type": "", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Argon2.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBcryptUser", + "group": "users", + "weight": 63, + "cookies": false, + "type": "", + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Bcrypt.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "schema": { + "$ref": "#\/definitions\/identityList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIdentities", + "group": "identities", + "weight": 79, + "cookies": false, + "type": "", + "demo": "users\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "weight": 103, + "cookies": false, + "type": "", + "demo": "users\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "type": "string", + "x-example": "<IDENTITY_ID>", + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMD5User", + "group": "users", + "weight": 64, + "cookies": false, + "type": "", + "demo": "users\/create-md-5-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using MD5.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPHPassUser", + "group": "users", + "weight": 67, + "cookies": false, + "type": "", + "demo": "users\/create-ph-pass-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using PHPass.", + "default": null, + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptUser", + "group": "users", + "weight": 68, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt.", + "default": null, + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Optional salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "type": "integer", + "description": "Optional CPU cost used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "default": null, + "x-example": null, + "format": "int32" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + ] + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptModifiedUser", + "group": "users", + "weight": 69, + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-modified-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt Modified.", + "default": null, + "x-example": "password", + "format": "password" + }, + "passwordSalt": { + "type": "string", + "description": "Salt used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "type": "string", + "description": "Salt separator used to hash password.", + "default": null, + "x-example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "type": "string", + "description": "Signer key used to hash password.", + "default": null, + "x-example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + ] + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSHAUser", + "group": "users", + "weight": 66, + "cookies": false, + "type": "", + "demo": "users\/create-sha-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<USER_ID>" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using SHA.", + "default": null, + "x-example": "password", + "format": "password" + }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "default": "", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [] + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + ] + } + }, + "\/users\/{userId}": { + "get": { + "summary": "Get user", + "operationId": "usersGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "users", + "weight": 72, + "cookies": false, + "type": "", + "demo": "users\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user", + "operationId": "usersDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "users", + "weight": 101, + "cookies": false, + "type": "", + "demo": "users\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmail", + "group": "users", + "weight": 86, + "cookies": false, + "type": "", + "demo": "users\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + ] + } + }, + "\/users\/{userId}\/impersonator": { + "patch": { + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateImpersonator", + "group": "users", + "weight": 82, + "cookies": false, + "type": "", + "demo": "users\/update-impersonator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "default": null, + "x-example": false + } + }, + "required": [ + "impersonator" + ] + } + } + ] + } + }, + "\/users\/{userId}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "schema": { + "$ref": "#\/definitions\/jwt" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createJWT", + "group": "sessions", + "weight": 104, + "cookies": false, + "type": "", + "demo": "users\/create-jwt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "default": "", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" + } + } + } + } + ] + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": "users", + "weight": 81, + "cookies": false, + "type": "", + "demo": "users\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + ] + } + }, + "\/users\/{userId}\/logs": { + "get": { + "summary": "List user logs", + "operationId": "usersListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user 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": 77, + "cookies": false, + "type": "", + "demo": "users\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user membership list by its unique ID.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { + "$ref": "#\/definitions\/membershipList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "weight": 76, + "cookies": false, + "type": "", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + } + }, + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfa", + "group": "users", + "weight": 91, + "cookies": false, + "type": "", + "demo": "users\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "default": null, + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + ] + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "weight": 96, + "cookies": false, + "type": "", + "demo": "users\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [], + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "schema": { + "$ref": "#\/definitions\/mfaFactors" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listMfaFactors", + "group": "mfa", + "weight": 92, + "cookies": false, + "type": "", + "demo": "users\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getMfaRecoveryCodes", + "group": "mfa", + "weight": 93, + "cookies": false, + "type": "", + "demo": "users\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfaRecoveryCodes", + "group": "mfa", + "weight": 95, + "cookies": false, + "type": "", + "demo": "users\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "schema": { + "$ref": "#\/definitions\/mfaRecoveryCodes" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMfaRecoveryCodes", + "group": "mfa", + "weight": 94, + "cookies": false, + "type": "", + "demo": "users\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "users", + "weight": 84, + "cookies": false, + "type": "", + "demo": "users\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + ] + } + }, + "\/users\/{userId}\/password": { + "patch": { + "summary": "Update password", + "operationId": "usersUpdatePassword", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePassword", + "group": "users", + "weight": 85, + "cookies": false, + "type": "", + "demo": "users\/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": null + } + }, + "required": [ + "password" + ] + } + } + ] + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhone", + "group": "users", + "weight": 87, + "cookies": false, + "type": "", + "demo": "users\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "User phone number.", + "default": null, + "x-example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "number" + ] + } + } + ] + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPrefs", + "group": "users", + "weight": 73, + "cookies": false, + "type": "", + "demo": "users\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user preferences", + "operationId": "usersUpdatePrefs", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { + "$ref": "#\/definitions\/preferences" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "users", + "weight": 89, + "cookies": false, + "type": "", + "demo": "users\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + ] + } + }, + "\/users\/{userId}\/sessions": { + "get": { + "summary": "List user sessions", + "operationId": "usersListSessions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { + "$ref": "#\/definitions\/sessionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSessions", + "group": "sessions", + "weight": 75, + "cookies": false, + "type": "", + "demo": "users\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.read", + "sessions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "schema": { + "$ref": "#\/definitions\/session" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "weight": 97, + "cookies": false, + "type": "", + "demo": "users\/create-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "weight": 100, + "cookies": false, + "type": "", + "demo": "users\/delete-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/sessions\/{sessionId}": { + "delete": { + "summary": "Delete user session", + "operationId": "usersDeleteSession", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a user sessions by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "weight": 99, + "cookies": false, + "type": "", + "demo": "users\/delete-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "type": "string", + "x-example": "<SESSION_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/status": { + "patch": { + "summary": "Update user status", + "operationId": "usersUpdateStatus", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStatus", + "group": "users", + "weight": 80, + "cookies": false, + "type": "", + "demo": "users\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "default": null, + "x-example": false + } + }, + "required": [ + "status" + ] + } + } + ] + } + }, + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "schema": { + "$ref": "#\/definitions\/targetList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTargets", + "group": "targets", + "weight": 78, + "cookies": false, + "type": "", + "demo": "users\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTarget", + "group": "targets", + "weight": 70, + "cookies": false, + "type": "", + "demo": "users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "targetId": { + "type": "string", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<TARGET_ID>" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "default": null, + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": null, + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + ] + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTarget", + "group": "targets", + "weight": 74, + "cookies": false, + "type": "", + "demo": "users\/get-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "schema": { + "$ref": "#\/definitions\/target" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTarget", + "group": "targets", + "weight": 90, + "cookies": false, + "type": "", + "demo": "users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": "", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTarget", + "group": "targets", + "weight": 102, + "cookies": false, + "type": "", + "demo": "users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "type": "string", + "x-example": "<TARGET_ID>", + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "schema": { + "$ref": "#\/definitions\/token" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createToken", + "group": "sessions", + "weight": 98, + "cookies": false, + "type": "", + "demo": "users\/create-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "default": 6, + "x-example": 4, + "format": "int32" + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "default": 900, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailVerification", + "group": "users", + "weight": 88, + "cookies": false, + "type": "", + "demo": "users\/update-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + ] + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePhoneVerification", + "group": "users", + "weight": 83, + "cookies": false, + "type": "", + "demo": "users\/update-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "<USER_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "default": null, + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + ] + } + }, + "\/vectorsdb": { + "get": { + "summary": "List databases", + "operationId": "vectorsDBList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "vectorsdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "vectorsdb", + "weight": 368, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<DATABASE_ID>" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/vectorsdb\/embeddings\/text": { + "post": { + "summary": "Create Text Embeddings", + "operationId": "vectorsDBCreateTextEmbeddings", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "200": { + "description": "Embedding list", + "schema": { + "$ref": "#\/definitions\/embeddingList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTextEmbeddings", + "group": "documents", + "weight": 394, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createTextEmbeddings", + "namespace": "vectorsDB", + "desc": "Create Text Embedding", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "texts", + "model" + ], + "required": [ + "texts" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/embeddingList" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-text-embeddings.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "texts": { + "type": "array", + "description": "Array of text to generate embeddings.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "model": { + "type": "string", + "description": "The embedding model to use for generating vector embeddings.", + "default": "embeddinggemma", + "x-example": "embeddinggemma", + "enum": [ + "embeddinggemma" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "texts" + ] + } + } + ] + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/transactionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "weight": 399, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "weight": 395, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "weight": 396, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "weight": 397, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "weight": 398, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "weight": 400, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "vectorsDBGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "vectorsdb", + "weight": 369, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "vectorsdb", + "weight": 370, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "vectorsdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "vectorsDBListCollections", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "VectorsDB Collections List", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollectionList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "weight": 379, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "<SEARCH>", + "default": "", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "vectorsDBCreateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "VectorsDB Collection", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "weight": 375, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<COLLECTION_ID>" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "collectionId", + "name", + "dimension" + ] + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "weight": 376, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "schema": { + "$ref": "#\/definitions\/vectorsdbCollection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "weight": 377, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimensions.", + "default": null, + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "weight": 378, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "weight": 389, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "weight": 385, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "desc": "Create documents", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<DOCUMENT_ID>" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": [], + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "put": { + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "weight": 392, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "weight": 391, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "weight": 393, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "weight": 388, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "<TRANSACTION_ID>", + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 387, + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "weight": 386, + "cookies": false, + "type": "", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "weight": 390, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "<DOCUMENT_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "default": null, + "x-example": "<TRANSACTION_ID>" + } + } + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "schema": { + "$ref": "#\/definitions\/indexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 384, + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "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`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 381, + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "hnsw_euclidean", + "enum": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ], + "x-enum-name": "VectorsDBIndexType", + "x-enum-keys": [] + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "vectorsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/index" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 382, + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "vectorsDBDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "vectorsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 383, + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "<COLLECTION_ID>", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "webhooksList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Webhooks List", + "schema": { + "$ref": "#\/definitions\/webhookList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 573, + "cookies": false, + "type": "", + "demo": "webhooks\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create webhook", + "operationId": "webhooksCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", + "responses": { + "201": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 572, + "cookies": false, + "type": "", + "demo": "webhooks\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "webhookId": { + "type": "string", + "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "<WEBHOOK_ID>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "default": null, + "x-example": null + }, + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": false, + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_PASSWORD>" + }, + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + } + }, + "required": [ + "webhookId", + "url", + "name", + "events" + ] + } + } + ] + } + }, + "\/webhooks\/{webhookId}": { + "get": { + "summary": "Get webhook", + "operationId": "webhooksGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 574, + "cookies": false, + "type": "", + "demo": "webhooks\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + } + ] + }, + "put": { + "summary": "Update webhook", + "operationId": "webhooksUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 576, + "cookies": false, + "type": "", + "demo": "webhooks\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "default": null, + "x-example": "<NAME>" + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "default": null, + "x-example": null + }, + "events": { + "type": "array", + "description": "Events list. Maximum of 100 events are allowed.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": false, + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_PASSWORD>" + } + }, + "required": [ + "name", + "url", + "events" + ] + } + } + ] + }, + "delete": { + "summary": "Delete webhook", + "operationId": "webhooksDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "webhooks" + ], + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 575, + "cookies": false, + "type": "", + "demo": "webhooks\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + } + ] + } + }, + "\/webhooks\/{webhookId}\/secret": { + "patch": { + "summary": "Update webhook secret key", + "operationId": "webhooksUpdateSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "webhooks" + ], + "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", + "responses": { + "200": { + "description": "Webhook", + "schema": { + "$ref": "#\/definitions\/webhook" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSecret", + "group": null, + "weight": 577, + "cookies": false, + "type": "", + "demo": "webhooks\/update-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "type": "string", + "x-example": "<WEBHOOK_ID>", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "default": null, + "x-example": "<SECRET>", + "x-nullable": true + } + } + } + } + ] + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + } + ], + "definitions": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/document" + }, + "x-example": "" + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "type": "object", + "$ref": "#\/definitions\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ], + "example": { + "total": 5, + "tables": "" + } + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "type": "object", + "$ref": "#\/definitions\/collection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "type": "object", + "$ref": "#\/definitions\/database" + }, + "x-example": "" + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users that matched your query.", + "x-example": 5, + "format": "int32" + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { + "type": "object", + "$ref": "#\/definitions\/user" + }, + "x-example": "" + } + }, + "required": [ + "total", + "users" + ], + "example": { + "total": 5, + "users": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/session" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "type": "object", + "$ref": "#\/definitions\/identity" + }, + "x-example": "" + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "type": "object", + "$ref": "#\/definitions\/log" + }, + "x-example": "" + } + }, + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "type": "object", + "$ref": "#\/definitions\/file" + }, + "x-example": "" + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/bucket" + }, + "x-example": "" + } + }, + "required": [ + "total", + "buckets" + ], + "example": { + "total": 5, + "buckets": "" + } + }, + "resourceTokenList": { + "description": "Resource Tokens List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "type": "object", + "$ref": "#\/definitions\/resourceToken" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "type": "object", + "$ref": "#\/definitions\/team" + }, + "x-example": "" + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "type": "object", + "$ref": "#\/definitions\/membership" + }, + "x-example": "" + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "siteList": { + "description": "Sites List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sites that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "List of sites.", + "items": { + "type": "object", + "$ref": "#\/definitions\/site" + }, + "x-example": "" + } + }, + "required": [ + "total", + "sites" + ], + "example": { + "total": 5, + "sites": "" + } + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/function" + }, + "x-example": "" + } + }, + "required": [ + "total", + "functions" + ], + "example": { + "total": 5, + "functions": "" + } + }, + "frameworkList": { + "description": "Frameworks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks.", + "items": { + "type": "object", + "$ref": "#\/definitions\/framework" + }, + "x-example": "" + } + }, + "required": [ + "total", + "frameworks" + ], + "example": { + "total": 5, + "frameworks": "" + } + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/runtime" + }, + "x-example": "" + } + }, + "required": [ + "total", + "runtimes" + ], + "example": { + "total": 5, + "runtimes": "" + } + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments that matched your query.", + "x-example": 5, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { + "type": "object", + "$ref": "#\/definitions\/deployment" + }, + "x-example": "" + } + }, + "required": [ + "total", + "deployments" + ], + "example": { + "total": 5, + "deployments": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/execution" + }, + "x-example": "" + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { + "type": "object", + "$ref": "#\/definitions\/webhook" + }, + "x-example": "" + } + }, + "required": [ + "total", + "webhooks" + ], + "example": { + "total": 5, + "webhooks": "" + } + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/key" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "type": "object", + "$ref": "#\/definitions\/country" + }, + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "type": "object", + "$ref": "#\/definitions\/continent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/language" + }, + "x-example": "" + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "type": "object", + "$ref": "#\/definitions\/currency" + }, + "x-example": "" + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "type": "object", + "$ref": "#\/definitions\/phone" + }, + "x-example": "" + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": "" + } + }, + "required": [ + "total", + "variables" + ], + "example": { + "total": 5, + "variables": "" + } + }, + "mockNumberList": { + "description": "Mock Numbers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of mockNumbers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "mockNumbers": { + "type": "array", + "description": "List of mockNumbers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/mockNumber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "mockNumbers" + ], + "example": { + "total": 5, + "mockNumbers": "" + } + }, + "policyList": { + "description": "Policies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies in the given project.", + "x-example": 9, + "format": "int32" + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/policyPasswordDictionary" + }, + { + "$ref": "#\/definitions\/policyPasswordHistory" + }, + { + "$ref": "#\/definitions\/policyPasswordPersonalData" + }, + { + "$ref": "#\/definitions\/policySessionAlert" + }, + { + "$ref": "#\/definitions\/policySessionDuration" + }, + { + "$ref": "#\/definitions\/policySessionInvalidation" + }, + { + "$ref": "#\/definitions\/policySessionLimit" + }, + { + "$ref": "#\/definitions\/policyUserLimit" + }, + { + "$ref": "#\/definitions\/policyMembershipPrivacy" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/definitions\/policyPasswordDictionary", + "password-history": "#\/definitions\/policyPasswordHistory", + "password-personal-data": "#\/definitions\/policyPasswordPersonalData", + "session-alert": "#\/definitions\/policySessionAlert", + "session-duration": "#\/definitions\/policySessionDuration", + "session-invalidation": "#\/definitions\/policySessionInvalidation", + "session-limit": "#\/definitions\/policySessionLimit", + "user-limit": "#\/definitions\/policyUserLimit", + "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "policies" + ], + "example": { + "total": 9, + "policies": "" + } + }, + "emailTemplateList": { + "description": "Email Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "type": "object", + "$ref": "#\/definitions\/emailTemplate" + }, + "x-example": "" + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "healthStatusList": { + "description": "Status List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of statuses that matched your query.", + "x-example": 5, + "format": "int32" + }, + "statuses": { + "type": "array", + "description": "List of statuses.", + "items": { + "type": "object", + "$ref": "#\/definitions\/healthStatus" + }, + "x-example": "" + } + }, + "required": [ + "total", + "statuses" + ], + "example": { + "total": 5, + "statuses": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/localeCode" + }, + "x-example": "" + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/provider" + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "type": "object", + "$ref": "#\/definitions\/message" + }, + "x-example": "" + } + }, + "required": [ + "total", + "messages" + ], + "example": { + "total": 5, + "messages": "" + } + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "type": "object", + "$ref": "#\/definitions\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" + ], + "example": { + "total": 5, + "topics": "" + } + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/subscriber" + }, + "x-example": "" + } + }, + "required": [ + "total", + "subscribers" + ], + "example": { + "total": 5, + "subscribers": "" + } + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": "" + } + }, + "required": [ + "total", + "targets" + ], + "example": { + "total": 5, + "targets": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "type": "object", + "$ref": "#\/definitions\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "type": "object", + "$ref": "#\/definitions\/specification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "specifications" + ], + "example": { + "total": 5, + "specifications": "" + } + }, + "vectorsdbCollectionList": { + "description": "VectorsDB Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "type": "object", + "$ref": "#\/definitions\/vectorsdbCollection" + }, + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "embeddingList": { + "description": "Embedding list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of embeddings that matched your query.", + "x-example": 5, + "format": "int32" + }, + "embeddings": { + "type": "array", + "description": "List of embeddings.", + "items": { + "type": "object", + "$ref": "#\/definitions\/embedding" + }, + "x-example": "" + } + }, + "required": [ + "total", + "embeddings" + ], + "example": { + "total": 5, + "embeddings": "" + } + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "x-example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb", + "documentsdb", + "vectorsdb" + ] + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } + }, + "embedding": { + "description": "Embedding", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Embedding model used to generate embeddings.", + "x-example": "embeddinggemma" + }, + "dimension": { + "type": "integer", + "description": "Number of dimensions for each embedding vector.", + "x-example": 768, + "format": "int32" + }, + "embedding": { + "type": "array", + "description": "Embedding vector values. If an error occurs, this will be an empty array.", + "items": { + "type": "number", + "format": "double" + }, + "x-example": [ + 0.01, + 0.02, + 0.03 + ] + }, + "error": { + "type": "string", + "description": "Error message if embedding generation fails. Empty string if no error.", + "x-example": "Error message" + } + }, + "required": [ + "model", + "dimension", + "embedding", + "error" + ], + "example": { + "model": "embeddinggemma", + "dimension": 768, + "embedding": [ + 0.01, + 0.02, + 0.03 + ], + "error": "Error message" + } + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/attributeBoolean" + }, + { + "$ref": "#\/definitions\/attributeInteger" + }, + { + "$ref": "#\/definitions\/attributeFloat" + }, + { + "$ref": "#\/definitions\/attributeEmail" + }, + { + "$ref": "#\/definitions\/attributeEnum" + }, + { + "$ref": "#\/definitions\/attributeUrl" + }, + { + "$ref": "#\/definitions\/attributeIp" + }, + { + "$ref": "#\/definitions\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributePoint" + }, + { + "$ref": "#\/definitions\/attributeLine" + }, + { + "$ref": "#\/definitions\/attributePolygon" + }, + { + "$ref": "#\/definitions\/attributeVarchar" + }, + { + "$ref": "#\/definitions\/attributeText" + }, + { + "$ref": "#\/definitions\/attributeMediumtext" + }, + { + "$ref": "#\/definitions\/attributeLongtext" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/attributeBoolean", + "integer": "#\/definitions\/attributeInteger", + "double": "#\/definitions\/attributeFloat", + "string": "#\/definitions\/attributeString", + "datetime": "#\/definitions\/attributeDatetime", + "relationship": "#\/definitions\/attributeRelationship", + "point": "#\/definitions\/attributePoint", + "linestring": "#\/definitions\/attributeLine", + "polygon": "#\/definitions\/attributePolygon", + "varchar": "#\/definitions\/attributeVarchar", + "text": "#\/definitions\/attributeText", + "mediumtext": "#\/definitions\/attributeMediumtext", + "longtext": "#\/definitions\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/attributeBoolean": { + "type": "boolean" + }, + "#\/definitions\/attributeInteger": { + "type": "integer" + }, + "#\/definitions\/attributeFloat": { + "type": "double" + }, + "#\/definitions\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/attributeDatetime": { + "type": "datetime" + }, + "#\/definitions\/attributeRelationship": { + "type": "relationship" + }, + "#\/definitions\/attributePoint": { + "type": "point" + }, + "#\/definitions\/attributeLine": { + "type": "linestring" + }, + "#\/definitions\/attributePolygon": { + "type": "polygon" + }, + "#\/definitions\/attributeVarchar": { + "type": "varchar" + }, + "#\/definitions\/attributeText": { + "type": "text" + }, + "#\/definitions\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/attributeLongtext": { + "type": "longtext" + }, + "#\/definitions\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "x-example": 5, + "format": "int32" + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/attributeBoolean" + }, + { + "$ref": "#\/definitions\/attributeInteger" + }, + { + "$ref": "#\/definitions\/attributeFloat" + }, + { + "$ref": "#\/definitions\/attributeEmail" + }, + { + "$ref": "#\/definitions\/attributeEnum" + }, + { + "$ref": "#\/definitions\/attributeUrl" + }, + { + "$ref": "#\/definitions\/attributeIp" + }, + { + "$ref": "#\/definitions\/attributeDatetime" + }, + { + "$ref": "#\/definitions\/attributeRelationship" + }, + { + "$ref": "#\/definitions\/attributePoint" + }, + { + "$ref": "#\/definitions\/attributeLine" + }, + { + "$ref": "#\/definitions\/attributePolygon" + }, + { + "$ref": "#\/definitions\/attributeVarchar" + }, + { + "$ref": "#\/definitions\/attributeText" + }, + { + "$ref": "#\/definitions\/attributeMediumtext" + }, + { + "$ref": "#\/definitions\/attributeLongtext" + }, + { + "$ref": "#\/definitions\/attributeString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/attributeBoolean", + "integer": "#\/definitions\/attributeInteger", + "double": "#\/definitions\/attributeFloat", + "string": "#\/definitions\/attributeString", + "datetime": "#\/definitions\/attributeDatetime", + "relationship": "#\/definitions\/attributeRelationship", + "point": "#\/definitions\/attributePoint", + "linestring": "#\/definitions\/attributeLine", + "polygon": "#\/definitions\/attributePolygon", + "varchar": "#\/definitions\/attributeVarchar", + "text": "#\/definitions\/attributeText", + "mediumtext": "#\/definitions\/attributeMediumtext", + "longtext": "#\/definitions\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/attributeBoolean": { + "type": "boolean" + }, + "#\/definitions\/attributeInteger": { + "type": "integer" + }, + "#\/definitions\/attributeFloat": { + "type": "double" + }, + "#\/definitions\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/attributeDatetime": { + "type": "datetime" + }, + "#\/definitions\/attributeRelationship": { + "type": "relationship" + }, + "#\/definitions\/attributePoint": { + "type": "point" + }, + "#\/definitions\/attributeLine": { + "type": "linestring" + }, + "#\/definitions\/attributePolygon": { + "type": "polygon" + }, + "#\/definitions\/attributeVarchar": { + "type": "varchar" + }, + "#\/definitions\/attributeText": { + "type": "text" + }, + "#\/definitions\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/attributeLongtext": { + "type": "longtext" + }, + "#\/definitions\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "attributes" + ], + "example": { + "total": 5, + "attributes": "" + } + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "attributePoint": { + "description": "AttributePoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + 0, + 0 + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "attributeLine": { + "description": "AttributeLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "attributePolygon": { + "description": "AttributePolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "attributeVarchar": { + "description": "AttributeVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeText": { + "description": "AttributeText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeMediumtext": { + "description": "AttributeMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeLongtext": { + "description": "AttributeLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "vectorsdbCollection": { + "description": "VectorsDB Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/attributeObject" + }, + { + "$ref": "#\/definitions\/attributeVector" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "object": "#\/definitions\/attributeObject", + "vector": "#\/definitions\/attributeVector" + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/index" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, + "format": "int32" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed", + "dimension" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500, + "dimension": 1536 + } + }, + "attributeObject": { + "description": "AttributeObject", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeVector": { + "description": "AttributeVector", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Vector dimensions.", + "x-example": 1536, + "format": "int32" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 1536 + } + }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnPoint" + }, + { + "$ref": "#\/definitions\/columnLine" + }, + { + "$ref": "#\/definitions\/columnPolygon" + }, + { + "$ref": "#\/definitions\/columnVarchar" + }, + { + "$ref": "#\/definitions\/columnText" + }, + { + "$ref": "#\/definitions\/columnMediumtext" + }, + { + "$ref": "#\/definitions\/columnLongtext" + }, + { + "$ref": "#\/definitions\/columnString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/columnBoolean", + "integer": "#\/definitions\/columnInteger", + "double": "#\/definitions\/columnFloat", + "string": "#\/definitions\/columnString", + "datetime": "#\/definitions\/columnDatetime", + "relationship": "#\/definitions\/columnRelationship", + "point": "#\/definitions\/columnPoint", + "linestring": "#\/definitions\/columnLine", + "polygon": "#\/definitions\/columnPolygon", + "varchar": "#\/definitions\/columnVarchar", + "text": "#\/definitions\/columnText", + "mediumtext": "#\/definitions\/columnMediumtext", + "longtext": "#\/definitions\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/columnBoolean": { + "type": "boolean" + }, + "#\/definitions\/columnInteger": { + "type": "integer" + }, + "#\/definitions\/columnFloat": { + "type": "double" + }, + "#\/definitions\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/columnDatetime": { + "type": "datetime" + }, + "#\/definitions\/columnRelationship": { + "type": "relationship" + }, + "#\/definitions\/columnPoint": { + "type": "point" + }, + "#\/definitions\/columnLine": { + "type": "linestring" + }, + "#\/definitions\/columnPolygon": { + "type": "polygon" + }, + "#\/definitions\/columnVarchar": { + "type": "varchar" + }, + "#\/definitions\/columnText": { + "type": "text" + }, + "#\/definitions\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/columnLongtext": { + "type": "longtext" + }, + "#\/definitions\/columnString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + }, + "bytesMax": { + "type": "integer", + "description": "Maximum row size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, + "format": "int32" + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used row size in bytes based on defined columns.", + "x-example": 1500, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnPoint" + }, + { + "$ref": "#\/definitions\/columnLine" + }, + { + "$ref": "#\/definitions\/columnPolygon" + }, + { + "$ref": "#\/definitions\/columnVarchar" + }, + { + "$ref": "#\/definitions\/columnText" + }, + { + "$ref": "#\/definitions\/columnMediumtext" + }, + { + "$ref": "#\/definitions\/columnLongtext" + }, + { + "$ref": "#\/definitions\/columnString" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/definitions\/columnBoolean", + "integer": "#\/definitions\/columnInteger", + "double": "#\/definitions\/columnFloat", + "string": "#\/definitions\/columnString", + "datetime": "#\/definitions\/columnDatetime", + "relationship": "#\/definitions\/columnRelationship", + "point": "#\/definitions\/columnPoint", + "linestring": "#\/definitions\/columnLine", + "polygon": "#\/definitions\/columnPolygon", + "varchar": "#\/definitions\/columnVarchar", + "text": "#\/definitions\/columnText", + "mediumtext": "#\/definitions\/columnMediumtext", + "longtext": "#\/definitions\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/definitions\/columnBoolean": { + "type": "boolean" + }, + "#\/definitions\/columnInteger": { + "type": "integer" + }, + "#\/definitions\/columnFloat": { + "type": "double" + }, + "#\/definitions\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/definitions\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/definitions\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/definitions\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/definitions\/columnDatetime": { + "type": "datetime" + }, + "#\/definitions\/columnRelationship": { + "type": "relationship" + }, + "#\/definitions\/columnPoint": { + "type": "point" + }, + "#\/definitions\/columnLine": { + "type": "linestring" + }, + "#\/definitions\/columnPolygon": { + "type": "polygon" + }, + "#\/definitions\/columnVarchar": { + "type": "varchar" + }, + "#\/definitions\/columnText": { + "type": "text" + }, + "#\/definitions\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/definitions\/columnLongtext": { + "type": "longtext" + }, + "#\/definitions\/columnString": { + "type": "string" + } + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ], + "example": { + "total": 5, + "columns": "" + } + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "columnPoint": { + "description": "ColumnPoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + 0, + 0 + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "columnLine": { + "description": "ColumnLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "columnPolygon": { + "description": "ColumnPolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "columnVarchar": { + "description": "ColumnVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnText": { + "description": "ColumnText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnMediumtext": { + "description": "ColumnMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnLongtext": { + "description": "ColumnLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "index": { + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index attributes length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } + }, + "columnIndex": { + "description": "Index", + "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.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "columns", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Presence sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "userInternalId": { + "type": "string", + "description": "User internal ID.", + "x-example": "1" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "x-nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "additionalProperties": true, + "x-additional-properties-key": "metadata", + "required": [ + "$id", + "$sequence", + "$createdAt", + "$updatedAt", + "$permissions", + "userInternalId", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userInternalId": "1", + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "x-nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "x-example": "argon2", + "x-nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "x-example": {}, + "items": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/algoArgon2" + }, + { + "$ref": "#\/definitions\/algoScrypt" + }, + { + "$ref": "#\/definitions\/algoScryptModified" + }, + { + "$ref": "#\/definitions\/algoBcrypt" + }, + { + "$ref": "#\/definitions\/algoPhpass" + }, + { + "$ref": "#\/definitions\/algoSha" + }, + { + "$ref": "#\/definitions\/algoMd5" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/definitions\/algoArgon2", + "scrypt": "#\/definitions\/algoScrypt", + "scryptMod": "#\/definitions\/algoScryptModified", + "bcrypt": "#\/definitions\/algoBcrypt", + "phpass": "#\/definitions\/algoPhpass", + "sha": "#\/definitions\/algoSha", + "md5": "#\/definitions\/algoMd5" + } + } + }, + "x-nullable": true + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + }, + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "x-nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "x-example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "x-example": 100, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { + "type": "string" + }, + "x-example": [ + "jpg", + "png" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + }, + "transformations": { + "type": "boolean", + "description": "Image transformations are enabled.", + "x-example": false + }, + "totalSize": { + "type": "integer", + "description": "Total size of this bucket in bytes.", + "x-example": 128, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus", + "transformations", + "totalSize" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false, + "transformations": false, + "totalSize": 128 + } + }, + "resourceToken": { + "description": "ResourceToken", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "files" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "resourceId", + "resourceType", + "expire", + "secret", + "accessedAt" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/preferences" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } + }, + "site": { + "description": "Site", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Site ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Site creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Site update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Site name.", + "x-example": "My Site" + }, + "enabled": { + "type": "boolean", + "description": "Site enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "framework": { + "type": "string", + "description": "Site framework.", + "x-example": "react" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Site's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "deploymentScreenshotLight": { + "type": "string", + "description": "Screenshot of active deployment with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentScreenshotDark": { + "type": "string", + "description": "Screenshot of active deployment with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentId": { + "type": "string", + "description": "Site's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "vars": { + "type": "array", + "description": "Site variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": [] + }, + "timeout": { + "type": "integer", + "description": "Site request timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the site dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the site.", + "x-example": "npm run build" + }, + "startCommand": { + "type": "string", + "description": "Custom command to use when starting site runtime.", + "x-example": "node custom-server.mjs" + }, + "outputDirectory": { + "type": "string", + "description": "The directory where the site build output is located.", + "x-example": "build" + }, + "installationId": { + "type": "string", + "description": "Site VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "x-example": "sites\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for SSR executions.", + "x-example": "s-1vcpu-512mb" + }, + "buildRuntime": { + "type": "string", + "description": "Site build runtime.", + "x-example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework adapter.", + "x-example": "static" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "enabled", + "live", + "logging", + "framework", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "deploymentScreenshotLight", + "deploymentScreenshotDark", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "vars", + "timeout", + "installCommand", + "buildCommand", + "startCommand", + "outputDirectory", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "startCommand": "node custom-server.mjs", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "x-example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false + }, + "runtime": { + "type": "string", + "description": "Function execution and build runtime.", + "x-example": "python-3.8" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentId": { + "type": "string", + "description": "Function's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/variable" + }, + "x-example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "x-example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "x-example": false + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for executions.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "buildSpecification", + "runtimeSpecification" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb" + } + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "x-example": "python" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "x-example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "x-example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { + "type": "string" + }, + "x-example": "amd64" + } + }, + "required": [ + "$id", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } + }, + "framework": { + "description": "Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Framework key.", + "x-example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "x-example": "SvelteKit" + }, + "buildRuntime": { + "type": "string", + "description": "Default runtime version.", + "x-example": "node-22" + }, + "runtimes": { + "type": "array", + "description": "List of supported runtime versions.", + "items": { + "type": "string" + }, + "x-example": [ + "static-1", + "node-22" + ] + }, + "adapters": { + "type": "array", + "description": "List of supported adapters.", + "items": { + "type": "object", + "$ref": "#\/definitions\/frameworkAdapter" + }, + "x-example": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "required": [ + "key", + "name", + "buildRuntime", + "runtimes", + "adapters" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "frameworkAdapter": { + "description": "Framework Adapter", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Adapter key.", + "x-example": "static" + }, + "installCommand": { + "type": "string", + "description": "Default command to download dependencies.", + "x-example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Default command to build site into output directory.", + "x-example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Default output directory of build.", + "x-example": ".\/dist" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" + } + }, + "required": [ + "key", + "installCommand", + "buildCommand", + "outputDirectory", + "fallbackFile" + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "x-example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" + }, + "sourceSize": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output size in bytes.", + "x-example": 128, + "format": "int32" + }, + "totalSize": { + "type": "integer", + "description": "The total size in bytes (source and build output).", + "x-example": 128, + "format": "int32" + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "screenshotLight": { + "type": "string", + "description": "Screenshot with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "screenshotDark": { + "type": "string", + "description": "Screenshot with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "canceled", + "failed" + ] + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "x-example": "Compiling source files..." + }, + "buildDuration": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "x-example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "sourceSize", + "buildSize", + "totalSize", + "buildId", + "activate", + "screenshotLight", + "screenshotDark", + "status", + "buildLogs", + "buildDuration", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranch", + "providerBranchUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "x-example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "type": "object", + "$ref": "#\/definitions\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "errors": { + "type": "string", + "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Project creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Project update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Project name.", + "x-example": "New Project" + }, + "description": { + "type": "string", + "description": "Project description.", + "x-example": "This is a new project." + }, + "teamId": { + "type": "string", + "description": "Project team ID.", + "x-example": "1592981250" + }, + "logo": { + "type": "string", + "description": "Project logo file ID.", + "x-example": "5f5c451b403cb" + }, + "url": { + "type": "string", + "description": "Project website URL.", + "x-example": "5f5c451b403cb" + }, + "legalName": { + "type": "string", + "description": "Company legal name.", + "x-example": "Company LTD." + }, + "legalCountry": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", + "x-example": "US" + }, + "legalState": { + "type": "string", + "description": "State name.", + "x-example": "New York" + }, + "legalCity": { + "type": "string", + "description": "City name.", + "x-example": "New York City." + }, + "legalAddress": { + "type": "string", + "description": "Company Address.", + "x-example": "620 Eighth Avenue, New York, NY 10018" + }, + "legalTaxId": { + "type": "string", + "description": "Company Tax ID.", + "x-example": "131102020" + }, + "authDuration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 60, + "format": "int32" + }, + "authLimit": { + "type": "integer", + "description": "Max users allowed. 0 is unlimited.", + "x-example": 100, + "format": "int32" + }, + "authSessionsLimit": { + "type": "integer", + "description": "Max sessions allowed per user. 100 maximum.", + "x-example": 10, + "format": "int32" + }, + "authPasswordHistory": { + "type": "integer", + "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", + "x-example": 5, + "format": "int32" + }, + "authPasswordDictionary": { + "type": "boolean", + "description": "Whether or not to check user's password against most commonly used passwords.", + "x-example": true + }, + "authPersonalDataCheck": { + "type": "boolean", + "description": "Whether or not to check the user password for similarity with their personal data.", + "x-example": true + }, + "authDisposableEmails": { + "type": "boolean", + "description": "Whether or not to disallow disposable email addresses during signup and email updates.", + "x-example": true + }, + "authCanonicalEmails": { + "type": "boolean", + "description": "Whether or not to require canonical email addresses during signup and email updates.", + "x-example": true + }, + "authFreeEmails": { + "type": "boolean", + "description": "Whether or not to disallow free email addresses during signup and email updates.", + "x-example": true + }, + "authMockNumbers": { + "type": "array", + "description": "An array of mock numbers and their corresponding verification codes (OTPs).", + "items": { + "type": "object", + "$ref": "#\/definitions\/mockNumber" + }, + "x-example": [ + {} + ] + }, + "authSessionAlerts": { + "type": "boolean", + "description": "Whether or not to send session alert emails to users.", + "x-example": true + }, + "authMembershipsUserName": { + "type": "boolean", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "authMembershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "authMembershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", + "x-example": true + }, + "authMembershipsUserId": { + "type": "boolean", + "description": "Whether or not to show user IDs in the teams membership response.", + "x-example": true + }, + "authMembershipsUserPhone": { + "type": "boolean", + "description": "Whether or not to show user phone numbers in the teams membership response.", + "x-example": true + }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, + "oAuthProviders": { + "type": "array", + "description": "List of Auth Providers.", + "items": { + "type": "object", + "$ref": "#\/definitions\/authProvider" + }, + "x-example": [ + {} + ] + }, + "platforms": { + "type": "array", + "description": "List of Platforms.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/platformWeb" + }, + { + "$ref": "#\/definitions\/platformApple" + }, + { + "$ref": "#\/definitions\/platformAndroid" + }, + { + "$ref": "#\/definitions\/platformWindows" + }, + { + "$ref": "#\/definitions\/platformLinux" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/definitions\/platformWeb", + "apple": "#\/definitions\/platformApple", + "android": "#\/definitions\/platformAndroid", + "windows": "#\/definitions\/platformWindows", + "linux": "#\/definitions\/platformLinux" + } + } + }, + "x-example": {} + }, + "webhooks": { + "type": "array", + "description": "List of Webhooks.", + "items": { + "type": "object", + "$ref": "#\/definitions\/webhook" + }, + "x-example": {} + }, + "keys": { + "type": "array", + "description": "List of API Keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/key" + }, + "x-example": {} + }, + "devKeys": { + "type": "array", + "description": "List of dev keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/devKey" + }, + "x-example": {} + }, + "smtpEnabled": { + "type": "boolean", + "description": "Status for custom SMTP", + "x-example": false + }, + "smtpSenderName": { + "type": "string", + "description": "SMTP sender name", + "x-example": "John Appwrite" + }, + "smtpSenderEmail": { + "type": "string", + "description": "SMTP sender email", + "x-example": "john@appwrite.io" + }, + "smtpReplyToName": { + "type": "string", + "description": "SMTP reply to name", + "x-example": "Support Team" + }, + "smtpReplyToEmail": { + "type": "string", + "description": "SMTP reply to email", + "x-example": "support@appwrite.io" + }, + "smtpHost": { + "type": "string", + "description": "SMTP server host name", + "x-example": "mail.appwrite.io" + }, + "smtpPort": { + "type": "integer", + "description": "SMTP server port", + "x-example": 25, + "format": "int32" + }, + "smtpUsername": { + "type": "string", + "description": "SMTP server username", + "x-example": "emailuser" + }, + "smtpPassword": { + "type": "string", + "description": "SMTP server password. This property is write-only and always returned empty.", + "x-example": "" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "x-example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "labels": { + "type": "array", + "description": "Labels for the project.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] + }, + "status": { + "type": "string", + "description": "Project status.", + "x-example": "active" + }, + "authEmailPassword": { + "type": "boolean", + "description": "Email\/Password auth method status", + "x-example": true + }, + "authUsersAuthMagicURL": { + "type": "boolean", + "description": "Magic URL auth method status", + "x-example": true + }, + "authEmailOtp": { + "type": "boolean", + "description": "Email (OTP) auth method status", + "x-example": true + }, + "authAnonymous": { + "type": "boolean", + "description": "Anonymous auth method status", + "x-example": true + }, + "authInvites": { + "type": "boolean", + "description": "Invites auth method status", + "x-example": true + }, + "authJWT": { + "type": "boolean", + "description": "JWT auth method status", + "x-example": true + }, + "authPhone": { + "type": "boolean", + "description": "Phone auth method status", + "x-example": true + }, + "serviceStatusForAccount": { + "type": "boolean", + "description": "Account service status", + "x-example": true + }, + "serviceStatusForAvatars": { + "type": "boolean", + "description": "Avatars service status", + "x-example": true + }, + "serviceStatusForDatabases": { + "type": "boolean", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTablesdb": { + "type": "boolean", + "description": "TablesDB service status", + "x-example": true + }, + "serviceStatusForLocale": { + "type": "boolean", + "description": "Locale service status", + "x-example": true + }, + "serviceStatusForHealth": { + "type": "boolean", + "description": "Health service status", + "x-example": true + }, + "serviceStatusForProject": { + "type": "boolean", + "description": "Project service status", + "x-example": true + }, + "serviceStatusForStorage": { + "type": "boolean", + "description": "Storage service status", + "x-example": true + }, + "serviceStatusForTeams": { + "type": "boolean", + "description": "Teams service status", + "x-example": true + }, + "serviceStatusForUsers": { + "type": "boolean", + "description": "Users service status", + "x-example": true + }, + "serviceStatusForVcs": { + "type": "boolean", + "description": "VCS service status", + "x-example": true + }, + "serviceStatusForSites": { + "type": "boolean", + "description": "Sites service status", + "x-example": true + }, + "serviceStatusForFunctions": { + "type": "boolean", + "description": "Functions service status", + "x-example": true + }, + "serviceStatusForProxy": { + "type": "boolean", + "description": "Proxy service status", + "x-example": true + }, + "serviceStatusForGraphql": { + "type": "boolean", + "description": "GraphQL service status", + "x-example": true + }, + "serviceStatusForMigrations": { + "type": "boolean", + "description": "Migrations service status", + "x-example": true + }, + "serviceStatusForMessaging": { + "type": "boolean", + "description": "Messaging service status", + "x-example": true + }, + "protocolStatusForRest": { + "type": "boolean", + "description": "REST protocol status", + "x-example": true + }, + "protocolStatusForGraphql": { + "type": "boolean", + "description": "GraphQL protocol status", + "x-example": true + }, + "protocolStatusForWebsocket": { + "type": "boolean", + "description": "Websocket protocol status", + "x-example": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "logo", + "url", + "legalName", + "legalCountry", + "legalState", + "legalCity", + "legalAddress", + "legalTaxId", + "authDuration", + "authLimit", + "authSessionsLimit", + "authPasswordHistory", + "authPasswordDictionary", + "authPersonalDataCheck", + "authDisposableEmails", + "authCanonicalEmails", + "authFreeEmails", + "authMockNumbers", + "authSessionAlerts", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", + "authMembershipsUserId", + "authMembershipsUserPhone", + "authInvalidateSessions", + "oAuthProviders", + "platforms", + "webhooks", + "keys", + "devKeys", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyToName", + "smtpReplyToEmail", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "labels", + "status", + "authEmailPassword", + "authUsersAuthMagicURL", + "authEmailOtp", + "authAnonymous", + "authInvites", + "authJWT", + "authPhone", + "serviceStatusForAccount", + "serviceStatusForAvatars", + "serviceStatusForDatabases", + "serviceStatusForTablesdb", + "serviceStatusForLocale", + "serviceStatusForHealth", + "serviceStatusForProject", + "serviceStatusForStorage", + "serviceStatusForTeams", + "serviceStatusForUsers", + "serviceStatusForVcs", + "serviceStatusForSites", + "serviceStatusForFunctions", + "serviceStatusForProxy", + "serviceStatusForGraphql", + "serviceStatusForMigrations", + "serviceStatusForMessaging", + "protocolStatusForRest", + "protocolStatusForGraphql", + "protocolStatusForWebsocket" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authMembershipsUserId": true, + "authMembershipsUserPhone": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyToName": "Support Team", + "smtpReplyToEmail": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [ + "vip" + ], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true + } + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Webhook creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Webhook update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "x-example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "x-example": "https:\/\/example.com\/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { + "type": "string" + }, + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] + }, + "tls": { + "type": "boolean", + "description": "Indicates if SSL \/ TLS certificate verification is enabled.", + "x-example": true + }, + "authUsername": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "authPassword": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + }, + "secret": { + "type": "string", + "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", + "x-example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "x-example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "x-example": "Failed to connect to remote server." + }, + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "url", + "events", + "tls", + "authUsername", + "authPassword", + "secret", + "enabled", + "logs", + "attempts" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "ephemeralKey": { + "description": "Ephemeral Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "devKey": { + "description": "DevKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "Dev API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "mockNumber": { + "description": "Mock Number", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "x-example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "x-example": "123456" + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "number", + "otp", + "$createdAt", + "$updatedAt" + ], + "example": { + "number": "+1612842323", + "otp": "123456", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oAuth2Github": { + "description": "OAuth2GitHub", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", + "x-example": "e4d87900000000540733" + }, + "clientSecret": { + "type": "string", + "description": "GitHub OAuth2 client secret.", + "x-example": "5e07c00000000000000000000000000000198bcc" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "e4d87900000000540733", + "clientSecret": "5e07c00000000000000000000000000000198bcc" + } + }, + "oAuth2Discord": { + "description": "OAuth2Discord", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Discord OAuth2 client ID.", + "x-example": "950722000000343754" + }, + "clientSecret": { + "type": "string", + "description": "Discord OAuth2 client secret.", + "x-example": "YmPXnM000000000000000000002zFg5D" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "950722000000343754", + "clientSecret": "YmPXnM000000000000000000002zFg5D" + } + }, + "oAuth2Figma": { + "description": "OAuth2Figma", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Figma OAuth2 client ID.", + "x-example": "byay5H0000000000VtiI40" + }, + "clientSecret": { + "type": "string", + "description": "Figma OAuth2 client secret.", + "x-example": "yEpOYn0000000000000000004iIsU5" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "byay5H0000000000VtiI40", + "clientSecret": "yEpOYn0000000000000000004iIsU5" + } + }, + "oAuth2Dropbox": { + "description": "OAuth2Dropbox", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appKey": { + "type": "string", + "description": "Dropbox OAuth2 app key.", + "x-example": "jl000000000009t" + }, + "appSecret": { + "type": "string", + "description": "Dropbox OAuth2 app secret.", + "x-example": "g200000000000vw" + } + }, + "required": [ + "$id", + "enabled", + "appKey", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appKey": "jl000000000009t", + "appSecret": "g200000000000vw" + } + }, + "oAuth2Dailymotion": { + "description": "OAuth2Dailymotion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "apiKey": { + "type": "string", + "description": "Dailymotion OAuth2 API key.", + "x-example": "07a9000000000000067f" + }, + "apiSecret": { + "type": "string", + "description": "Dailymotion OAuth2 API secret.", + "x-example": "a399a90000000000000000000000000000d90639" + } + }, + "required": [ + "$id", + "enabled", + "apiKey", + "apiSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "apiKey": "07a9000000000000067f", + "apiSecret": "a399a90000000000000000000000000000d90639" + } + }, + "oAuth2Bitbucket": { + "description": "OAuth2Bitbucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "key": { + "type": "string", + "description": "Bitbucket OAuth2 key.", + "x-example": "Knt70000000000ByRc" + }, + "secret": { + "type": "string", + "description": "Bitbucket OAuth2 secret.", + "x-example": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "required": [ + "$id", + "enabled", + "key", + "secret" + ], + "example": { + "$id": "github", + "enabled": false, + "key": "Knt70000000000ByRc", + "secret": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "oAuth2Bitly": { + "description": "OAuth2Bitly", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Bitly OAuth2 client ID.", + "x-example": "d95151000000000000000000000000000067af9b" + }, + "clientSecret": { + "type": "string", + "description": "Bitly OAuth2 client secret.", + "x-example": "a13e250000000000000000000000000000d73095" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "d95151000000000000000000000000000067af9b", + "clientSecret": "a13e250000000000000000000000000000d73095" + } + }, + "oAuth2Box": { + "description": "OAuth2Box", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Box OAuth2 client ID.", + "x-example": "deglcs00000000000000000000x2og6y" + }, + "clientSecret": { + "type": "string", + "description": "Box OAuth2 client secret.", + "x-example": "OKM1f100000000000000000000eshEif" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "deglcs00000000000000000000x2og6y", + "clientSecret": "OKM1f100000000000000000000eshEif" + } + }, + "oAuth2Autodesk": { + "description": "OAuth2Autodesk", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Autodesk OAuth2 client ID.", + "x-example": "5zw90v00000000000000000000kVYXN7" + }, + "clientSecret": { + "type": "string", + "description": "Autodesk OAuth2 client secret.", + "x-example": "7I000000000000MW" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "5zw90v00000000000000000000kVYXN7", + "clientSecret": "7I000000000000MW" + } + }, + "oAuth2Google": { + "description": "OAuth2Google", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Google OAuth2 client ID.", + "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + }, + "clientSecret": { + "type": "string", + "description": "Google OAuth2 client secret.", + "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" + } + }, + "oAuth2Zoom": { + "description": "OAuth2Zoom", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoom OAuth2 client ID.", + "x-example": "QMAC00000000000000w0AQ" + }, + "clientSecret": { + "type": "string", + "description": "Zoom OAuth2 client secret.", + "x-example": "GAWsG4000000000000000000007U01ON" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "QMAC00000000000000w0AQ", + "clientSecret": "GAWsG4000000000000000000007U01ON" + } + }, + "oAuth2Zoho": { + "description": "OAuth2Zoho", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoho OAuth2 client ID.", + "x-example": "1000.83C178000000000000000000RPNX0B" + }, + "clientSecret": { + "type": "string", + "description": "Zoho OAuth2 client secret.", + "x-example": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "1000.83C178000000000000000000RPNX0B", + "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "oAuth2Yandex": { + "description": "OAuth2Yandex", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yandex OAuth2 client ID.", + "x-example": "6a8a6a0000000000000000000091483c" + }, + "clientSecret": { + "type": "string", + "description": "Yandex OAuth2 client secret.", + "x-example": "bbf98500000000000000000000c75a63" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a8a6a0000000000000000000091483c", + "clientSecret": "bbf98500000000000000000000c75a63" + } + }, + "oAuth2X": { + "description": "OAuth2X", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "X OAuth2 customer key.", + "x-example": "slzZV0000000000000NFLaWT" + }, + "secretKey": { + "type": "string", + "description": "X OAuth2 secret key.", + "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "slzZV0000000000000NFLaWT", + "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "oAuth2WordPress": { + "description": "OAuth2WordPress", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "WordPress OAuth2 client ID.", + "x-example": "130005" + }, + "clientSecret": { + "type": "string", + "description": "WordPress OAuth2 client secret.", + "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "130005", + "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "oAuth2Twitch": { + "description": "OAuth2Twitch", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Twitch OAuth2 client ID.", + "x-example": "vvi0in000000000000000000ikmt9p" + }, + "clientSecret": { + "type": "string", + "description": "Twitch OAuth2 client secret.", + "x-example": "pmapue000000000000000000zylw3v" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "vvi0in000000000000000000ikmt9p", + "clientSecret": "pmapue000000000000000000zylw3v" + } + }, + "oAuth2Stripe": { + "description": "OAuth2Stripe", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Stripe OAuth2 client ID.", + "x-example": "ca_UKibXX0000000000000000000006byvR" + }, + "apiSecretKey": { + "type": "string", + "description": "Stripe OAuth2 API secret key.", + "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "apiSecretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "ca_UKibXX0000000000000000000006byvR", + "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "oAuth2Spotify": { + "description": "OAuth2Spotify", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Spotify OAuth2 client ID.", + "x-example": "6ec271000000000000000000009beace" + }, + "clientSecret": { + "type": "string", + "description": "Spotify OAuth2 client secret.", + "x-example": "db068a000000000000000000008b5b9f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6ec271000000000000000000009beace", + "clientSecret": "db068a000000000000000000008b5b9f" + } + }, + "oAuth2Slack": { + "description": "OAuth2Slack", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Slack OAuth2 client ID.", + "x-example": "23000000089.15000000000023" + }, + "clientSecret": { + "type": "string", + "description": "Slack OAuth2 client secret.", + "x-example": "81656000000000000000000000f3d2fd" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "23000000089.15000000000023", + "clientSecret": "81656000000000000000000000f3d2fd" + } + }, + "oAuth2Podio": { + "description": "OAuth2Podio", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Podio OAuth2 client ID.", + "x-example": "appwrite-oauth-test-app" + }, + "clientSecret": { + "type": "string", + "description": "Podio OAuth2 client secret.", + "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-oauth-test-app", + "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "oAuth2Notion": { + "description": "OAuth2Notion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauthClientId": { + "type": "string", + "description": "Notion OAuth2 client ID.", + "x-example": "341d8700-0000-0000-0000-000000446ee3" + }, + "oauthClientSecret": { + "type": "string", + "description": "Notion OAuth2 client secret.", + "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "required": [ + "$id", + "enabled", + "oauthClientId", + "oauthClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", + "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "oAuth2Salesforce": { + "description": "OAuth2Salesforce", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "Salesforce OAuth2 consumer key.", + "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + }, + "customerSecret": { + "type": "string", + "description": "Salesforce OAuth2 consumer secret.", + "x-example": "3w000000000000e2" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "customerSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "customerSecret": "3w000000000000e2" + } + }, + "oAuth2Yahoo": { + "description": "OAuth2Yahoo", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yahoo OAuth2 client ID.", + "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" + }, + "clientSecret": { + "type": "string", + "description": "Yahoo OAuth2 client secret.", + "x-example": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "clientSecret": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "oAuth2Linkedin": { + "description": "OAuth2Linkedin", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "LinkedIn OAuth2 client ID.", + "x-example": "770000000000dv" + }, + "primaryClientSecret": { + "type": "string", + "description": "LinkedIn OAuth2 primary client secret.", + "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "primaryClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "770000000000dv", + "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "oAuth2Disqus": { + "description": "OAuth2Disqus", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "publicKey": { + "type": "string", + "description": "Disqus OAuth2 public key.", + "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + }, + "secretKey": { + "type": "string", + "description": "Disqus OAuth2 secret key.", + "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "required": [ + "$id", + "enabled", + "publicKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "oAuth2Amazon": { + "description": "OAuth2Amazon", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Amazon OAuth2 client ID.", + "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" + }, + "clientSecret": { + "type": "string", + "description": "Amazon OAuth2 client secret.", + "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "oAuth2Etsy": { + "description": "OAuth2Etsy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "keyString": { + "type": "string", + "description": "Etsy OAuth2 keystring.", + "x-example": "nsgzxh0000000000008j85a2" + }, + "sharedSecret": { + "type": "string", + "description": "Etsy OAuth2 shared secret.", + "x-example": "tp000000ru" + } + }, + "required": [ + "$id", + "enabled", + "keyString", + "sharedSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "keyString": "nsgzxh0000000000008j85a2", + "sharedSecret": "tp000000ru" + } + }, + "oAuth2Facebook": { + "description": "OAuth2Facebook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "appId": { + "type": "string", + "description": "Facebook OAuth2 app ID.", + "x-example": "260600000007694" + }, + "appSecret": { + "type": "string", + "description": "Facebook OAuth2 app secret.", + "x-example": "2d0b2800000000000000000000d38af4" + } + }, + "required": [ + "$id", + "enabled", + "appId", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appId": "260600000007694", + "appSecret": "2d0b2800000000000000000000d38af4" + } + }, + "oAuth2Tradeshift": { + "description": "OAuth2Tradeshift", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauth2ClientId": { + "type": "string", + "description": "Tradeshift OAuth2 client ID.", + "x-example": "appwrite-test-org.appwrite-test-app" + }, + "oauth2ClientSecret": { + "type": "string", + "description": "Tradeshift OAuth2 client secret.", + "x-example": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "required": [ + "$id", + "enabled", + "oauth2ClientId", + "oauth2ClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauth2ClientId": "appwrite-test-org.appwrite-test-app", + "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "oAuth2Paypal": { + "description": "OAuth2Paypal", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "PayPal OAuth2 client ID.", + "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" + }, + "secretKey": { + "type": "string", + "description": "PayPal OAuth2 secret key.", + "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "oAuth2Gitlab": { + "description": "OAuth2Gitlab", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "GitLab OAuth2 application ID.", + "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" + }, + "secret": { + "type": "string", + "description": "GitLab OAuth2 secret.", + "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" + }, + "endpoint": { + "type": "string", + "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", + "x-example": "https:\/\/gitlab.com" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "secret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "endpoint": "https:\/\/gitlab.com" + } + }, + "oAuth2Authentik": { + "description": "OAuth2Authentik", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Authentik OAuth2 client ID.", + "x-example": "dTKOPa0000000000000000000000000000e7G8hv" + }, + "clientSecret": { + "type": "string", + "description": "Authentik OAuth2 client secret.", + "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" + }, + "endpoint": { + "type": "string", + "description": "Authentik OAuth2 endpoint domain.", + "x-example": "example.authentik.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dTKOPa0000000000000000000000000000e7G8hv", + "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "endpoint": "example.authentik.com" + } + }, + "oAuth2Auth0": { + "description": "OAuth2Auth0", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Auth0 OAuth2 client ID.", + "x-example": "OaOkIA000000000000000000005KLSYq" + }, + "clientSecret": { + "type": "string", + "description": "Auth0 OAuth2 client secret.", + "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" + }, + "endpoint": { + "type": "string", + "description": "Auth0 OAuth2 endpoint domain.", + "x-example": "example.us.auth0.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "OaOkIA000000000000000000005KLSYq", + "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "endpoint": "example.us.auth0.com" + } + }, + "oAuth2FusionAuth": { + "description": "OAuth2FusionAuth", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "FusionAuth OAuth2 client ID.", + "x-example": "b2222c00-0000-0000-0000-000000862097" + }, + "clientSecret": { + "type": "string", + "description": "FusionAuth OAuth2 client secret.", + "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" + }, + "endpoint": { + "type": "string", + "description": "FusionAuth OAuth2 endpoint domain.", + "x-example": "example.fusionauth.io" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "b2222c00-0000-0000-0000-000000862097", + "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", + "endpoint": "example.fusionauth.io" + } + }, + "oAuth2Keycloak": { + "description": "OAuth2Keycloak", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Keycloak OAuth2 client ID.", + "x-example": "appwrite-o0000000st-app" + }, + "clientSecret": { + "type": "string", + "description": "Keycloak OAuth2 client secret.", + "x-example": "jdjrJd00000000000000000000HUsaZO" + }, + "endpoint": { + "type": "string", + "description": "Keycloak OAuth2 endpoint domain.", + "x-example": "keycloak.example.com" + }, + "realmName": { + "type": "string", + "description": "Keycloak OAuth2 realm name.", + "x-example": "appwrite-realm" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint", + "realmName" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-o0000000st-app", + "clientSecret": "jdjrJd00000000000000000000HUsaZO", + "endpoint": "keycloak.example.com", + "realmName": "appwrite-realm" + } + }, + "oAuth2Oidc": { + "description": "OAuth2Oidc", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "OpenID Connect OAuth2 client ID.", + "x-example": "qibI2x0000000000000000000000000006L2YFoG" + }, + "clientSecret": { + "type": "string", + "description": "OpenID Connect OAuth2 client secret.", + "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", + "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" + }, + "tokenUrl": { + "type": "string", + "description": "OpenID Connect token endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/token" + }, + "userInfoUrl": { + "type": "string", + "description": "OpenID Connect user info endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "wellKnownURL", + "authorizationURL", + "tokenUrl", + "userInfoUrl" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "qibI2x0000000000000000000000000006L2YFoG", + "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", + "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", + "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", + "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" + } + }, + "oAuth2Okta": { + "description": "OAuth2Okta", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Okta OAuth2 client ID.", + "x-example": "0oa00000000000000698" + }, + "clientSecret": { + "type": "string", + "description": "Okta OAuth2 client secret.", + "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" + }, + "domain": { + "type": "string", + "description": "Okta OAuth2 domain.", + "x-example": "trial-6400025.okta.com" + }, + "authorizationServerId": { + "type": "string", + "description": "Okta OAuth2 authorization server ID.", + "x-example": "aus000000000000000h7z" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "domain", + "authorizationServerId" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "0oa00000000000000698", + "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "domain": "trial-6400025.okta.com", + "authorizationServerId": "aus000000000000000h7z" + } + }, + "oAuth2Kick": { + "description": "OAuth2Kick", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Kick OAuth2 client ID.", + "x-example": "01KQ7C00000000000001MFHS32" + }, + "clientSecret": { + "type": "string", + "description": "Kick OAuth2 client secret.", + "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "01KQ7C00000000000001MFHS32", + "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "oAuth2Apple": { + "description": "OAuth2Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "apple" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "serviceId": { + "type": "string", + "description": "Apple OAuth2 service ID.", + "x-example": "ip.appwrite.app.web" + }, + "keyId": { + "type": "string", + "description": "Apple OAuth2 key ID.", + "x-example": "P4000000N8" + }, + "teamId": { + "type": "string", + "description": "Apple OAuth2 team ID.", + "x-example": "D4000000R6" + }, + "p8File": { + "type": "string", + "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", + "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "required": [ + "$id", + "enabled", + "serviceId", + "keyId", + "teamId", + "p8File" + ], + "example": { + "$id": "apple", + "enabled": false, + "serviceId": "ip.appwrite.app.web", + "keyId": "P4000000N8", + "teamId": "D4000000R6", + "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "oAuth2Microsoft": { + "description": "OAuth2Microsoft", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "applicationId": { + "type": "string", + "description": "Microsoft OAuth2 application ID.", + "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" + }, + "applicationSecret": { + "type": "string", + "description": "Microsoft OAuth2 application secret.", + "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", + "x-example": "common" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "applicationSecret", + "tenant" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", + "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "tenant": "common" + } + }, + "oAuth2ProviderList": { + "description": "OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers in the given project.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of OAuth2 providers.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/oAuth2Github" + }, + { + "$ref": "#\/definitions\/oAuth2Discord" + }, + { + "$ref": "#\/definitions\/oAuth2Figma" + }, + { + "$ref": "#\/definitions\/oAuth2Dropbox" + }, + { + "$ref": "#\/definitions\/oAuth2Dailymotion" + }, + { + "$ref": "#\/definitions\/oAuth2Bitbucket" + }, + { + "$ref": "#\/definitions\/oAuth2Bitly" + }, + { + "$ref": "#\/definitions\/oAuth2Box" + }, + { + "$ref": "#\/definitions\/oAuth2Autodesk" + }, + { + "$ref": "#\/definitions\/oAuth2Google" + }, + { + "$ref": "#\/definitions\/oAuth2Zoom" + }, + { + "$ref": "#\/definitions\/oAuth2Zoho" + }, + { + "$ref": "#\/definitions\/oAuth2Yandex" + }, + { + "$ref": "#\/definitions\/oAuth2X" + }, + { + "$ref": "#\/definitions\/oAuth2WordPress" + }, + { + "$ref": "#\/definitions\/oAuth2Twitch" + }, + { + "$ref": "#\/definitions\/oAuth2Stripe" + }, + { + "$ref": "#\/definitions\/oAuth2Spotify" + }, + { + "$ref": "#\/definitions\/oAuth2Slack" + }, + { + "$ref": "#\/definitions\/oAuth2Podio" + }, + { + "$ref": "#\/definitions\/oAuth2Notion" + }, + { + "$ref": "#\/definitions\/oAuth2Salesforce" + }, + { + "$ref": "#\/definitions\/oAuth2Yahoo" + }, + { + "$ref": "#\/definitions\/oAuth2Linkedin" + }, + { + "$ref": "#\/definitions\/oAuth2Disqus" + }, + { + "$ref": "#\/definitions\/oAuth2Amazon" + }, + { + "$ref": "#\/definitions\/oAuth2Etsy" + }, + { + "$ref": "#\/definitions\/oAuth2Facebook" + }, + { + "$ref": "#\/definitions\/oAuth2Tradeshift" + }, + { + "$ref": "#\/definitions\/oAuth2Paypal" + }, + { + "$ref": "#\/definitions\/oAuth2Gitlab" + }, + { + "$ref": "#\/definitions\/oAuth2Authentik" + }, + { + "$ref": "#\/definitions\/oAuth2Auth0" + }, + { + "$ref": "#\/definitions\/oAuth2FusionAuth" + }, + { + "$ref": "#\/definitions\/oAuth2Keycloak" + }, + { + "$ref": "#\/definitions\/oAuth2Oidc" + }, + { + "$ref": "#\/definitions\/oAuth2Apple" + }, + { + "$ref": "#\/definitions\/oAuth2Okta" + }, + { + "$ref": "#\/definitions\/oAuth2Kick" + }, + { + "$ref": "#\/definitions\/oAuth2Microsoft" + } + ], + "x-discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/definitions\/oAuth2Github", + "discord": "#\/definitions\/oAuth2Discord", + "figma": "#\/definitions\/oAuth2Figma", + "dropbox": "#\/definitions\/oAuth2Dropbox", + "dailymotion": "#\/definitions\/oAuth2Dailymotion", + "bitbucket": "#\/definitions\/oAuth2Bitbucket", + "bitly": "#\/definitions\/oAuth2Bitly", + "box": "#\/definitions\/oAuth2Box", + "autodesk": "#\/definitions\/oAuth2Autodesk", + "google": "#\/definitions\/oAuth2Google", + "zoom": "#\/definitions\/oAuth2Zoom", + "zoho": "#\/definitions\/oAuth2Zoho", + "yandex": "#\/definitions\/oAuth2Yandex", + "x": "#\/definitions\/oAuth2X", + "wordpress": "#\/definitions\/oAuth2WordPress", + "twitch": "#\/definitions\/oAuth2Twitch", + "stripe": "#\/definitions\/oAuth2Stripe", + "spotify": "#\/definitions\/oAuth2Spotify", + "slack": "#\/definitions\/oAuth2Slack", + "podio": "#\/definitions\/oAuth2Podio", + "notion": "#\/definitions\/oAuth2Notion", + "salesforce": "#\/definitions\/oAuth2Salesforce", + "yahoo": "#\/definitions\/oAuth2Yahoo", + "linkedin": "#\/definitions\/oAuth2Linkedin", + "disqus": "#\/definitions\/oAuth2Disqus", + "amazon": "#\/definitions\/oAuth2Amazon", + "etsy": "#\/definitions\/oAuth2Etsy", + "facebook": "#\/definitions\/oAuth2Facebook", + "tradeshift": "#\/definitions\/oAuth2Tradeshift", + "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", + "paypal": "#\/definitions\/oAuth2Paypal", + "paypalSandbox": "#\/definitions\/oAuth2Paypal", + "gitlab": "#\/definitions\/oAuth2Gitlab", + "authentik": "#\/definitions\/oAuth2Authentik", + "auth0": "#\/definitions\/oAuth2Auth0", + "fusionauth": "#\/definitions\/oAuth2FusionAuth", + "keycloak": "#\/definitions\/oAuth2Keycloak", + "oidc": "#\/definitions\/oAuth2Oidc", + "apple": "#\/definitions\/oAuth2Apple", + "okta": "#\/definitions\/oAuth2Okta", + "kick": "#\/definitions\/oAuth2Kick", + "microsoft": "#\/definitions\/oAuth2Microsoft" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "policyPasswordDictionary": { + "description": "Policy Password Dictionary", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password dictionary policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordHistory": { + "description": "Policy Password History", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Password history length. A value of 0 means the policy is disabled.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 5 + } + }, + "policyPasswordPersonalData": { + "description": "Policy Password Personal Data", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password personal data policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionAlert": { + "description": "Policy Session Alert", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session alert policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionDuration": { + "description": "Policy Session Duration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "duration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 3600, + "format": "int32" + } + }, + "required": [ + "$id", + "duration" + ], + "example": { + "$id": "password-dictionary", + "duration": 3600 + } + }, + "policySessionInvalidation": { + "description": "Policy Session Invalidation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session invalidation policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionLimit": { + "description": "Policy Session Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", + "x-example": 10, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 10 + } + }, + "policyUserLimit": { + "description": "Policy User Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "x-example": 100, + "format": "int32" + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 100 + } + }, + "policyMembershipPrivacy": { + "description": "Policy Membership Privacy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "userId": { + "type": "boolean", + "description": "Whether user ID is visible in memberships.", + "x-example": true + }, + "userEmail": { + "type": "boolean", + "description": "Whether user email is visible in memberships.", + "x-example": true + }, + "userPhone": { + "type": "boolean", + "description": "Whether user phone is visible in memberships.", + "x-example": true + }, + "userName": { + "type": "boolean", + "description": "Whether user name is visible in memberships.", + "x-example": true + }, + "userMFA": { + "type": "boolean", + "description": "Whether user MFA status is visible in memberships.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "userEmail", + "userPhone", + "userName", + "userMFA" + ], + "example": { + "$id": "password-dictionary", + "userId": true, + "userEmail": true, + "userPhone": true, + "userName": true, + "userMFA": true + } + }, + "authProvider": { + "description": "AuthProvider", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Auth Provider.", + "x-example": "github" + }, + "name": { + "type": "string", + "description": "Auth Provider name.", + "x-example": "GitHub" + }, + "appId": { + "type": "string", + "description": "OAuth 2.0 application ID.", + "x-example": "259125845563242502" + }, + "secret": { + "type": "string", + "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Auth Provider is active and can be used to create session.", + "x-example": "" + } + }, + "required": [ + "key", + "name", + "appId", + "secret", + "enabled" + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "", + "enabled": "" + } + }, + "platformWeb": { + "description": "Platform Web", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": "app.example.com" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "hostname", + "key" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" + } + }, + "platformApple": { + "description": "Platform Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "bundleIdentifier" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" + } + }, + "platformAndroid": { + "description": "Platform Android", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "applicationId": { + "type": "string", + "description": "Android application ID.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "applicationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" + } + }, + "platformWindows": { + "description": "Platform Windows", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageIdentifierName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" + } + }, + "platformLinux": { + "description": "Platform Linux", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "packageName": { + "type": "string", + "description": "Linux package name.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" + } + }, + "platformList": { + "description": "Platforms List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of platforms in the given project.", + "x-example": 5, + "format": "int32" + }, + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/platformWeb" + }, + { + "$ref": "#\/definitions\/platformApple" + }, + { + "$ref": "#\/definitions\/platformAndroid" + }, + { + "$ref": "#\/definitions\/platformWindows" + }, + { + "$ref": "#\/definitions\/platformLinux" + } + ], + "x-discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/definitions\/platformWeb", + "apple": "#\/definitions\/platformApple", + "android": "#\/definitions\/platformAndroid", + "windows": "#\/definitions\/platformWindows", + "linux": "#\/definitions\/platformLinux" + } + } + }, + "x-example": "" + } + }, + "required": [ + "total", + "platforms" + ], + "example": { + "total": 5, + "platforms": "" + } + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "x-example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "x-example": "myPa$$word1" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "x-example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "secret", + "resourceType", + "resourceId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "healthAntivirus": { + "description": "Health Antivirus", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Antivirus version.", + "x-example": "1.0.0" + }, + "status": { + "type": "string", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] + } + }, + "required": [ + "version", + "status" + ], + "example": { + "version": "1.0.0", + "status": "online" + } + }, + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": [ + "size" + ], + "example": { + "size": 8 + } + }, + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service.", + "x-example": "database" + }, + "ping": { + "type": "integer", + "description": "Duration in milliseconds how long the health check took.", + "x-example": 128, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" + } + }, + "required": [ + "name", + "ping", + "status" + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } + }, + "healthCertificate": { + "description": "Health Certificate", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Certificate name", + "x-example": "\/CN=www.google.com" + }, + "subjectSN": { + "type": "string", + "description": "Subject SN", + "x-example": "" + }, + "issuerOrganisation": { + "type": "string", + "description": "Issuer organisation", + "x-example": "" + }, + "validFrom": { + "type": "string", + "description": "Valid from", + "x-example": "1704200998" + }, + "validTo": { + "type": "string", + "description": "Valid to", + "x-example": "1711458597" + }, + "signatureTypeSN": { + "type": "string", + "description": "Signature type SN", + "x-example": "RSA-SHA256" + } + }, + "required": [ + "name", + "subjectSN", + "issuerOrganisation", + "validFrom", + "validTo", + "signatureTypeSN" + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } + }, + "healthTime": { + "description": "Health Time", + "type": "object", + "properties": { + "remoteTime": { + "type": "integer", + "description": "Current unix timestamp on trustful remote server.", + "x-example": 1639490751, + "format": "int32" + }, + "localTime": { + "type": "integer", + "description": "Current unix timestamp of local server where Appwrite runs.", + "x-example": 1639490844, + "format": "int32" + }, + "diff": { + "type": "integer", + "description": "Difference of unix remote and local timestamps in milliseconds.", + "x-example": 93, + "format": "int32" + } + }, + "required": [ + "remoteTime", + "localTime", + "diff" + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } + }, + "emailTemplate": { + "description": "EmailTemplate", + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Template type", + "x-example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." + }, + "senderName": { + "type": "string", + "description": "Name of the sender", + "x-example": "My User" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "x-example": "mail@appwrite.io" + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" + }, + "replyToName": { + "type": "string", + "description": "Reply to name", + "x-example": "Support Team" + }, + "subject": { + "type": "string", + "description": "Email subject", + "x-example": "Please verify your email address" + } + }, + "required": [ + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" + ], + "example": { + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" + }, + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "x-nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "processing", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "processing" + } + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + } + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "x-nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file From e03218d8fa6694e963201aa310be7b53ab9fb11b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 30 Apr 2026 18:24:38 +0530 Subject: [PATCH 072/192] reverted last change --- .gitignore | 2 +- app/config/specs/open-api3-latest-client.json | 17702 ---- .../specs/open-api3-latest-console.json | 80463 --------------- app/config/specs/open-api3-latest-server.json | 68884 ------------- app/config/specs/swagger2-latest-client.json | 17510 ---- app/config/specs/swagger2-latest-console.json | 80584 ---------------- app/config/specs/swagger2-latest-server.json | 68959 ------------- 7 files changed, 1 insertion(+), 334103 deletions(-) delete mode 100644 app/config/specs/open-api3-latest-client.json delete mode 100644 app/config/specs/open-api3-latest-console.json delete mode 100644 app/config/specs/open-api3-latest-server.json delete mode 100644 app/config/specs/swagger2-latest-client.json delete mode 100644 app/config/specs/swagger2-latest-console.json delete mode 100644 app/config/specs/swagger2-latest-server.json diff --git a/.gitignore b/.gitignore index c64732dc19..6846e19aa7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ dev/yasd_init.php Makefile appwrite.config.json /.zed/ -# /app/config/specs/ +/app/config/specs/ /docs/examples/ .phpunit.cache .phpstan-cache diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json deleted file mode 100644 index c3493cccd9..0000000000 --- a/app/config/specs/open-api3-latest-client.json +++ /dev/null @@ -1,17702 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "1.9.3", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", - "termsOfService": "https:\/\/appwrite.io\/policy\/terms", - "contact": { - "name": "Appwrite Team", - "url": "https:\/\/appwrite.io\/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" - } - }, - "servers": [ - { - "url": "https:\/\/cloud.appwrite.io\/v1" - }, - { - "url": "https:\/\/<REGION>.cloud.appwrite.io\/v1" - } - ], - "paths": { - "\/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "tags": [ - "account" - ], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "account", - "weight": 9, - "cookies": false, - "type": "", - "demo": "account\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create account", - "operationId": "accountCreate", - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "account", - "weight": 8, - "cookies": false, - "type": "", - "demo": "account\/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", - "tags": [ - "account" - ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "account", - "weight": 34, - "cookies": false, - "type": "", - "demo": "account\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "tags": [ - "account" - ], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/identityList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/account\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "tags": [ - "account" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<IDENTITY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/jwt" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "tokens", - "weight": 29, - "cookies": false, - "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "x-example": 0, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/account\/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "tags": [ - "account" - ], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 31, - "cookies": false, - "type": "", - "demo": "account\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "tags": [ - "account" - ], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMFA", - "group": "mfa", - "weight": 166, - "cookies": false, - "type": "", - "demo": "account\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - } - } - } - }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaType" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", - "weight": 168, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", - "weight": 169, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 170, - "cookies": false, - "type": "", - "demo": "account\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/account\/mfa\/challenges": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "tags": [ - "account" - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaChallenge" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", - "weight": 174, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": [ - "factor" - ] - } - } - } - } - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "tags": [ - "account" - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", - "weight": 175, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } - }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "x-example": "<CHALLENGE_ID>" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<OTP>" - } - }, - "required": [ - "challengeId", - "otp" - ] - } - } - } - } - } - }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "tags": [ - "account" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 167, - "cookies": false, - "type": "", - "demo": "account\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 173, - "cookies": false, - "type": "", - "demo": "account\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 171, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 172, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "weight": 32, - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", - "tags": [ - "account" - ], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "account", - "weight": 33, - "cookies": false, - "type": "", - "demo": "account\/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - } - } - } - }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "tags": [ - "account" - ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "account", - "weight": 35, - "cookies": false, - "type": "", - "demo": "account\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - } - } - } - }, - "\/account\/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "tags": [ - "account" - ], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "account", - "weight": 30, - "cookies": false, - "type": "", - "demo": "account\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", - "tags": [ - "account" - ], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "account", - "weight": 36, - "cookies": false, - "type": "", - "demo": "account\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", - "tags": [ - "account" - ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRecovery", - "group": "recovery", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", - "weight": 39, - "cookies": false, - "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "x-example": "<SECRET>" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - } - }, - "required": [ - "userId", - "secret", - "password" - ] - } - } - } - } - } - }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "tags": [ - "account" - ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/sessionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 11, - "cookies": false, - "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", - "tags": [ - "account" - ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 12, - "cookies": false, - "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", - "weight": 17, - "cookies": false, - "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "tags": [ - "account" - ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", - "weight": 16, - "cookies": false, - "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/sessions\/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", - "weight": 26, - "cookies": false, - "type": "", - "demo": "account\/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 session", - "operationId": "accountCreateOAuth2Session", - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "301": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Session", - "group": "sessions", - "weight": 19, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "weight": 27, - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 18, - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/{sessionId}": { - "get": { - "summary": "Get session", - "operationId": "accountGetSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSession", - "group": "sessions", - "weight": 13, - "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSession", - "group": "sessions", - "weight": 15, - "cookies": false, - "type": "", - "demo": "account\/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "tags": [ - "account" - ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 14, - "cookies": false, - "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", - "tags": [ - "account" - ], - "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "account", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/targets\/push": { - "post": { - "summary": "Create push target", - "operationId": "accountCreatePushTarget", - "tags": [ - "account" - ], - "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", - "responses": { - "201": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPushTarget", - "group": "pushTargets", - "weight": 44, - "cookies": false, - "type": "", - "demo": "account\/create-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TARGET_ID>" - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - } - }, - "required": [ - "targetId", - "identifier" - ] - } - } - } - } - } - }, - "\/account\/targets\/{targetId}\/push": { - "put": { - "summary": "Update push target", - "operationId": "accountUpdatePushTarget", - "tags": [ - "account" - ], - "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", - "responses": { - "200": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePushTarget", - "group": "pushTargets", - "weight": 45, - "cookies": false, - "type": "", - "demo": "account\/update-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - } - }, - "required": [ - "identifier" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete push target", - "operationId": "accountDeletePushTarget", - "tags": [ - "account" - ], - "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePushTarget", - "group": "pushTargets", - "weight": 46, - "cookies": false, - "type": "", - "demo": "account\/delete-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/tokens\/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailToken", - "group": "tokens", - "weight": 25, - "cookies": false, - "type": "", - "demo": "account\/create-email-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - } - } - } - }, - "\/account\/tokens\/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMagicURLToken", - "group": "tokens", - "weight": 24, - "cookies": false, - "type": "", - "demo": "account\/create-magic-url-token.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - } - } - } - }, - "\/account\/tokens\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "301": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Token", - "group": "tokens", - "weight": 23, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-token.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/account\/tokens\/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "tags": [ - "account" - ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneToken", - "group": "tokens", - "weight": 28, - "cookies": false, - "type": "", - "demo": "account\/create-phone-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},phone:{param-phone}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "userId", - "phone" - ] - } - } - } - } - } - }, - "\/account\/verifications\/email": { - "post": { - "summary": "Create email verification", - "operationId": "accountCreateEmailVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailVerification", - "group": "verification", - "weight": 40, - "cookies": false, - "type": "", - "demo": "account\/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", - "methods": [ - { - "name": "createEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-email-verification.md", - "public": true - }, - { - "name": "createVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update email verification (confirmation)", - "operationId": "accountUpdateEmailVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "verification", - "weight": 41, - "cookies": false, - "type": "", - "demo": "account\/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", - "methods": [ - { - "name": "updateEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-email-verification.md", - "public": true - }, - { - "name": "updateVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/verifications\/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneVerification", - "group": "verification", - "weight": 42, - "cookies": false, - "type": "", - "demo": "account\/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},userId:{userId}", - "url:{url},ip:{ip}" - ], - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "verification", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account\/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBrowser", - "group": null, - "weight": 177, - "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "schema": { - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", - "tags": [ - "avatars" - ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCreditCard", - "group": null, - "weight": 176, - "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", - "required": true, - "schema": { - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFavicon", - "group": null, - "weight": 180, - "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - } - ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFlag", - "group": null, - "weight": 178, - "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "schema": { - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getImage", - "group": null, - "weight": 179, - "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400 - }, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/initials": { - "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInitials", - "group": null, - "weight": 182, - "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<NAME>", - "default": "" - }, - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 - }, - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/avatars\/qr": { - "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", - "tags": [ - "avatars" - ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQR", - "group": null, - "weight": 181, - "cookies": false, - "type": "location", - "demo": "avatars\/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEXT>" - }, - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400 - }, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": false - }, - "in": "query" - } - ] - } - }, - "\/avatars\/screenshots": { - "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getScreenshot", - "group": null, - "weight": 183, - "cookies": false, - "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to capture.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "schema": { - "type": "object", - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", - "default": {} - }, - "in": "query" - }, - { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "1920", - "default": 1280 - }, - "in": "query" - }, - { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "1080", - "default": 720 - }, - "in": "query" - }, - { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "2", - "default": 1 - }, - "in": "query" - }, - { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "schema": { - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "light" - }, - "in": "query" - }, - { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "" - }, - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false - }, - "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "en-US", - "default": "" - }, - "in": "query" - }, - { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "america\/new_york", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "" - }, - "in": "query" - }, - { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0 - }, - "in": "query" - }, - { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0 - }, - "in": "query" - }, - { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "100", - "default": 0 - }, - "in": "query" - }, - { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false - }, - "in": "query" - }, - { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [] - }, - "in": "query" - }, - { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0 - }, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0 - }, - "in": "query" - }, - { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1 - }, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", - "tags": [ - "databases" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 259, - "cookies": false, - "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 255, - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", - "tags": [ - "databases" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 256, - "cookies": false, - "type": "", - "demo": "databases\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 257, - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "tags": [ - "databases" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 258, - "cookies": false, - "type": "", - "demo": "databases\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", - "tags": [ - "databases" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 260, - "cookies": false, - "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "tags": [ - "databases" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 210, - "cookies": false, - "type": "", - "demo": "databases\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "tags": [ - "databases" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 202, - "cookies": false, - "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "tags": [ - "databases" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 203, - "cookies": false, - "type": "", - "demo": "databases\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 206, - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "tags": [ - "databases" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 204, - "cookies": false, - "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 208, - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "tags": [ - "databases" - ], - "description": "Decrement a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 213, - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "tags": [ - "databases" - ], - "description": "Increment a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 212, - "cookies": false, - "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 366, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 362, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 363, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 364, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 365, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", - "tags": [ - "documentsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 367, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 359, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 351, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", - "tags": [ - "documentsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 352, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", - "tags": [ - "documentsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 355, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "tags": [ - "documentsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 353, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 357, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", - "tags": [ - "documentsDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 361, - "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "tags": [ - "documentsDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 360, - "cookies": false, - "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/functions\/{functionId}\/executions": { - "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", - "tags": [ - "functions" - ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/executionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listExecutions", - "group": "executions", - "weight": 438, - "cookies": false, - "type": "", - "demo": "functions\/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "tags": [ - "functions" - ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "content": { - "multipart\/form-data": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createExecution", - "group": "executions", - "weight": 436, - "cookies": false, - "type": "", - "demo": "functions\/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": "<SCHEDULED_AT>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", - "tags": [ - "functions" - ], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getExecution", - "group": "executions", - "weight": 437, - "cookies": false, - "type": "", - "demo": "functions\/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<EXECUTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "query", - "group": "graphql", - "weight": 117, - "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "mutation", - "group": "graphql", - "weight": 116, - "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", - "tags": [ - "locale" - ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/locale" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 49, - "cookies": false, - "type": "", - "demo": "locale\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "tags": [ - "locale" - ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCodes", - "group": null, - "weight": 50, - "cookies": false, - "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "tags": [ - "locale" - ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/continentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listContinents", - "group": null, - "weight": 54, - "cookies": false, - "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "tags": [ - "locale" - ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountries", - "group": null, - "weight": 51, - "cookies": false, - "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "tags": [ - "locale" - ], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesEU", - "group": null, - "weight": 52, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "tags": [ - "locale" - ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/phoneList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesPhones", - "group": null, - "weight": 53, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "tags": [ - "locale" - ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/currencyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCurrencies", - "group": null, - "weight": 55, - "cookies": false, - "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "tags": [ - "locale" - ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/languageList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, - "weight": 56, - "cookies": false, - "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "tags": [ - "messaging" - ], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", - "weight": 150, - "cookies": false, - "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "<TARGET_ID>" - } - }, - "required": [ - "subscriberId", - "targetId" - ] - } - } - } - } - } - }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "weight": 154, - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesListPresences", - "tags": [ - "presences" - ], - "description": "List presence logs.", - "responses": { - "200": { - "description": "Presences List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presenceList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPresences", - "group": "presences", - "weight": 416, - "cookies": false, - "type": "", - "demo": "presences\/list-presences.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGetPresence", - "tags": [ - "presences" - ], - "description": "Get a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPresence", - "group": "presences", - "weight": 415, - "cookies": false, - "type": "", - "demo": "presences\/get-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsertPresence", - "tags": [ - "presences" - ], - "description": "Create or update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertPresence", - "group": "presences", - "weight": 413, - "cookies": false, - "type": "", - "demo": "presences\/upsert-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "upsertPresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "", - "demo": "presences\/upsert-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "x-example": "{}" - } - }, - "required": [ - "status" - ] - } - } - } - } - }, - "patch": { - "summary": "Update presence", - "operationId": "presencesUpdatePresence", - "tags": [ - "presences" - ], - "description": "Update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePresence", - "group": "presences", - "weight": 417, - "cookies": false, - "type": "", - "demo": "presences\/update-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "updatePresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "status", - "expiresAt", - "metadata", - "permissions" - ], - "required": [ - "presenceId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "", - "demo": "presences\/update-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>", - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "x-example": "{}", - "x-nullable": true - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDeletePresence", - "tags": [ - "presences" - ], - "description": "Delete a presence log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePresence", - "group": "presences", - "weight": 418, - "cookies": false, - "type": "", - "demo": "presences\/delete-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", - "tags": [ - "storage" - ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Files List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/fileList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFiles", - "group": "files", - "weight": 550, - "cookies": false, - "type": "", - "demo": "storage\/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", - "tags": [ - "storage" - ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFile", - "group": "files", - "weight": 548, - "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "fileId": { - "type": "string", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<FILE_ID>", - "x-upload-id": true - }, - "file": { - "type": "string", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "x-example": null, - "format": "binary" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - }, - "required": [ - "fileId", - "file" - ] - } - } - } - } - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "Get file", - "operationId": "storageGetFile", - "tags": [ - "storage" - ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFile", - "group": "files", - "weight": 549, - "cookies": false, - "type": "", - "demo": "storage\/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", - "tags": [ - "storage" - ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFile", - "group": "files", - "weight": 551, - "cookies": false, - "type": "", - "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", - "tags": [ - "storage" - ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "weight": 552, - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { - "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileDownload", - "group": "files", - "weight": 554, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", - "tags": [ - "storage" - ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFilePreview", - "group": "files", - "weight": 553, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "schema": { - "type": "string", - "x-example": "center", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "default": "center" - }, - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0 - }, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileView", - "group": "files", - "weight": 555, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", - "tags": [ - "tablesDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 332, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", - "tags": [ - "tablesDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 328, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", - "tags": [ - "tablesDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 329, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", - "tags": [ - "tablesDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 330, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 331, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", - "tags": [ - "tablesDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 333, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 324, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", - "tags": [ - "tablesDB" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 316, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<ROW_ID>" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", - "tags": [ - "tablesDB" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 317, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", - "tags": [ - "tablesDB" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 320, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", - "tags": [ - "tablesDB" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 318, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", - "tags": [ - "tablesDB" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 322, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 327, - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 326, - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/teams": { - "get": { - "summary": "List teams", - "operationId": "teamsList", - "tags": [ - "teams" - ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", - "responses": { - "200": { - "description": "Teams List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/teamList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "teams", - "weight": 526, - "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", - "tags": [ - "teams" - ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "teams", - "weight": 524, - "cookies": false, - "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TEAM_ID>" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", - "tags": [ - "teams" - ], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "teams", - "weight": 525, - "cookies": false, - "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "tags": [ - "teams" - ], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "teams", - "weight": 528, - "cookies": false, - "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", - "tags": [ - "teams" - ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "teams", - "weight": 527, - "cookies": false, - "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "tags": [ - "teams" - ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membershipList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 533, - "cookies": false, - "type": "", - "demo": "teams\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "tags": [ - "teams" - ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMembership", - "group": "memberships", - "weight": 531, - "cookies": false, - "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "x-example": "email@example.com", - "format": "email" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "roles" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { - "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", - "tags": [ - "teams" - ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMembership", - "group": "memberships", - "weight": 532, - "cookies": false, - "type": "", - "demo": "teams\/get-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", - "tags": [ - "teams" - ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembership", - "group": "memberships", - "weight": 534, - "cookies": false, - "type": "", - "demo": "teams\/update-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", - "tags": [ - "teams" - ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", - "weight": 535, - "cookies": false, - "type": "", - "demo": "teams\/delete-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { - "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", - "tags": [ - "teams" - ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", - "weight": 536, - "cookies": false, - "type": "", - "demo": "teams\/update-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "tags": [ - "teams" - ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "teams", - "weight": 529, - "cookies": false, - "type": "", - "demo": "teams\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", - "tags": [ - "teams" - ], - "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "teams", - "weight": 530, - "cookies": false, - "type": "", - "demo": "teams\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", - "tags": [ - "vectorsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 399, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 395, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 396, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 397, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 398, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", - "tags": [ - "vectorsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 400, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 389, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 385, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", - "tags": [ - "vectorsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 388, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", - "tags": [ - "vectorsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 387, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", - "tags": [ - "vectorsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 386, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 390, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - } - ], - "components": { - "schemas": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] - }, - "error": { - "description": "Error", - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Error message.", - "x-example": "Not found" - }, - "code": { - "type": "string", - "description": "Error code.", - "x-example": "404" - }, - "type": { - "type": "string", - "description": "Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes", - "x-example": "not_found" - }, - "version": { - "type": "string", - "description": "Server version number.", - "x-example": "1.0" - } - }, - "required": [ - "message", - "code", - "type", - "version" - ], - "example": { - "message": "Not found", - "code": "404", - "type": "not_found", - "version": "1.0" - } - }, - "rowList": { - "description": "Rows List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rows that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "List of rows.", - "items": { - "$ref": "#\/components\/schemas\/row" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rows" - ], - "example": { - "total": 5, - "rows": "" - } - }, - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { - "$ref": "#\/components\/schemas\/document" - }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "$ref": "#\/components\/schemas\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "$ref": "#\/components\/schemas\/session" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sessions" - ], - "example": { - "total": 5, - "sessions": "" - } - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "$ref": "#\/components\/schemas\/identity" - }, - "x-example": "" - } - }, - "required": [ - "total", - "identities" - ], - "example": { - "total": 5, - "identities": "" - } - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { - "$ref": "#\/components\/schemas\/log" - }, - "x-example": "" - } - }, - "required": [ - "total", - "logs" - ], - "example": { - "total": 5, - "logs": "" - } - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "$ref": "#\/components\/schemas\/file" - }, - "x-example": "" - } - }, - "required": [ - "total", - "files" - ], - "example": { - "total": 5, - "files": "" - } - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "$ref": "#\/components\/schemas\/team" - }, - "x-example": "" - } - }, - "required": [ - "total", - "teams" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { - "$ref": "#\/components\/schemas\/membership" - }, - "x-example": "" - } - }, - "required": [ - "total", - "memberships" - ], - "example": { - "total": 5, - "memberships": "" - } - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "$ref": "#\/components\/schemas\/execution" - }, - "x-example": "" - } - }, - "required": [ - "total", - "executions" - ], - "example": { - "total": 5, - "executions": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "$ref": "#\/components\/schemas\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "$ref": "#\/components\/schemas\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "$ref": "#\/components\/schemas\/language" - }, - "x-example": "" - } - }, - "required": [ - "total", - "languages" - ], - "example": { - "total": 5, - "languages": "" - } - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "$ref": "#\/components\/schemas\/currency" - }, - "x-example": "" - } - }, - "required": [ - "total", - "currencies" - ], - "example": { - "total": 5, - "currencies": "" - } - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "$ref": "#\/components\/schemas\/phone" - }, - "x-example": "" - } - }, - "required": [ - "total", - "phones" - ], - "example": { - "total": 5, - "phones": "" - } - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "$ref": "#\/components\/schemas\/localeCode" - }, - "x-example": "" - } - }, - "required": [ - "total", - "localeCodes" - ], - "example": { - "total": 5, - "localeCodes": "" - } - }, - "transactionList": { - "description": "Transaction List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "$ref": "#\/components\/schemas\/transaction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "transactions" - ], - "example": { - "total": 5, - "transactions": "" - } - }, - "row": { - "description": "Row", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] - } - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false - } - }, - "presence": { - "description": "Presence", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Presence sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Presence creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Presence update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userInternalId": { - "type": "string", - "description": "User internal ID.", - "x-example": "1" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", - "required": [ - "$id", - "$sequence", - "$createdAt", - "$updatedAt", - "$permissions", - "userInternalId", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userInternalId": "1", - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ], - "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" - } - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/algoArgon2" - }, - { - "$ref": "#\/components\/schemas\/algoScrypt" - }, - { - "$ref": "#\/components\/schemas\/algoScryptModified" - }, - { - "$ref": "#\/components\/schemas\/algoBcrypt" - }, - { - "$ref": "#\/components\/schemas\/algoPhpass" - }, - { - "$ref": "#\/components\/schemas\/algoSha" - }, - { - "$ref": "#\/components\/schemas\/algoMd5" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/components\/schemas\/algoArgon2", - "scrypt": "#\/components\/schemas\/algoScrypt", - "scryptMod": "#\/components\/schemas\/algoScryptModified", - "bcrypt": "#\/components\/schemas\/algoBcrypt", - "phpass": "#\/components\/schemas\/algoPhpass", - "sha": "#\/components\/schemas\/algoSha", - "md5": "#\/components\/schemas\/algoMd5" - } - } - }, - "nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#\/components\/schemas\/preferences" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "nullable": true - }, - "impersonatorUserId": { - "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" - } - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" - } - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": [ - "jwt" - ], - "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the European Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ], - "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" - } - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": [ - "code", - "name" - ], - "example": { - "code": "en-us", - "name": "US" - } - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true - }, - "compression": { - "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" - ], - "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" - } - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#\/components\/schemas\/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } - } - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": [ - "owner" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "roles": [ - "owner" - ] - } - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": [ - "any" - ] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application\/json" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "Content-Type", - "value": "application\/json" - } - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": [ - "totp", - "phone", - "email", - "recoveryCode" - ], - "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" - }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "$ref": "#\/components\/schemas\/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" - } - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false - } - } - }, - "securitySchemes": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Session": { - "type": "apiKey", - "name": "X-Appwrite-Session", - "description": "The user session to authenticate with", - "in": "header" - }, - "DevKey": { - "type": "apiKey", - "name": "X-Appwrite-Dev-Key", - "description": "Your secret dev API key", - "in": "header" - }, - "ImpersonateUserId": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Id", - "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserEmail": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Email", - "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserPhone": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Phone", - "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - } - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https:\/\/appwrite.io\/docs" - } -} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json deleted file mode 100644 index 30f73a0f1e..0000000000 --- a/app/config/specs/open-api3-latest-console.json +++ /dev/null @@ -1,80463 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "1.9.3", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", - "termsOfService": "https:\/\/appwrite.io\/policy\/terms", - "contact": { - "name": "Appwrite Team", - "url": "https:\/\/appwrite.io\/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" - } - }, - "servers": [ - { - "url": "https:\/\/cloud.appwrite.io\/v1" - }, - { - "url": "https:\/\/<REGION>.cloud.appwrite.io\/v1" - } - ], - "paths": { - "\/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "tags": [ - "account" - ], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "account", - "weight": 9, - "cookies": false, - "type": "", - "demo": "account\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create account", - "operationId": "accountCreate", - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "account", - "weight": 8, - "cookies": false, - "type": "", - "demo": "account\/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete account", - "operationId": "accountDelete", - "tags": [ - "account" - ], - "description": "Delete the currently logged in user.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "account", - "weight": 10, - "cookies": false, - "type": "", - "demo": "account\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", - "tags": [ - "account" - ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "account", - "weight": 34, - "cookies": false, - "type": "", - "demo": "account\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "tags": [ - "account" - ], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/identityList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/account\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "tags": [ - "account" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<IDENTITY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/jwt" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "tokens", - "weight": 29, - "cookies": false, - "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "x-example": 0, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/account\/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "tags": [ - "account" - ], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 31, - "cookies": false, - "type": "", - "demo": "account\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "tags": [ - "account" - ], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMFA", - "group": "mfa", - "weight": 166, - "cookies": false, - "type": "", - "demo": "account\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - } - } - } - }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaType" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", - "weight": 168, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", - "weight": 169, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 170, - "cookies": false, - "type": "", - "demo": "account\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/account\/mfa\/challenges": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "tags": [ - "account" - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaChallenge" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", - "weight": 174, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": [ - "factor" - ] - } - } - } - } - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "tags": [ - "account" - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", - "weight": 175, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } - }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "x-example": "<CHALLENGE_ID>" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<OTP>" - } - }, - "required": [ - "challengeId", - "otp" - ] - } - } - } - } - } - }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "tags": [ - "account" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 167, - "cookies": false, - "type": "", - "demo": "account\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 173, - "cookies": false, - "type": "", - "demo": "account\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 171, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 172, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "weight": 32, - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", - "tags": [ - "account" - ], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "account", - "weight": 33, - "cookies": false, - "type": "", - "demo": "account\/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - } - } - } - }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "tags": [ - "account" - ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "account", - "weight": 35, - "cookies": false, - "type": "", - "demo": "account\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - } - } - } - }, - "\/account\/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "tags": [ - "account" - ], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "account", - "weight": 30, - "cookies": false, - "type": "", - "demo": "account\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", - "tags": [ - "account" - ], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "account", - "weight": 36, - "cookies": false, - "type": "", - "demo": "account\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", - "tags": [ - "account" - ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRecovery", - "group": "recovery", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", - "weight": 39, - "cookies": false, - "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "x-example": "<SECRET>" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - } - }, - "required": [ - "userId", - "secret", - "password" - ] - } - } - } - } - } - }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "tags": [ - "account" - ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/sessionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 11, - "cookies": false, - "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", - "tags": [ - "account" - ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 12, - "cookies": false, - "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", - "weight": 17, - "cookies": false, - "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "tags": [ - "account" - ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", - "weight": 16, - "cookies": false, - "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/sessions\/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", - "weight": 26, - "cookies": false, - "type": "", - "demo": "account\/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 session", - "operationId": "accountCreateOAuth2Session", - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "301": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Session", - "group": "sessions", - "weight": 19, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "weight": 27, - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 18, - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/{sessionId}": { - "get": { - "summary": "Get session", - "operationId": "accountGetSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSession", - "group": "sessions", - "weight": 13, - "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSession", - "group": "sessions", - "weight": 15, - "cookies": false, - "type": "", - "demo": "account\/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "tags": [ - "account" - ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 14, - "cookies": false, - "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", - "tags": [ - "account" - ], - "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "account", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/targets\/push": { - "post": { - "summary": "Create push target", - "operationId": "accountCreatePushTarget", - "tags": [ - "account" - ], - "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", - "responses": { - "201": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPushTarget", - "group": "pushTargets", - "weight": 44, - "cookies": false, - "type": "", - "demo": "account\/create-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TARGET_ID>" - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - } - }, - "required": [ - "targetId", - "identifier" - ] - } - } - } - } - } - }, - "\/account\/targets\/{targetId}\/push": { - "put": { - "summary": "Update push target", - "operationId": "accountUpdatePushTarget", - "tags": [ - "account" - ], - "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", - "responses": { - "200": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePushTarget", - "group": "pushTargets", - "weight": 45, - "cookies": false, - "type": "", - "demo": "account\/update-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - } - }, - "required": [ - "identifier" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete push target", - "operationId": "accountDeletePushTarget", - "tags": [ - "account" - ], - "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePushTarget", - "group": "pushTargets", - "weight": 46, - "cookies": false, - "type": "", - "demo": "account\/delete-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/tokens\/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailToken", - "group": "tokens", - "weight": 25, - "cookies": false, - "type": "", - "demo": "account\/create-email-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - } - } - } - }, - "\/account\/tokens\/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMagicURLToken", - "group": "tokens", - "weight": 24, - "cookies": false, - "type": "", - "demo": "account\/create-magic-url-token.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - } - } - } - }, - "\/account\/tokens\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "301": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Token", - "group": "tokens", - "weight": 23, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-token.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/account\/tokens\/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "tags": [ - "account" - ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneToken", - "group": "tokens", - "weight": 28, - "cookies": false, - "type": "", - "demo": "account\/create-phone-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},phone:{param-phone}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "userId", - "phone" - ] - } - } - } - } - } - }, - "\/account\/verifications\/email": { - "post": { - "summary": "Create email verification", - "operationId": "accountCreateEmailVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailVerification", - "group": "verification", - "weight": 40, - "cookies": false, - "type": "", - "demo": "account\/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", - "methods": [ - { - "name": "createEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-email-verification.md", - "public": true - }, - { - "name": "createVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update email verification (confirmation)", - "operationId": "accountUpdateEmailVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "verification", - "weight": 41, - "cookies": false, - "type": "", - "demo": "account\/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", - "methods": [ - { - "name": "updateEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-email-verification.md", - "public": true - }, - { - "name": "updateVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/verifications\/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneVerification", - "group": "verification", - "weight": 42, - "cookies": false, - "type": "", - "demo": "account\/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},userId:{userId}", - "url:{url},ip:{ip}" - ], - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "verification", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account\/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBrowser", - "group": null, - "weight": 177, - "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "schema": { - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", - "tags": [ - "avatars" - ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCreditCard", - "group": null, - "weight": 176, - "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", - "required": true, - "schema": { - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFavicon", - "group": null, - "weight": 180, - "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - } - ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFlag", - "group": null, - "weight": 178, - "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "schema": { - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getImage", - "group": null, - "weight": 179, - "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400 - }, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/initials": { - "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInitials", - "group": null, - "weight": 182, - "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<NAME>", - "default": "" - }, - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 - }, - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/avatars\/qr": { - "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", - "tags": [ - "avatars" - ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQR", - "group": null, - "weight": 181, - "cookies": false, - "type": "location", - "demo": "avatars\/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEXT>" - }, - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400 - }, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": false - }, - "in": "query" - } - ] - } - }, - "\/avatars\/screenshots": { - "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getScreenshot", - "group": null, - "weight": 183, - "cookies": false, - "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to capture.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "schema": { - "type": "object", - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", - "default": {} - }, - "in": "query" - }, - { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "1920", - "default": 1280 - }, - "in": "query" - }, - { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "1080", - "default": 720 - }, - "in": "query" - }, - { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "2", - "default": 1 - }, - "in": "query" - }, - { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "schema": { - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "light" - }, - "in": "query" - }, - { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "" - }, - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false - }, - "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "en-US", - "default": "" - }, - "in": "query" - }, - { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "america\/new_york", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "" - }, - "in": "query" - }, - { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0 - }, - "in": "query" - }, - { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0 - }, - "in": "query" - }, - { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "100", - "default": 0 - }, - "in": "query" - }, - { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false - }, - "in": "query" - }, - { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [] - }, - "in": "query" - }, - { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0 - }, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0 - }, - "in": "query" - }, - { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1 - }, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/console\/assistant": { - "post": { - "summary": "Create assistant query", - "operationId": "assistantChat", - "tags": [ - "assistant" - ], - "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "chat", - "group": "console", - "weight": 506, - "cookies": false, - "type": "", - "demo": "assistant\/chat.md", - "rate-limit": 15, - "rate-time": 3600, - "rate-key": "userId:{userId}", - "scope": "assistant.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prompt": { - "type": "string", - "description": "Prompt. A string containing questions asked to the AI assistant.", - "x-example": "<PROMPT>" - } - }, - "required": [ - "prompt" - ] - } - } - } - } - } - }, - "\/console\/oauth2-providers": { - "get": { - "summary": "List OAuth2 providers", - "operationId": "consoleListOAuth2Providers", - "tags": [ - "console" - ], - "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", - "responses": { - "200": { - "description": "Console OAuth2 Providers List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/consoleOAuth2ProviderList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listOAuth2Providers", - "group": "console", - "weight": 504, - "cookies": false, - "type": "", - "demo": "console\/list-o-auth-2-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/console\/resources": { - "get": { - "summary": "Check resource ID availability", - "operationId": "consoleGetResource", - "tags": [ - "console" - ], - "description": "Check if a resource ID is available.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getResource", - "group": null, - "weight": 507, - "cookies": false, - "type": "", - "demo": "console\/get-resource.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "value", - "description": "Resource value.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VALUE>" - }, - "in": "query" - }, - { - "name": "type", - "description": "Resource type.", - "required": true, - "schema": { - "type": "string", - "x-example": "rules", - "enum": [ - "rules" - ], - "x-enum-name": "ConsoleResourceType", - "x-enum-keys": [] - }, - "in": "query" - } - ] - } - }, - "\/console\/scopes\/project": { - "get": { - "summary": "List project scopes", - "operationId": "consoleListProjectScopes", - "tags": [ - "console" - ], - "description": "List all scopes available for project API keys, along with a description for each scope.", - "responses": { - "200": { - "description": "Console Key Scopes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/consoleKeyScopeList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProjectScopes", - "group": "console", - "weight": 505, - "cookies": false, - "type": "", - "demo": "console\/list-project-scopes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/console\/variables": { - "get": { - "summary": "Get variables", - "operationId": "consoleVariables", - "tags": [ - "console" - ], - "description": "Get all Environment Variables that are relevant for the console.", - "responses": { - "200": { - "description": "Console Variables", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/consoleVariables" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "variables", - "group": "console", - "weight": 503, - "cookies": false, - "type": "", - "demo": "console\/variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "tags": [ - "databases" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "list", - "group": "databases", - "weight": 191, - "cookies": false, - "type": "", - "demo": "databases\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - }, - "methods": [ - { - "name": "list", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search", - "total" - ], - "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.", - "demo": "databases\/list.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "tags": [ - "databases" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "create", - "group": "databases", - "weight": 187, - "cookies": false, - "type": "", - "demo": "databases\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - }, - "methods": [ - { - "name": "create", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n", - "demo": "databases\/create.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", - "tags": [ - "databases" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 259, - "cookies": false, - "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 255, - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", - "tags": [ - "databases" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 256, - "cookies": false, - "type": "", - "demo": "databases\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 257, - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "tags": [ - "databases" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 258, - "cookies": false, - "type": "", - "demo": "databases\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", - "tags": [ - "databases" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 260, - "cookies": false, - "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/databases\/usage": { - "get": { - "summary": "Get databases usage stats", - "operationId": "databasesListUsage", - "tags": [ - "databases" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageDatabases" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 194, - "cookies": false, - "type": "", - "demo": "databases\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listUsage" - }, - "methods": [ - { - "name": "listUsage", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "databases\/list-usage.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listUsage" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "tags": [ - "databases" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "get", - "group": "databases", - "weight": 188, - "cookies": false, - "type": "", - "demo": "databases\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - }, - "methods": [ - { - "name": "get", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/get.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "tags": [ - "databases" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "update", - "group": "databases", - "weight": 189, - "cookies": false, - "type": "", - "demo": "databases\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - }, - "methods": [ - { - "name": "update", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID.", - "demo": "databases\/update.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "tags": [ - "databases" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "delete", - "group": "databases", - "weight": 190, - "cookies": false, - "type": "", - "demo": "databases\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - }, - "methods": [ - { - "name": "delete", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/delete.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "tags": [ - "databases" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collectionList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 199, - "cookies": false, - "type": "", - "demo": "databases\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTables" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collections", - "operationId": "databasesCreateCollection", - "tags": [ - "databases" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 195, - "cookies": false, - "type": "", - "demo": "databases\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "tags": [ - "databases" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 196, - "cookies": false, - "type": "", - "demo": "databases\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "tags": [ - "databases" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 197, - "cookies": false, - "type": "", - "demo": "databases\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "tags": [ - "databases" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 198, - "cookies": false, - "type": "", - "demo": "databases\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "tags": [ - "databases" - ], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listAttributes", - "group": "attributes", - "weight": 216, - "cookies": false, - "type": "", - "demo": "databases\/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listColumns" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "tags": [ - "databases" - ], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createBooleanAttribute", - "group": "attributes", - "weight": 217, - "cookies": false, - "type": "", - "demo": "databases\/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createBooleanColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "tags": [ - "databases" - ], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateBooleanAttribute", - "group": "attributes", - "weight": 218, - "cookies": false, - "type": "", - "demo": "databases\/update-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateBooleanColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "tags": [ - "databases" - ], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDatetimeAttribute", - "group": "attributes", - "weight": 219, - "cookies": false, - "type": "", - "demo": "databases\/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createDatetimeColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { - "patch": { - "summary": "Update datetime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "tags": [ - "databases" - ], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "group": "attributes", - "weight": 220, - "cookies": false, - "type": "", - "demo": "databases\/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateDatetimeColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "tags": [ - "databases" - ], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEmailAttribute", - "group": "attributes", - "weight": 221, - "cookies": false, - "type": "", - "demo": "databases\/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEmailColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "tags": [ - "databases" - ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEmailAttribute", - "group": "attributes", - "weight": 222, - "cookies": false, - "type": "", - "demo": "databases\/update-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEmailColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "tags": [ - "databases" - ], - "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEnumAttribute", - "group": "attributes", - "weight": 223, - "cookies": false, - "type": "", - "demo": "databases\/create-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEnumColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "tags": [ - "databases" - ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEnumAttribute", - "group": "attributes", - "weight": 224, - "cookies": false, - "type": "", - "demo": "databases\/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEnumColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "tags": [ - "databases" - ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFloatAttribute", - "group": "attributes", - "weight": 225, - "cookies": false, - "type": "", - "demo": "databases\/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createFloatColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "tags": [ - "databases" - ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFloatAttribute", - "group": "attributes", - "weight": 226, - "cookies": false, - "type": "", - "demo": "databases\/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateFloatColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "tags": [ - "databases" - ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIntegerAttribute", - "group": "attributes", - "weight": 227, - "cookies": false, - "type": "", - "demo": "databases\/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIntegerColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "tags": [ - "databases" - ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIntegerAttribute", - "group": "attributes", - "weight": 228, - "cookies": false, - "type": "", - "demo": "databases\/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIntegerColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "tags": [ - "databases" - ], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeIp" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIpAttribute", - "group": "attributes", - "weight": 229, - "cookies": false, - "type": "", - "demo": "databases\/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIpColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "tags": [ - "databases" - ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeIp" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIpAttribute", - "group": "attributes", - "weight": 230, - "cookies": false, - "type": "", - "demo": "databases\/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIpColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { - "post": { - "summary": "Create line attribute", - "operationId": "databasesCreateLineAttribute", - "tags": [ - "databases" - ], - "description": "Create a geometric line attribute.", - "responses": { - "202": { - "description": "AttributeLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLine" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createLineAttribute", - "group": "attributes", - "weight": 231, - "cookies": false, - "type": "", - "demo": "databases\/create-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createLineColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { - "patch": { - "summary": "Update line attribute", - "operationId": "databasesUpdateLineAttribute", - "tags": [ - "databases" - ], - "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLine" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateLineAttribute", - "group": "attributes", - "weight": 232, - "cookies": false, - "type": "", - "demo": "databases\/update-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateLineColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { - "post": { - "summary": "Create longtext attribute", - "operationId": "databasesCreateLongtextAttribute", - "tags": [ - "databases" - ], - "description": "Create a longtext attribute.\n", - "responses": { - "202": { - "description": "AttributeLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextAttribute", - "group": "attributes", - "weight": 249, - "cookies": false, - "type": "", - "demo": "databases\/create-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { - "patch": { - "summary": "Update longtext attribute", - "operationId": "databasesUpdateLongtextAttribute", - "tags": [ - "databases" - ], - "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextAttribute", - "group": "attributes", - "weight": 250, - "cookies": false, - "type": "", - "demo": "databases\/update-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { - "post": { - "summary": "Create mediumtext attribute", - "operationId": "databasesCreateMediumtextAttribute", - "tags": [ - "databases" - ], - "description": "Create a mediumtext attribute.\n", - "responses": { - "202": { - "description": "AttributeMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextAttribute", - "group": "attributes", - "weight": 247, - "cookies": false, - "type": "", - "demo": "databases\/create-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext attribute", - "operationId": "databasesUpdateMediumtextAttribute", - "tags": [ - "databases" - ], - "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextAttribute", - "group": "attributes", - "weight": 248, - "cookies": false, - "type": "", - "demo": "databases\/update-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { - "post": { - "summary": "Create point attribute", - "operationId": "databasesCreatePointAttribute", - "tags": [ - "databases" - ], - "description": "Create a geometric point attribute.", - "responses": { - "202": { - "description": "AttributePoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePoint" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPointAttribute", - "group": "attributes", - "weight": 233, - "cookies": false, - "type": "", - "demo": "databases\/create-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPointColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { - "patch": { - "summary": "Update point attribute", - "operationId": "databasesUpdatePointAttribute", - "tags": [ - "databases" - ], - "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePoint" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePointAttribute", - "group": "attributes", - "weight": 234, - "cookies": false, - "type": "", - "demo": "databases\/update-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePointColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { - "post": { - "summary": "Create polygon attribute", - "operationId": "databasesCreatePolygonAttribute", - "tags": [ - "databases" - ], - "description": "Create a geometric polygon attribute.", - "responses": { - "202": { - "description": "AttributePolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPolygonAttribute", - "group": "attributes", - "weight": 235, - "cookies": false, - "type": "", - "demo": "databases\/create-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPolygonColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { - "patch": { - "summary": "Update polygon attribute", - "operationId": "databasesUpdatePolygonAttribute", - "tags": [ - "databases" - ], - "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePolygonAttribute", - "group": "attributes", - "weight": 236, - "cookies": false, - "type": "", - "demo": "databases\/update-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePolygonColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "tags": [ - "databases" - ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createRelationshipAttribute", - "group": "attributes", - "weight": 237, - "cookies": false, - "type": "", - "demo": "databases\/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRelationshipColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID.", - "x-example": "<RELATED_COLLECTION_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedCollectionId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "tags": [ - "databases" - ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "group": "attributes", - "weight": 238, - "cookies": false, - "type": "", - "demo": "databases\/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRelationshipColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "tags": [ - "databases" - ], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringAttribute", - "group": "attributes", - "weight": 239, - "cookies": false, - "type": "", - "demo": "databases\/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createStringColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "tags": [ - "databases" - ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringAttribute", - "group": "attributes", - "weight": 240, - "cookies": false, - "type": "", - "demo": "databases\/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateStringColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { - "post": { - "summary": "Create text attribute", - "operationId": "databasesCreateTextAttribute", - "tags": [ - "databases" - ], - "description": "Create a text attribute.\n", - "responses": { - "202": { - "description": "AttributeText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextAttribute", - "group": "attributes", - "weight": 245, - "cookies": false, - "type": "", - "demo": "databases\/create-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { - "patch": { - "summary": "Update text attribute", - "operationId": "databasesUpdateTextAttribute", - "tags": [ - "databases" - ], - "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextAttribute", - "group": "attributes", - "weight": 246, - "cookies": false, - "type": "", - "demo": "databases\/update-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "tags": [ - "databases" - ], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createUrlAttribute", - "group": "attributes", - "weight": 241, - "cookies": false, - "type": "", - "demo": "databases\/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createUrlColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "tags": [ - "databases" - ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateUrlAttribute", - "group": "attributes", - "weight": 242, - "cookies": false, - "type": "", - "demo": "databases\/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateUrlColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { - "post": { - "summary": "Create varchar attribute", - "operationId": "databasesCreateVarcharAttribute", - "tags": [ - "databases" - ], - "description": "Create a varchar attribute.\n", - "responses": { - "202": { - "description": "AttributeVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharAttribute", - "group": "attributes", - "weight": 243, - "cookies": false, - "type": "", - "demo": "databases\/create-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { - "patch": { - "summary": "Update varchar attribute", - "operationId": "databasesUpdateVarcharAttribute", - "tags": [ - "databases" - ], - "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharAttribute", - "group": "attributes", - "weight": 244, - "cookies": false, - "type": "", - "demo": "databases\/update-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar attribute.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "tags": [ - "databases" - ], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeInteger" - }, - { - "$ref": "#\/components\/schemas\/attributeFloat" - }, - { - "$ref": "#\/components\/schemas\/attributeEmail" - }, - { - "$ref": "#\/components\/schemas\/attributeEnum" - }, - { - "$ref": "#\/components\/schemas\/attributeUrl" - }, - { - "$ref": "#\/components\/schemas\/attributeIp" - }, - { - "$ref": "#\/components\/schemas\/attributeDatetime" - }, - { - "$ref": "#\/components\/schemas\/attributeRelationship" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getAttribute", - "group": "attributes", - "weight": 214, - "cookies": false, - "type": "", - "demo": "databases\/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "tags": [ - "databases" - ], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteAttribute", - "group": "attributes", - "weight": 215, - "cookies": false, - "type": "", - "demo": "databases\/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "tags": [ - "databases" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 210, - "cookies": false, - "type": "", - "demo": "databases\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "tags": [ - "databases" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 202, - "cookies": false, - "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - }, - { - "name": "createDocuments", - "namespace": "databases", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRows" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "databasesUpsertDocuments", - "tags": [ - "databases" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 207, - "cookies": false, - "type": "", - "demo": "databases\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - }, - "methods": [ - { - "name": "upsertDocuments", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "demo": "databases\/upsert-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "documents" - ] - } - } - } - } - }, - "patch": { - "summary": "Update documents", - "operationId": "databasesUpdateDocuments", - "tags": [ - "databases" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 205, - "cookies": false, - "type": "", - "demo": "databases\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "databasesDeleteDocuments", - "tags": [ - "databases" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 209, - "cookies": false, - "type": "", - "demo": "databases\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "tags": [ - "databases" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 203, - "cookies": false, - "type": "", - "demo": "databases\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 206, - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "tags": [ - "databases" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 204, - "cookies": false, - "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 208, - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs": { - "get": { - "summary": "List document logs", - "operationId": "databasesListDocumentLogs", - "tags": [ - "databases" - ], - "description": "Get the document 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": "listDocumentLogs", - "group": "logs", - "weight": 211, - "cookies": false, - "type": "", - "demo": "databases\/list-document-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRowLogs" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "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}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "tags": [ - "databases" - ], - "description": "Decrement a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 213, - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "tags": [ - "databases" - ], - "description": "Increment a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 212, - "cookies": false, - "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "tags": [ - "databases" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 254, - "cookies": false, - "type": "", - "demo": "databases\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listIndexes" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "tags": [ - "databases" - ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 251, - "cookies": false, - "type": "", - "demo": "databases\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIndex" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "DatabasesIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "tags": [ - "databases" - ], - "description": "Get an index by its unique ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 252, - "cookies": false, - "type": "", - "demo": "databases\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getIndex" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "tags": [ - "databases" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 253, - "cookies": false, - "type": "", - "demo": "databases\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteIndex" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/logs": { - "get": { - "summary": "List collection logs", - "operationId": "databasesListCollectionLogs", - "tags": [ - "databases" - ], - "description": "Get the collection 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": "listCollectionLogs", - "group": "collections", - "weight": 200, - "cookies": false, - "type": "", - "demo": "databases\/list-collection-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTableLogs" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "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}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "databasesGetCollectionUsage", - "tags": [ - "databases" - ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageCollection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollectionUsage", - "group": null, - "weight": 201, - "cookies": false, - "type": "", - "demo": "databases\/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTableUsage" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/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": 192, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listDatabaseLogs" - }, - "methods": [ - { - "name": "listLogs", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/list-logs.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listDatabaseLogs" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "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", - "operationId": "databasesGetUsage", - "tags": [ - "databases" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabase", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageDatabase" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 193, - "cookies": false, - "type": "", - "demo": "databases\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getUsage" - }, - "methods": [ - { - "name": "getUsage", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "databases\/get-usage.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getUsage" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/documentsdb": { - "get": { - "summary": "List databases", - "operationId": "documentsDBList", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "documentsdb", - "weight": 338, - "cookies": false, - "type": "", - "demo": "documentsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "documentsDBCreate", - "tags": [ - "documentsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "documentsdb", - "weight": 334, - "cookies": false, - "type": "", - "demo": "documentsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 366, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 362, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 363, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 364, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 365, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/usage": { - "get": { - "summary": "Get DocumentsDB usage stats", - "operationId": "documentsDBListUsage", - "tags": [ - "documentsDB" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageDatabases" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 340, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "documentsdb\/list-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/documentsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "documentsDBGet", - "tags": [ - "documentsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "documentsdb", - "weight": 335, - "cookies": false, - "type": "", - "demo": "documentsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "documentsDBUpdate", - "tags": [ - "documentsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "documentsdb", - "weight": 336, - "cookies": false, - "type": "", - "demo": "documentsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "documentsDBDelete", - "tags": [ - "documentsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "documentsdb", - "weight": 337, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "documentsDBListCollections", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collectionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 345, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "documentsDBCreateCollection", - "tags": [ - "documentsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 341, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "documentsDBGetCollection", - "tags": [ - "documentsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 342, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "documentsDBUpdateCollection", - "tags": [ - "documentsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 343, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "documentsDBDeleteCollection", - "tags": [ - "documentsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 344, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 359, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 351, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "documentsDBUpsertDocuments", - "tags": [ - "documentsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 356, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "documentsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - } - } - }, - "patch": { - "summary": "Update documents", - "operationId": "documentsDBUpdateDocuments", - "tags": [ - "documentsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 354, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "documentsDBDeleteDocuments", - "tags": [ - "documentsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 358, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", - "tags": [ - "documentsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 352, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", - "tags": [ - "documentsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 355, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "tags": [ - "documentsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 353, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 357, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", - "tags": [ - "documentsDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 361, - "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "tags": [ - "documentsDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 360, - "cookies": false, - "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "documentsDBListIndexes", - "tags": [ - "documentsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 350, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "documentsDBCreateIndex", - "tags": [ - "documentsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 347, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "DocumentsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "documentsDBGetIndex", - "tags": [ - "documentsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 348, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "documentsDBDeleteIndex", - "tags": [ - "documentsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 349, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "documentsDBGetCollectionUsage", - "tags": [ - "documentsDB" - ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollectionUsage", - "group": null, - "weight": 346, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/usage": { - "get": { - "summary": "Get DocumentsDB usage stats", - "operationId": "documentsDBGetUsage", - "tags": [ - "documentsDB" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDocumentsDB", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageDocumentsDB" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 339, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDocumentsDB" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "documentsdb\/get-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/functions": { - "get": { - "summary": "List functions", - "operationId": "functionsList", - "tags": [ - "functions" - ], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/functionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "functions", - "weight": 422, - "cookies": false, - "type": "", - "demo": "functions\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create function", - "operationId": "functionsCreate", - "tags": [ - "functions" - ], - "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", - "responses": { - "201": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "functions", - "weight": 419, - "cookies": false, - "type": "", - "demo": "functions\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "functionId": { - "type": "string", - "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<FUNCTION_ID>" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "functionId", - "name", - "runtime" - ] - } - } - } - } - } - }, - "\/functions\/runtimes": { - "get": { - "summary": "List runtimes", - "operationId": "functionsListRuntimes", - "tags": [ - "functions" - ], - "description": "Get a list of all runtimes that are currently active on your instance.", - "responses": { - "200": { - "description": "Runtimes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/runtimeList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRuntimes", - "group": "runtimes", - "weight": 424, - "cookies": false, - "type": "", - "demo": "functions\/list-runtimes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "functionsListSpecifications", - "tags": [ - "functions" - ], - "description": "List allowed function specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/specificationList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "runtimes", - "weight": 425, - "cookies": false, - "type": "", - "demo": "functions\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/templates": { - "get": { - "summary": "List templates", - "operationId": "functionsListTemplates", - "tags": [ - "functions" - ], - "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", - "responses": { - "200": { - "description": "Function Templates List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/templateFunctionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTemplates", - "group": "templates", - "weight": 448, - "cookies": false, - "type": "", - "demo": "functions\/list-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "runtimes", - "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [] - }, - "in": "query" - }, - { - "name": "useCases", - "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "starter", - "databases", - "ai", - "messaging", - "utilities", - "dev-tools", - "auth" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [] - }, - "in": "query" - }, - { - "name": "limit", - "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25 - }, - "in": "query" - }, - { - "name": "offset", - "description": "Offset the list of returned templates. Maximum offset is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/functions\/templates\/{templateId}": { - "get": { - "summary": "Get function template", - "operationId": "functionsGetTemplate", - "tags": [ - "functions" - ], - "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", - "responses": { - "200": { - "description": "Template Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/templateFunction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTemplate", - "group": "templates", - "weight": 447, - "cookies": false, - "type": "", - "demo": "functions\/get-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Template ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEMPLATE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/usage": { - "get": { - "summary": "Get functions usage", - "operationId": "functionsListUsage", - "tags": [ - "functions" - ], - "description": "Get usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageFunctions", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageFunctions" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 441, - "cookies": false, - "type": "", - "demo": "functions\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}": { - "get": { - "summary": "Get function", - "operationId": "functionsGet", - "tags": [ - "functions" - ], - "description": "Get a function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "functions", - "weight": 420, - "cookies": false, - "type": "", - "demo": "functions\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update function", - "operationId": "functionsUpdate", - "tags": [ - "functions" - ], - "description": "Update function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "functions", - "weight": 421, - "cookies": false, - "type": "", - "demo": "functions\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete function", - "operationId": "functionsDelete", - "tags": [ - "functions" - ], - "description": "Delete a function by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "functions", - "weight": 423, - "cookies": false, - "type": "", - "demo": "functions\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployment": { - "patch": { - "summary": "Update function's deployment", - "operationId": "functionsUpdateFunctionDeployment", - "tags": [ - "functions" - ], - "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", - "responses": { - "200": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFunctionDeployment", - "group": "functions", - "weight": 428, - "cookies": false, - "type": "", - "demo": "functions\/update-function-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "functionsListDeployments", - "tags": [ - "functions" - ], - "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deploymentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 429, - "cookies": false, - "type": "", - "demo": "functions\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "functionsCreateDeployment", - "tags": [ - "functions" - ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 426, - "cookies": false, - "type": "upload", - "demo": "functions\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "entrypoint": { - "type": "string", - "description": "Entrypoint File.", - "x-example": "<ENTRYPOINT>", - "x-nullable": true - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>", - "x-nullable": true - }, - "code": { - "type": "string", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "x-example": null, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "code", - "activate" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "functionsCreateDuplicateDeployment", - "tags": [ - "functions" - ], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 434, - "cookies": false, - "type": "", - "demo": "functions\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - }, - "buildId": { - "type": "string", - "description": "Build unique ID.", - "x-example": "<BUILD_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "functionsCreateTemplateDeployment", - "tags": [ - "functions" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 431, - "cookies": false, - "type": "", - "demo": "functions\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "commit", - "enum": [ - "commit", - "branch", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "functionsCreateVcsDeployment", - "tags": [ - "functions" - ], - "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 432, - "cookies": false, - "type": "", - "demo": "functions\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "functionsGetDeployment", - "tags": [ - "functions" - ], - "description": "Get a function deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 427, - "cookies": false, - "type": "", - "demo": "functions\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "functionsDeleteDeployment", - "tags": [ - "functions" - ], - "description": "Delete a code deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 430, - "cookies": false, - "type": "", - "demo": "functions\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "functionsGetDeploymentDownload", - "tags": [ - "functions" - ], - "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 433, - "cookies": false, - "type": "location", - "demo": "functions\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source" - }, - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "functionsUpdateDeploymentStatus", - "tags": [ - "functions" - ], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 435, - "cookies": false, - "type": "", - "demo": "functions\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/executions": { - "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", - "tags": [ - "functions" - ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/executionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listExecutions", - "group": "executions", - "weight": 438, - "cookies": false, - "type": "", - "demo": "functions\/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "tags": [ - "functions" - ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "content": { - "multipart\/form-data": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createExecution", - "group": "executions", - "weight": 436, - "cookies": false, - "type": "", - "demo": "functions\/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": "<SCHEDULED_AT>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", - "tags": [ - "functions" - ], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getExecution", - "group": "executions", - "weight": 437, - "cookies": false, - "type": "", - "demo": "functions\/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<EXECUTION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "tags": [ - "functions" - ], - "description": "Delete a function execution by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteExecution", - "group": "executions", - "weight": 439, - "cookies": false, - "type": "", - "demo": "functions\/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<EXECUTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/usage": { - "get": { - "summary": "Get function usage", - "operationId": "functionsGetUsage", - "tags": [ - "functions" - ], - "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageFunction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageFunction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 440, - "cookies": false, - "type": "", - "demo": "functions\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "tags": [ - "functions" - ], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 444, - "cookies": false, - "type": "", - "demo": "functions\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "tags": [ - "functions" - ], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 442, - "cookies": false, - "type": "", - "demo": "functions\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "tags": [ - "functions" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 443, - "cookies": false, - "type": "", - "demo": "functions\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "tags": [ - "functions" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 445, - "cookies": false, - "type": "", - "demo": "functions\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "tags": [ - "functions" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 446, - "cookies": false, - "type": "", - "demo": "functions\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "query", - "group": "graphql", - "weight": 117, - "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "mutation", - "group": "graphql", - "weight": 116, - "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", - "tags": [ - "health" - ], - "description": "Check the Appwrite HTTP server is up and responsive.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "health", - "weight": 449, - "cookies": false, - "type": "", - "demo": "health\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/anti-virus": { - "get": { - "summary": "Get antivirus", - "operationId": "healthGetAntivirus", - "tags": [ - "health" - ], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Antivirus", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthAntivirus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAntivirus", - "group": "health", - "weight": 458, - "cookies": false, - "type": "", - "demo": "health\/get-antivirus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/cache": { - "get": { - "summary": "Get cache", - "operationId": "healthGetCache", - "tags": [ - "health" - ], - "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCache", - "group": "health", - "weight": 452, - "cookies": false, - "type": "", - "demo": "health\/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "tags": [ - "health" - ], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthCertificate" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCertificate", - "group": "health", - "weight": 455, - "cookies": false, - "type": "", - "demo": "health\/get-certificate.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "schema": { - "type": "string" - }, - "in": "query" - } - ] - } - }, - "\/health\/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "tags": [ - "health" - ], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDB", - "group": "health", - "weight": 451, - "cookies": false, - "type": "", - "demo": "health\/get-db.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "tags": [ - "health" - ], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPubSub", - "group": "health", - "weight": 453, - "cookies": false, - "type": "", - "demo": "health\/get-pub-sub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/queue\/audits": { - "get": { - "summary": "Get audits queue", - "operationId": "healthGetQueueAudits", - "tags": [ - "health" - ], - "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueAudits", - "group": "queue", - "weight": 459, - "cookies": false, - "type": "", - "demo": "health\/get-queue-audits.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "tags": [ - "health" - ], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueBuilds", - "group": "queue", - "weight": 463, - "cookies": false, - "type": "", - "demo": "health\/get-queue-builds.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/certificates": { - "get": { - "summary": "Get certificates queue", - "operationId": "healthGetQueueCertificates", - "tags": [ - "health" - ], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueCertificates", - "group": "queue", - "weight": 462, - "cookies": false, - "type": "", - "demo": "health\/get-queue-certificates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "tags": [ - "health" - ], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDatabases", - "group": "queue", - "weight": 464, - "cookies": false, - "type": "", - "demo": "health\/get-queue-databases.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "schema": { - "type": "string", - "x-example": "<NAME>", - "default": "database_db_main" - }, - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "tags": [ - "health" - ], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDeletes", - "group": "queue", - "weight": 465, - "cookies": false, - "type": "", - "demo": "health\/get-queue-deletes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/failed\/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "tags": [ - "health" - ], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFailedJobs", - "group": "queue", - "weight": 472, - "cookies": false, - "type": "", - "demo": "health\/get-failed-jobs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "schema": { - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "tags": [ - "health" - ], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueFunctions", - "group": "queue", - "weight": 469, - "cookies": false, - "type": "", - "demo": "health\/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/logs": { - "get": { - "summary": "Get logs queue", - "operationId": "healthGetQueueLogs", - "tags": [ - "health" - ], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueLogs", - "group": "queue", - "weight": 461, - "cookies": false, - "type": "", - "demo": "health\/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "tags": [ - "health" - ], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMails", - "group": "queue", - "weight": 466, - "cookies": false, - "type": "", - "demo": "health\/get-queue-mails.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "tags": [ - "health" - ], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMessaging", - "group": "queue", - "weight": 467, - "cookies": false, - "type": "", - "demo": "health\/get-queue-messaging.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "tags": [ - "health" - ], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMigrations", - "group": "queue", - "weight": 468, - "cookies": false, - "type": "", - "demo": "health\/get-queue-migrations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-resources": { - "get": { - "summary": "Get stats resources queue", - "operationId": "healthGetQueueStatsResources", - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueStatsResources", - "group": "queue", - "weight": 470, - "cookies": false, - "type": "", - "demo": "health\/get-queue-stats-resources.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-usage": { - "get": { - "summary": "Get stats usage queue", - "operationId": "healthGetQueueUsage", - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueUsage", - "group": "queue", - "weight": 471, - "cookies": false, - "type": "", - "demo": "health\/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/webhooks": { - "get": { - "summary": "Get webhooks queue", - "operationId": "healthGetQueueWebhooks", - "tags": [ - "health" - ], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueWebhooks", - "group": "queue", - "weight": 460, - "cookies": false, - "type": "", - "demo": "health\/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "tags": [ - "health" - ], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorage", - "group": "storage", - "weight": 457, - "cookies": false, - "type": "", - "demo": "health\/get-storage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/storage\/local": { - "get": { - "summary": "Get local storage", - "operationId": "healthGetStorageLocal", - "tags": [ - "health" - ], - "description": "Check the Appwrite local storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorageLocal", - "group": "storage", - "weight": 456, - "cookies": false, - "type": "", - "demo": "health\/get-storage-local.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/time": { - "get": { - "summary": "Get time", - "operationId": "healthGetTime", - "tags": [ - "health" - ], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", - "responses": { - "200": { - "description": "Health Time", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthTime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTime", - "group": "health", - "weight": 454, - "cookies": false, - "type": "", - "demo": "health\/get-time.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", - "tags": [ - "locale" - ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/locale" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 49, - "cookies": false, - "type": "", - "demo": "locale\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "tags": [ - "locale" - ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCodes", - "group": null, - "weight": 50, - "cookies": false, - "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "tags": [ - "locale" - ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/continentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listContinents", - "group": null, - "weight": 54, - "cookies": false, - "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "tags": [ - "locale" - ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountries", - "group": null, - "weight": 51, - "cookies": false, - "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "tags": [ - "locale" - ], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesEU", - "group": null, - "weight": 52, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "tags": [ - "locale" - ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/phoneList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesPhones", - "group": null, - "weight": 53, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "tags": [ - "locale" - ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/currencyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCurrencies", - "group": null, - "weight": 55, - "cookies": false, - "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "tags": [ - "locale" - ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/languageList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, - "weight": 56, - "cookies": false, - "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/messaging\/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "tags": [ - "messaging" - ], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/messageList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessages", - "group": "messages", - "weight": 158, - "cookies": false, - "type": "", - "demo": "messaging\/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "tags": [ - "messaging" - ], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmail", - "group": "messages", - "weight": 155, - "cookies": false, - "type": "", - "demo": "messaging\/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "subject", - "content" - ] - } - } - } - } - } - }, - "\/messaging\/messages\/email\/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "tags": [ - "messaging" - ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "messages", - "weight": 162, - "cookies": false, - "type": "", - "demo": "messaging\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false, - "x-nullable": true - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "tags": [ - "messaging" - ], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPush", - "group": "messages", - "weight": 157, - "cookies": false, - "type": "", - "demo": "messaging\/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "<ID1:ID2>" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "x-example": null, - "format": "int32" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - }, - "required": [ - "messageId" - ] - } - } - } - } - } - }, - "\/messaging\/messages\/push\/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "tags": [ - "messaging" - ], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePush", - "group": "messages", - "weight": 164, - "cookies": false, - "type": "", - "demo": "messaging\/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>", - "x-nullable": true - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>", - "x-nullable": true - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>", - "x-nullable": true - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "<ID1:ID2>", - "x-nullable": true - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "x-example": "<ICON>", - "x-nullable": true - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "x-example": "<SOUND>", - "x-nullable": true - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "x-example": "<COLOR>", - "x-nullable": true - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "x-example": "<TAG>", - "x-nullable": true - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [], - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "tags": [ - "messaging" - ], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSms", - "group": "messages", - "weight": 156, - "cookies": false, - "type": "", - "demo": "messaging\/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - }, - "methods": [ - { - "name": "createSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - } - }, - { - "name": "createSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "content" - ] - } - } - } - } - } - }, - "\/messaging\/messages\/sms\/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "tags": [ - "messaging" - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSms", - "group": "messages", - "weight": 163, - "cookies": false, - "type": "", - "demo": "messaging\/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - }, - "methods": [ - { - "name": "updateSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - } - }, - { - "name": "updateSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "tags": [ - "messaging" - ], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMessage", - "group": "messages", - "weight": 161, - "cookies": false, - "type": "", - "demo": "messaging\/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "tags": [ - "messaging" - ], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "messages", - "weight": 165, - "cookies": false, - "type": "", - "demo": "messaging\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "tags": [ - "messaging" - ], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessageLogs", - "group": "logs", - "weight": 159, - "cookies": false, - "type": "", - "demo": "messaging\/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "tags": [ - "messaging" - ], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/targetList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "messages", - "weight": 160, - "cookies": false, - "type": "", - "demo": "messaging\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "tags": [ - "messaging" - ], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/providerList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviders", - "group": "providers", - "weight": 129, - "cookies": false, - "type": "", - "demo": "messaging\/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/providers\/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createApnsProvider", - "group": "providers", - "weight": 128, - "cookies": false, - "type": "", - "demo": "messaging\/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - }, - "methods": [ - { - "name": "createApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - } - }, - { - "name": "createAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/apns\/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "tags": [ - "messaging" - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateApnsProvider", - "group": "providers", - "weight": 142, - "cookies": false, - "type": "", - "demo": "messaging\/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - }, - "methods": [ - { - "name": "updateApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - } - }, - { - "name": "updateAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFcmProvider", - "group": "providers", - "weight": 127, - "cookies": false, - "type": "", - "demo": "messaging\/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - }, - "methods": [ - { - "name": "createFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - } - }, - { - "name": "createFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "x-example": "{}", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/fcm\/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "tags": [ - "messaging" - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFcmProvider", - "group": "providers", - "weight": 141, - "cookies": false, - "type": "", - "demo": "messaging\/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - }, - "methods": [ - { - "name": "updateFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - } - }, - { - "name": "updateFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "x-example": "{}", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMailgunProvider", - "group": "providers", - "weight": 118, - "cookies": false, - "type": "", - "demo": "messaging\/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/mailgun\/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "tags": [ - "messaging" - ], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMailgunProvider", - "group": "providers", - "weight": 132, - "cookies": false, - "type": "", - "demo": "messaging\/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "tags": [ - "messaging" - ], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", - "weight": 122, - "cookies": false, - "type": "", - "demo": "messaging\/create-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/msg91\/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "tags": [ - "messaging" - ], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", - "weight": 136, - "cookies": false, - "type": "", - "demo": "messaging\/update-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "x-example": "<AUTH_KEY>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/resend": { - "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Resend provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createResendProvider", - "group": "providers", - "weight": 120, - "cookies": false, - "type": "", - "demo": "messaging\/create-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/resend\/{providerId}": { - "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", - "tags": [ - "messaging" - ], - "description": "Update a Resend provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateResendProvider", - "group": "providers", - "weight": 134, - "cookies": false, - "type": "", - "demo": "messaging\/update-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSendgridProvider", - "group": "providers", - "weight": 119, - "cookies": false, - "type": "", - "demo": "messaging\/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/sendgrid\/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "tags": [ - "messaging" - ], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSendgridProvider", - "group": "providers", - "weight": 133, - "cookies": false, - "type": "", - "demo": "messaging\/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "tags": [ - "messaging" - ], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSmtpProvider", - "group": "providers", - "weight": 121, - "cookies": false, - "type": "", - "demo": "messaging\/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - }, - "methods": [ - { - "name": "createSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - } - }, - { - "name": "createSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "x-example": 1, - "format": "int32" - }, - "username": { - "type": "string", - "description": "Authentication username.", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name", - "host" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/smtp\/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "tags": [ - "messaging" - ], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSmtpProvider", - "group": "providers", - "weight": 135, - "cookies": false, - "type": "", - "demo": "messaging\/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - }, - "methods": [ - { - "name": "updateSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - } - }, - { - "name": "updateSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Authentication username.", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false, - "x-nullable": true - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTelesignProvider", - "group": "providers", - "weight": 123, - "cookies": false, - "type": "", - "demo": "messaging\/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/telesign\/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "tags": [ - "messaging" - ], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTelesignProvider", - "group": "providers", - "weight": 137, - "cookies": false, - "type": "", - "demo": "messaging\/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextmagicProvider", - "group": "providers", - "weight": 124, - "cookies": false, - "type": "", - "demo": "messaging\/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/textmagic\/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "tags": [ - "messaging" - ], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextmagicProvider", - "group": "providers", - "weight": 138, - "cookies": false, - "type": "", - "demo": "messaging\/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTwilioProvider", - "group": "providers", - "weight": 125, - "cookies": false, - "type": "", - "demo": "messaging\/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/twilio\/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "tags": [ - "messaging" - ], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTwilioProvider", - "group": "providers", - "weight": 139, - "cookies": false, - "type": "", - "demo": "messaging\/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVonageProvider", - "group": "providers", - "weight": 126, - "cookies": false, - "type": "", - "demo": "messaging\/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/vonage\/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "tags": [ - "messaging" - ], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVonageProvider", - "group": "providers", - "weight": 140, - "cookies": false, - "type": "", - "demo": "messaging\/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "tags": [ - "messaging" - ], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getProvider", - "group": "providers", - "weight": 131, - "cookies": false, - "type": "", - "demo": "messaging\/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "tags": [ - "messaging" - ], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteProvider", - "group": "providers", - "weight": 143, - "cookies": false, - "type": "", - "demo": "messaging\/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/providers\/{providerId}\/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "tags": [ - "messaging" - ], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviderLogs", - "group": "providers", - "weight": 130, - "cookies": false, - "type": "", - "demo": "messaging\/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/subscribers\/{subscriberId}\/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "tags": [ - "messaging" - ], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscriberLogs", - "group": "subscribers", - "weight": 152, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "tags": [ - "messaging" - ], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topicList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopics", - "group": "topics", - "weight": 145, - "cookies": false, - "type": "", - "demo": "messaging\/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "tags": [ - "messaging" - ], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topic" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTopic", - "group": "topics", - "weight": 144, - "cookies": false, - "type": "", - "demo": "messaging\/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "<TOPIC_ID>" - }, - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": [ - "topicId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/topics\/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "tags": [ - "messaging" - ], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topic" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTopic", - "group": "topics", - "weight": 147, - "cookies": false, - "type": "", - "demo": "messaging\/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "tags": [ - "messaging" - ], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topic" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTopic", - "group": "topics", - "weight": 148, - "cookies": false, - "type": "", - "demo": "messaging\/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>", - "x-nullable": true - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "tags": [ - "messaging" - ], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTopic", - "group": "topics", - "weight": 149, - "cookies": false, - "type": "", - "demo": "messaging\/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "tags": [ - "messaging" - ], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", - "weight": 146, - "cookies": false, - "type": "", - "demo": "messaging\/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "tags": [ - "messaging" - ], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriberList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", - "weight": 151, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "tags": [ - "messaging" - ], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", - "weight": 150, - "cookies": false, - "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "<TARGET_ID>" - } - }, - "required": [ - "subscriberId", - "targetId" - ] - } - } - } - } - } - }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "tags": [ - "messaging" - ], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", - "weight": 153, - "cookies": false, - "type": "", - "demo": "messaging\/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "weight": 154, - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/migrations": { - "get": { - "summary": "List migrations", - "operationId": "migrationsList", - "tags": [ - "migrations" - ], - "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", - "responses": { - "200": { - "description": "Migrations List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migrationList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "weight": 578, - "cookies": false, - "type": "", - "demo": "migrations\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/migrations\/appwrite": { - "post": { - "summary": "Create Appwrite migration", - "operationId": "migrationsCreateAppwriteMigration", - "tags": [ - "migrations" - ], - "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAppwriteMigration", - "group": null, - "weight": 582, - "cookies": false, - "type": "", - "demo": "migrations\/create-appwrite-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "team", - "membership", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable" - ], - "x-enum-name": "AppwriteMigrationResource", - "x-enum-keys": [] - } - }, - "endpoint": { - "type": "string", - "description": "Source Appwrite endpoint", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "projectId": { - "type": "string", - "description": "Source Project ID", - "x-example": "<PROJECT_ID>" - }, - "apiKey": { - "type": "string", - "description": "Source API Key", - "x-example": "<API_KEY>" - } - }, - "required": [ - "resources", - "endpoint", - "projectId", - "apiKey" - ] - } - } - } - } - } - }, - "\/migrations\/appwrite\/report": { - "get": { - "summary": "Get Appwrite migration report", - "operationId": "migrationsGetAppwriteReport", - "tags": [ - "migrations" - ], - "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", - "responses": { - "200": { - "description": "Migration Report", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migrationReport" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAppwriteReport", - "group": null, - "weight": 583, - "cookies": false, - "type": "", - "demo": "migrations\/get-appwrite-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "team", - "membership", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable" - ], - "x-enum-name": "AppwriteMigrationResource", - "x-enum-keys": [] - } - }, - "in": "query" - }, - { - "name": "endpoint", - "description": "Source's Appwrite Endpoint", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "projectID", - "description": "Source's Project ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "query" - }, - { - "name": "key", - "description": "Source's API Key", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY>" - }, - "in": "query" - } - ] - } - }, - "\/migrations\/csv\/exports": { - "post": { - "summary": "Export documents to CSV", - "operationId": "migrationsCreateCSVExport", - "tags": [ - "migrations" - ], - "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCSVExport", - "group": null, - "weight": 591, - "cookies": false, - "type": "", - "demo": "migrations\/create-csv-export.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-export.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", - "x-example": "<ID1:ID2>" - }, - "filename": { - "type": "string", - "description": "The name of the file to be created for the export, excluding the .csv extension.", - "x-example": "<FILENAME>" - }, - "columns": { - "type": "array", - "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", - "x-example": null, - "items": { - "type": "string" - } - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "delimiter": { - "type": "string", - "description": "The character that separates each column value. Default is comma.", - "x-example": "<DELIMITER>" - }, - "enclosure": { - "type": "string", - "description": "The character that encloses each column value. Default is double quotes.", - "x-example": "<ENCLOSURE>" - }, - "escape": { - "type": "string", - "description": "The escape character for the enclosure character. Default is double quotes.", - "x-example": "<ESCAPE>" - }, - "header": { - "type": "boolean", - "description": "Whether to include the header row with column names. Default is true.", - "x-example": false - }, - "notify": { - "type": "boolean", - "description": "Set to true to receive an email when the export is complete. Default is true.", - "x-example": false - } - }, - "required": [ - "resourceId", - "filename" - ] - } - } - } - } - } - }, - "\/migrations\/csv\/imports": { - "post": { - "summary": "Import documents from a CSV", - "operationId": "migrationsCreateCSVImport", - "tags": [ - "migrations" - ], - "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCSVImport", - "group": null, - "weight": 590, - "cookies": false, - "type": "", - "demo": "migrations\/create-csv-import.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-import.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "x-example": "<BUCKET_ID>" - }, - "fileId": { - "type": "string", - "description": "File ID.", - "x-example": "<FILE_ID>" - }, - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", - "x-example": "<ID1:ID2>" - }, - "internalFile": { - "type": "boolean", - "description": "Is the file stored in an internal bucket?", - "x-example": false - } - }, - "required": [ - "bucketId", - "fileId", - "resourceId" - ] - } - } - } - } - } - }, - "\/migrations\/firebase": { - "post": { - "summary": "Create Firebase migration", - "operationId": "migrationsCreateFirebaseMigration", - "tags": [ - "migrations" - ], - "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFirebaseMigration", - "group": null, - "weight": 584, - "cookies": false, - "type": "", - "demo": "migrations\/create-firebase-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "FirebaseMigrationResource", - "x-enum-keys": [] - } - }, - "serviceAccount": { - "type": "string", - "description": "JSON of the Firebase service account credentials", - "x-example": "<SERVICE_ACCOUNT>" - } - }, - "required": [ - "resources", - "serviceAccount" - ] - } - } - } - } - } - }, - "\/migrations\/firebase\/report": { - "get": { - "summary": "Get Firebase migration report", - "operationId": "migrationsGetFirebaseReport", - "tags": [ - "migrations" - ], - "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", - "responses": { - "200": { - "description": "Migration Report", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migrationReport" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFirebaseReport", - "group": null, - "weight": 585, - "cookies": false, - "type": "", - "demo": "migrations\/get-firebase-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "FirebaseMigrationResource", - "x-enum-keys": [] - } - }, - "in": "query" - }, - { - "name": "serviceAccount", - "description": "JSON of the Firebase service account credentials", - "required": true, - "schema": { - "type": "string", - "x-example": "<SERVICE_ACCOUNT>" - }, - "in": "query" - } - ] - } - }, - "\/migrations\/json\/exports": { - "post": { - "summary": "Export documents to JSON", - "operationId": "migrationsCreateJSONExport", - "tags": [ - "migrations" - ], - "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJSONExport", - "group": null, - "weight": 593, - "cookies": false, - "type": "", - "demo": "migrations\/create-json-export.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-export.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", - "x-example": "<ID1:ID2>" - }, - "filename": { - "type": "string", - "description": "The name of the file to be created for the export, excluding the .json extension.", - "x-example": "<FILENAME>" - }, - "columns": { - "type": "array", - "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", - "x-example": null, - "items": { - "type": "string" - } - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "notify": { - "type": "boolean", - "description": "Set to true to receive an email when the export is complete. Default is true.", - "x-example": false - } - }, - "required": [ - "resourceId", - "filename" - ] - } - } - } - } - } - }, - "\/migrations\/json\/imports": { - "post": { - "summary": "Import documents from a JSON", - "operationId": "migrationsCreateJSONImport", - "tags": [ - "migrations" - ], - "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJSONImport", - "group": null, - "weight": 592, - "cookies": false, - "type": "", - "demo": "migrations\/create-json-import.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-import.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "x-example": "<BUCKET_ID>" - }, - "fileId": { - "type": "string", - "description": "File ID.", - "x-example": "<FILE_ID>" - }, - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", - "x-example": "<ID1:ID2>" - }, - "internalFile": { - "type": "boolean", - "description": "Is the file stored in an internal bucket?", - "x-example": false - } - }, - "required": [ - "bucketId", - "fileId", - "resourceId" - ] - } - } - } - } - } - }, - "\/migrations\/nhost": { - "post": { - "summary": "Create NHost migration", - "operationId": "migrationsCreateNHostMigration", - "tags": [ - "migrations" - ], - "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createNHostMigration", - "group": null, - "weight": 588, - "cookies": false, - "type": "", - "demo": "migrations\/create-n-host-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "NHostMigrationResource", - "x-enum-keys": [] - } - }, - "subdomain": { - "type": "string", - "description": "Source's Subdomain", - "x-example": "<SUBDOMAIN>" - }, - "region": { - "type": "string", - "description": "Source's Region", - "x-example": "<REGION>" - }, - "adminSecret": { - "type": "string", - "description": "Source's Admin Secret", - "x-example": "<ADMIN_SECRET>" - }, - "database": { - "type": "string", - "description": "Source's Database Name", - "x-example": "<DATABASE>" - }, - "username": { - "type": "string", - "description": "Source's Database Username", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Source's Database Password", - "x-example": "<PASSWORD>" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "x-example": null, - "format": "int32" - } - }, - "required": [ - "resources", - "subdomain", - "region", - "adminSecret", - "database", - "username", - "password" - ] - } - } - } - } - } - }, - "\/migrations\/nhost\/report": { - "get": { - "summary": "Get NHost migration report", - "operationId": "migrationsGetNHostReport", - "tags": [ - "migrations" - ], - "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", - "responses": { - "200": { - "description": "Migration Report", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migrationReport" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getNHostReport", - "group": null, - "weight": 589, - "cookies": false, - "type": "", - "demo": "migrations\/get-n-host-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "NHostMigrationResource", - "x-enum-keys": [] - } - }, - "in": "query" - }, - { - "name": "subdomain", - "description": "Source's Subdomain.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBDOMAIN>" - }, - "in": "query" - }, - { - "name": "region", - "description": "Source's Region.", - "required": true, - "schema": { - "type": "string", - "x-example": "<REGION>" - }, - "in": "query" - }, - { - "name": "adminSecret", - "description": "Source's Admin Secret.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ADMIN_SECRET>" - }, - "in": "query" - }, - { - "name": "database", - "description": "Source's Database Name.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE>" - }, - "in": "query" - }, - { - "name": "username", - "description": "Source's Database Username.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USERNAME>" - }, - "in": "query" - }, - { - "name": "password", - "description": "Source's Database Password.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PASSWORD>" - }, - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5432 - }, - "in": "query" - } - ] - } - }, - "\/migrations\/supabase": { - "post": { - "summary": "Create Supabase migration", - "operationId": "migrationsCreateSupabaseMigration", - "tags": [ - "migrations" - ], - "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSupabaseMigration", - "group": null, - "weight": 586, - "cookies": false, - "type": "", - "demo": "migrations\/create-supabase-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "SupabaseMigrationResource", - "x-enum-keys": [] - } - }, - "endpoint": { - "type": "string", - "description": "Source's Supabase Endpoint", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "apiKey": { - "type": "string", - "description": "Source's API Key", - "x-example": "<API_KEY>" - }, - "databaseHost": { - "type": "string", - "description": "Source's Database Host", - "x-example": "<DATABASE_HOST>" - }, - "username": { - "type": "string", - "description": "Source's Database Username", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Source's Database Password", - "x-example": "<PASSWORD>" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "x-example": null, - "format": "int32" - } - }, - "required": [ - "resources", - "endpoint", - "apiKey", - "databaseHost", - "username", - "password" - ] - } - } - } - } - } - }, - "\/migrations\/supabase\/report": { - "get": { - "summary": "Get Supabase migration report", - "operationId": "migrationsGetSupabaseReport", - "tags": [ - "migrations" - ], - "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", - "responses": { - "200": { - "description": "Migration Report", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migrationReport" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSupabaseReport", - "group": null, - "weight": 587, - "cookies": false, - "type": "", - "demo": "migrations\/get-supabase-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "SupabaseMigrationResource", - "x-enum-keys": [] - } - }, - "in": "query" - }, - { - "name": "endpoint", - "description": "Source's Supabase Endpoint.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "apiKey", - "description": "Source's API Key.", - "required": true, - "schema": { - "type": "string", - "x-example": "<API_KEY>" - }, - "in": "query" - }, - { - "name": "databaseHost", - "description": "Source's Database Host.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_HOST>" - }, - "in": "query" - }, - { - "name": "username", - "description": "Source's Database Username.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USERNAME>" - }, - "in": "query" - }, - { - "name": "password", - "description": "Source's Database Password.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PASSWORD>" - }, - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5432 - }, - "in": "query" - } - ] - } - }, - "\/migrations\/{migrationId}": { - "get": { - "summary": "Get migration", - "operationId": "migrationsGet", - "tags": [ - "migrations" - ], - "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", - "responses": { - "200": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 579, - "cookies": false, - "type": "", - "demo": "migrations\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MIGRATION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update retry migration", - "operationId": "migrationsRetry", - "tags": [ - "migrations" - ], - "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", - "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "retry", - "group": null, - "weight": 580, - "cookies": false, - "type": "", - "demo": "migrations\/retry.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MIGRATION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete migration", - "operationId": "migrationsDelete", - "tags": [ - "migrations" - ], - "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 581, - "cookies": false, - "type": "", - "demo": "migrations\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MIGRATION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesListPresences", - "tags": [ - "presences" - ], - "description": "List presence logs.", - "responses": { - "200": { - "description": "Presences List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presenceList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPresences", - "group": "presences", - "weight": 416, - "cookies": false, - "type": "", - "demo": "presences\/list-presences.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/presences\/usage": { - "get": { - "summary": "Get presence usage", - "operationId": "presencesGetUsage", - "tags": [ - "presences" - ], - "description": "Get presence usage metrics and statistics, including the current total of online users and historical online user counts for the selected time range.", - "responses": { - "200": { - "description": "UsagePresence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usagePresence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 414, - "cookies": false, - "type": "", - "demo": "presences\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGetPresence", - "tags": [ - "presences" - ], - "description": "Get a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPresence", - "group": "presences", - "weight": 415, - "cookies": false, - "type": "", - "demo": "presences\/get-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsertPresence", - "tags": [ - "presences" - ], - "description": "Create or update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertPresence", - "group": "presences", - "weight": 413, - "cookies": false, - "type": "", - "demo": "presences\/upsert-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "upsertPresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "userId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "", - "demo": "presences\/upsert-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "x-example": "{}" - } - }, - "required": [ - "status" - ] - } - } - } - } - }, - "patch": { - "summary": "Update presence", - "operationId": "presencesUpdatePresence", - "tags": [ - "presences" - ], - "description": "Update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePresence", - "group": "presences", - "weight": 417, - "cookies": false, - "type": "", - "demo": "presences\/update-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "updatePresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "expiresAt", - "metadata", - "permissions" - ], - "required": [ - "presenceId", - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "", - "demo": "presences\/update-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>", - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "x-example": "{}", - "x-nullable": true - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDeletePresence", - "tags": [ - "presences" - ], - "description": "Delete a presence log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePresence", - "group": "presences", - "weight": 418, - "cookies": false, - "type": "", - "demo": "presences\/delete-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/project": { - "delete": { - "summary": "Delete project", - "operationId": "projectDelete", - "tags": [ - "project" - ], - "description": "Delete a project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 594, - "cookies": false, - "type": "", - "demo": "project\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/auth-methods\/{methodId}": { - "patch": { - "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", - "operationId": "projectUpdateAuthMethod", - "tags": [ - "project" - ], - "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAuthMethod", - "group": null, - "weight": 643, - "cookies": false, - "type": "", - "demo": "project\/update-auth-method.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "methodId", - "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", - "required": true, - "schema": { - "type": "string", - "x-example": "email-password", - "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Auth method status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/keys": { - "get": { - "summary": "List project keys", - "operationId": "projectListKeys", - "tags": [ - "project" - ], - "description": "Get a list of all API keys from the current project.", - "responses": { - "200": { - "description": "API Keys List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/keyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listKeys", - "group": "keys", - "weight": 610, - "cookies": false, - "type": "", - "demo": "project\/list-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project key", - "operationId": "projectCreateKey", - "tags": [ - "project" - ], - "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", - "responses": { - "201": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createKey", - "group": "keys", - "weight": 608, - "cookies": false, - "type": "", - "demo": "project\/create-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<KEY_ID>" - }, - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "keyId", - "name", - "scopes" - ] - } - } - } - } - } - }, - "\/project\/keys\/ephemeral": { - "post": { - "summary": "Create ephemeral project key", - "operationId": "projectCreateEphemeralKey", - "tags": [ - "project" - ], - "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", - "responses": { - "201": { - "description": "Ephemeral Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/ephemeralKey" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEphemeralKey", - "group": "keys", - "weight": 609, - "cookies": false, - "type": "", - "demo": "project\/create-ephemeral-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "duration": { - "type": "integer", - "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", - "x-example": 1, - "format": "int32" - } - }, - "required": [ - "scopes", - "duration" - ] - } - } - } - } - } - }, - "\/project\/keys\/{keyId}": { - "get": { - "summary": "Get project key", - "operationId": "projectGetKey", - "tags": [ - "project" - ], - "description": "Get a key by its unique ID. ", - "responses": { - "200": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getKey", - "group": "keys", - "weight": 611, - "cookies": false, - "type": "", - "demo": "project\/get-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update project key", - "operationId": "projectUpdateKey", - "tags": [ - "project" - ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", - "responses": { - "200": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateKey", - "group": "keys", - "weight": 613, - "cookies": false, - "type": "", - "demo": "project\/update-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "name", - "scopes" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete project key", - "operationId": "projectDeleteKey", - "tags": [ - "project" - ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteKey", - "group": "keys", - "weight": 612, - "cookies": false, - "type": "", - "demo": "project\/delete-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/project\/labels": { - "put": { - "summary": "Update project labels", - "operationId": "projectUpdateLabels", - "tags": [ - "project" - ], - "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": null, - "weight": 595, - "cookies": false, - "type": "", - "demo": "project\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - } - } - } - }, - "\/project\/mock-phones": { - "get": { - "summary": "List project mock phones", - "operationId": "projectListMockPhones", - "tags": [ - "project" - ], - "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", - "responses": { - "200": { - "description": "Mock Numbers List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumberList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMockPhones", - "group": "mocks", - "weight": 628, - "cookies": false, - "type": "", - "demo": "project\/list-mock-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project mock phone", - "operationId": "projectCreateMockPhone", - "tags": [ - "project" - ], - "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", - "responses": { - "201": { - "description": "Mock Number", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMockPhone", - "group": "mocks", - "weight": 627, - "cookies": false, - "type": "", - "demo": "project\/create-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", - "x-example": "+12065550100", - "format": "phone" - }, - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "x-example": "<OTP>" - } - }, - "required": [ - "number", - "otp" - ] - } - } - } - } - } - }, - "\/project\/mock-phones\/{number}": { - "get": { - "summary": "Get project mock phone", - "operationId": "projectGetMockPhone", - "tags": [ - "project" - ], - "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMockPhone", - "group": "mocks", - "weight": 629, - "cookies": false, - "type": "", - "demo": "project\/get-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", - "tags": [ - "project" - ], - "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMockPhone", - "group": "mocks", - "weight": 630, - "cookies": false, - "type": "", - "demo": "project\/update-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", - "tags": [ - "project" - ], - "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMockPhone", - "group": "mocks", - "weight": 631, - "cookies": false, - "type": "", - "demo": "project\/delete-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ] - } - }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", - "tags": [ - "project" - ], - "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2 Providers List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2ProviderList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listOAuth2Providers", - "group": "oauth2", - "weight": 644, - "cookies": false, - "type": "", - "demo": "project\/list-o-auth-2-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/oauth2\/amazon": { - "patch": { - "summary": "Update project OAuth2 Amazon", - "operationId": "projectUpdateOAuth2Amazon", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Amazon configuration.", - "responses": { - "200": { - "description": "OAuth2Amazon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Amazon", - "group": "oauth2", - "weight": 671, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-amazon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/apple": { - "patch": { - "summary": "Update project OAuth2 Apple", - "operationId": "projectUpdateOAuth2Apple", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Apple configuration.", - "responses": { - "200": { - "description": "OAuth2Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Apple" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Apple", - "group": "oauth2", - "weight": 686, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-apple.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "serviceId": { - "type": "string", - "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", - "x-example": "<SERVICE_ID>", - "x-nullable": true - }, - "keyId": { - "type": "string", - "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", - "x-example": "<KEY_ID>", - "x-nullable": true - }, - "teamId": { - "type": "string", - "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", - "x-example": "<TEAM_ID>", - "x-nullable": true - }, - "p8File": { - "type": "string", - "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", - "x-example": "<P8_FILE>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/auth0": { - "patch": { - "summary": "Update project OAuth2 Auth0", - "operationId": "projectUpdateOAuth2Auth0", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Auth0 configuration.", - "responses": { - "200": { - "description": "OAuth2Auth0", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Auth0", - "group": "oauth2", - "weight": 680, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-auth-0.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Auth0 instance. For example: example.us.auth0.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/authentik": { - "patch": { - "summary": "Update project OAuth2 Authentik", - "operationId": "projectUpdateOAuth2Authentik", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Authentik configuration.", - "responses": { - "200": { - "description": "OAuth2Authentik", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Authentik", - "group": "oauth2", - "weight": 679, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-authentik.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Authentik instance. For example: example.authentik.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/autodesk": { - "patch": { - "summary": "Update project OAuth2 Autodesk", - "operationId": "projectUpdateOAuth2Autodesk", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Autodesk configuration.", - "responses": { - "200": { - "description": "OAuth2Autodesk", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Autodesk", - "group": "oauth2", - "weight": 654, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-autodesk.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/bitbucket": { - "patch": { - "summary": "Update project OAuth2 Bitbucket", - "operationId": "projectUpdateOAuth2Bitbucket", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitbucket configuration.", - "responses": { - "200": { - "description": "OAuth2Bitbucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitbucket", - "group": "oauth2", - "weight": 651, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitbucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", - "x-example": "<KEY>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", - "x-example": "<SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/bitly": { - "patch": { - "summary": "Update project OAuth2 Bitly", - "operationId": "projectUpdateOAuth2Bitly", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitly configuration.", - "responses": { - "200": { - "description": "OAuth2Bitly", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitly", - "group": "oauth2", - "weight": 652, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitly.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/box": { - "patch": { - "summary": "Update project OAuth2 Box", - "operationId": "projectUpdateOAuth2Box", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Box configuration.", - "responses": { - "200": { - "description": "OAuth2Box", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Box" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Box", - "group": "oauth2", - "weight": 653, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-box.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/dailymotion": { - "patch": { - "summary": "Update project OAuth2 Dailymotion", - "operationId": "projectUpdateOAuth2Dailymotion", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dailymotion configuration.", - "responses": { - "200": { - "description": "OAuth2Dailymotion", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dailymotion", - "group": "oauth2", - "weight": 650, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dailymotion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", - "x-example": "<API_KEY>", - "x-nullable": true - }, - "apiSecret": { - "type": "string", - "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", - "x-example": "<API_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/discord": { - "patch": { - "summary": "Update project OAuth2 Discord", - "operationId": "projectUpdateOAuth2Discord", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Discord configuration.", - "responses": { - "200": { - "description": "OAuth2Discord", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Discord" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Discord", - "group": "oauth2", - "weight": 647, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-discord.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/disqus": { - "patch": { - "summary": "Update project OAuth2 Disqus", - "operationId": "projectUpdateOAuth2Disqus", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Disqus configuration.", - "responses": { - "200": { - "description": "OAuth2Disqus", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Disqus", - "group": "oauth2", - "weight": 670, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-disqus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "publicKey": { - "type": "string", - "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "x-example": "<PUBLIC_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/dropbox": { - "patch": { - "summary": "Update project OAuth2 Dropbox", - "operationId": "projectUpdateOAuth2Dropbox", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dropbox configuration.", - "responses": { - "200": { - "description": "OAuth2Dropbox", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dropbox", - "group": "oauth2", - "weight": 649, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dropbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "appKey": { - "type": "string", - "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", - "x-example": "<APP_KEY>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/etsy": { - "patch": { - "summary": "Update project OAuth2 Etsy", - "operationId": "projectUpdateOAuth2Etsy", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Etsy configuration.", - "responses": { - "200": { - "description": "OAuth2Etsy", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Etsy", - "group": "oauth2", - "weight": 672, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-etsy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyString": { - "type": "string", - "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", - "x-example": "<KEY_STRING>", - "x-nullable": true - }, - "sharedSecret": { - "type": "string", - "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", - "x-example": "<SHARED_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/facebook": { - "patch": { - "summary": "Update project OAuth2 Facebook", - "operationId": "projectUpdateOAuth2Facebook", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Facebook configuration.", - "responses": { - "200": { - "description": "OAuth2Facebook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Facebook", - "group": "oauth2", - "weight": 673, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-facebook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "appId": { - "type": "string", - "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", - "x-example": "<APP_ID>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/figma": { - "patch": { - "summary": "Update project OAuth2 Figma", - "operationId": "projectUpdateOAuth2Figma", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Figma configuration.", - "responses": { - "200": { - "description": "OAuth2Figma", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Figma" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Figma", - "group": "oauth2", - "weight": 648, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-figma.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/fusionauth": { - "patch": { - "summary": "Update project OAuth2 FusionAuth", - "operationId": "projectUpdateOAuth2FusionAuth", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 FusionAuth configuration.", - "responses": { - "200": { - "description": "OAuth2FusionAuth", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2FusionAuth", - "group": "oauth2", - "weight": 681, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-fusion-auth.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/github": { - "patch": { - "summary": "Update project OAuth2 GitHub", - "operationId": "projectUpdateOAuth2GitHub", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 GitHub configuration.", - "responses": { - "200": { - "description": "OAuth2GitHub", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Github" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2GitHub", - "group": "oauth2", - "weight": 646, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-git-hub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/gitlab": { - "patch": { - "summary": "Update project OAuth2 Gitlab", - "operationId": "projectUpdateOAuth2Gitlab", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Gitlab configuration.", - "responses": { - "200": { - "description": "OAuth2Gitlab", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Gitlab", - "group": "oauth2", - "weight": 678, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-gitlab.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "x-example": "<SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/google": { - "patch": { - "summary": "Update project OAuth2 Google", - "operationId": "projectUpdateOAuth2Google", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Google configuration.", - "responses": { - "200": { - "description": "OAuth2Google", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Google" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Google", - "group": "oauth2", - "weight": 655, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-google.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/keycloak": { - "patch": { - "summary": "Update project OAuth2 Keycloak", - "operationId": "projectUpdateOAuth2Keycloak", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Keycloak configuration.", - "responses": { - "200": { - "description": "OAuth2Keycloak", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Keycloak", - "group": "oauth2", - "weight": 682, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-keycloak.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Keycloak instance. For example: keycloak.example.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "realmName": { - "type": "string", - "description": "Keycloak realm name. For example: appwrite-realm", - "x-example": "<REALM_NAME>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/kick": { - "patch": { - "summary": "Update project OAuth2 Kick", - "operationId": "projectUpdateOAuth2Kick", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Kick configuration.", - "responses": { - "200": { - "description": "OAuth2Kick", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Kick" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Kick", - "group": "oauth2", - "weight": 685, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-kick.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/linkedin": { - "patch": { - "summary": "Update project OAuth2 Linkedin", - "operationId": "projectUpdateOAuth2Linkedin", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Linkedin configuration.", - "responses": { - "200": { - "description": "OAuth2Linkedin", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Linkedin", - "group": "oauth2", - "weight": 669, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-linkedin.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "primaryClientSecret": { - "type": "string", - "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", - "x-example": "<PRIMARY_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/microsoft": { - "patch": { - "summary": "Update project OAuth2 Microsoft", - "operationId": "projectUpdateOAuth2Microsoft", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Microsoft configuration.", - "responses": { - "200": { - "description": "OAuth2Microsoft", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Microsoft", - "group": "oauth2", - "weight": 687, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-microsoft.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "applicationSecret": { - "type": "string", - "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "x-example": "<APPLICATION_SECRET>", - "x-nullable": true - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", - "x-example": "<TENANT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/notion": { - "patch": { - "summary": "Update project OAuth2 Notion", - "operationId": "projectUpdateOAuth2Notion", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Notion configuration.", - "responses": { - "200": { - "description": "OAuth2Notion", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Notion" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Notion", - "group": "oauth2", - "weight": 666, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-notion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "oauthClientId": { - "type": "string", - "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", - "x-example": "<OAUTH_CLIENT_ID>", - "x-nullable": true - }, - "oauthClientSecret": { - "type": "string", - "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", - "x-example": "<OAUTH_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/oidc": { - "patch": { - "summary": "Update project OAuth2 Oidc", - "operationId": "projectUpdateOAuth2Oidc", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Oidc configuration.", - "responses": { - "200": { - "description": "OAuth2Oidc", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Oidc", - "group": "oauth2", - "weight": 683, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-oidc.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/okta": { - "patch": { - "summary": "Update project OAuth2 Okta", - "operationId": "projectUpdateOAuth2Okta", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Okta configuration.", - "responses": { - "200": { - "description": "OAuth2Okta", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Okta" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Okta", - "group": "oauth2", - "weight": 684, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-okta.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "domain": { - "type": "string", - "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", - "x-example": null, - "x-nullable": true - }, - "authorizationServerId": { - "type": "string", - "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", - "x-example": "<AUTHORIZATION_SERVER_ID>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/paypal": { - "patch": { - "summary": "Update project OAuth2 Paypal", - "operationId": "projectUpdateOAuth2Paypal", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Paypal configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Paypal", - "group": "oauth2", - "weight": 676, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/paypalSandbox": { - "patch": { - "summary": "Update project OAuth2 PaypalSandbox", - "operationId": "projectUpdateOAuth2PaypalSandbox", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 PaypalSandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2PaypalSandbox", - "group": "oauth2", - "weight": 677, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/podio": { - "patch": { - "summary": "Update project OAuth2 Podio", - "operationId": "projectUpdateOAuth2Podio", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Podio configuration.", - "responses": { - "200": { - "description": "OAuth2Podio", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Podio" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Podio", - "group": "oauth2", - "weight": 665, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-podio.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/salesforce": { - "patch": { - "summary": "Update project OAuth2 Salesforce", - "operationId": "projectUpdateOAuth2Salesforce", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Salesforce configuration.", - "responses": { - "200": { - "description": "OAuth2Salesforce", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Salesforce", - "group": "oauth2", - "weight": 667, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-salesforce.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "customerSecret": { - "type": "string", - "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", - "x-example": "<CUSTOMER_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/slack": { - "patch": { - "summary": "Update project OAuth2 Slack", - "operationId": "projectUpdateOAuth2Slack", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Slack configuration.", - "responses": { - "200": { - "description": "OAuth2Slack", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Slack" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Slack", - "group": "oauth2", - "weight": 664, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-slack.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/spotify": { - "patch": { - "summary": "Update project OAuth2 Spotify", - "operationId": "projectUpdateOAuth2Spotify", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Spotify configuration.", - "responses": { - "200": { - "description": "OAuth2Spotify", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Spotify", - "group": "oauth2", - "weight": 663, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-spotify.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/stripe": { - "patch": { - "summary": "Update project OAuth2 Stripe", - "operationId": "projectUpdateOAuth2Stripe", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Stripe configuration.", - "responses": { - "200": { - "description": "OAuth2Stripe", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Stripe", - "group": "oauth2", - "weight": 662, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-stripe.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "apiSecretKey": { - "type": "string", - "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", - "x-example": "<API_SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/tradeshift": { - "patch": { - "summary": "Update project OAuth2 Tradeshift", - "operationId": "projectUpdateOAuth2Tradeshift", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Tradeshift", - "group": "oauth2", - "weight": 674, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/tradeshiftBox": { - "patch": { - "summary": "Update project OAuth2 Tradeshift Sandbox", - "operationId": "projectUpdateOAuth2TradeshiftSandbox", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2TradeshiftSandbox", - "group": "oauth2", - "weight": 675, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/twitch": { - "patch": { - "summary": "Update project OAuth2 Twitch", - "operationId": "projectUpdateOAuth2Twitch", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Twitch configuration.", - "responses": { - "200": { - "description": "OAuth2Twitch", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Twitch", - "group": "oauth2", - "weight": 661, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-twitch.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/wordpress": { - "patch": { - "summary": "Update project OAuth2 WordPress", - "operationId": "projectUpdateOAuth2WordPress", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 WordPress configuration.", - "responses": { - "200": { - "description": "OAuth2WordPress", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2WordPress", - "group": "oauth2", - "weight": 660, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-word-press.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/x": { - "patch": { - "summary": "Update project OAuth2 X", - "operationId": "projectUpdateOAuth2X", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 X configuration.", - "responses": { - "200": { - "description": "OAuth2X", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2X" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2X", - "group": "oauth2", - "weight": 659, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2x.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/yahoo": { - "patch": { - "summary": "Update project OAuth2 Yahoo", - "operationId": "projectUpdateOAuth2Yahoo", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yahoo configuration.", - "responses": { - "200": { - "description": "OAuth2Yahoo", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yahoo", - "group": "oauth2", - "weight": 668, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yahoo.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/yandex": { - "patch": { - "summary": "Update project OAuth2 Yandex", - "operationId": "projectUpdateOAuth2Yandex", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yandex configuration.", - "responses": { - "200": { - "description": "OAuth2Yandex", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yandex", - "group": "oauth2", - "weight": 658, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yandex.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/zoho": { - "patch": { - "summary": "Update project OAuth2 Zoho", - "operationId": "projectUpdateOAuth2Zoho", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoho configuration.", - "responses": { - "200": { - "description": "OAuth2Zoho", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoho", - "group": "oauth2", - "weight": 657, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoho.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/zoom": { - "patch": { - "summary": "Update project OAuth2 Zoom", - "operationId": "projectUpdateOAuth2Zoom", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoom configuration.", - "responses": { - "200": { - "description": "OAuth2Zoom", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoom", - "group": "oauth2", - "weight": 656, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoom.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/{provider}": { - "get": { - "summary": "Get project OAuth2 provider", - "operationId": "projectGetOAuth2Provider", - "tags": [ - "project" - ], - "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/oAuth2Github" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Discord" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Figma" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Box" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Google" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - }, - { - "$ref": "#\/components\/schemas\/oAuth2X" - }, - { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Slack" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Podio" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Notion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - }, - { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Apple" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Okta" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Kick" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/components\/schemas\/oAuth2Github", - "discord": "#\/components\/schemas\/oAuth2Discord", - "figma": "#\/components\/schemas\/oAuth2Figma", - "dropbox": "#\/components\/schemas\/oAuth2Dropbox", - "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", - "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", - "bitly": "#\/components\/schemas\/oAuth2Bitly", - "box": "#\/components\/schemas\/oAuth2Box", - "autodesk": "#\/components\/schemas\/oAuth2Autodesk", - "google": "#\/components\/schemas\/oAuth2Google", - "zoom": "#\/components\/schemas\/oAuth2Zoom", - "zoho": "#\/components\/schemas\/oAuth2Zoho", - "yandex": "#\/components\/schemas\/oAuth2Yandex", - "x": "#\/components\/schemas\/oAuth2X", - "wordpress": "#\/components\/schemas\/oAuth2WordPress", - "twitch": "#\/components\/schemas\/oAuth2Twitch", - "stripe": "#\/components\/schemas\/oAuth2Stripe", - "spotify": "#\/components\/schemas\/oAuth2Spotify", - "slack": "#\/components\/schemas\/oAuth2Slack", - "podio": "#\/components\/schemas\/oAuth2Podio", - "notion": "#\/components\/schemas\/oAuth2Notion", - "salesforce": "#\/components\/schemas\/oAuth2Salesforce", - "yahoo": "#\/components\/schemas\/oAuth2Yahoo", - "linkedin": "#\/components\/schemas\/oAuth2Linkedin", - "disqus": "#\/components\/schemas\/oAuth2Disqus", - "amazon": "#\/components\/schemas\/oAuth2Amazon", - "etsy": "#\/components\/schemas\/oAuth2Etsy", - "facebook": "#\/components\/schemas\/oAuth2Facebook", - "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", - "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", - "paypal": "#\/components\/schemas\/oAuth2Paypal", - "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", - "gitlab": "#\/components\/schemas\/oAuth2Gitlab", - "authentik": "#\/components\/schemas\/oAuth2Authentik", - "auth0": "#\/components\/schemas\/oAuth2Auth0", - "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", - "keycloak": "#\/components\/schemas\/oAuth2Keycloak", - "oidc": "#\/components\/schemas\/oAuth2Oidc", - "apple": "#\/components\/schemas\/oAuth2Apple", - "okta": "#\/components\/schemas\/oAuth2Okta", - "kick": "#\/components\/schemas\/oAuth2Kick", - "microsoft": "#\/components\/schemas\/oAuth2Microsoft" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getOAuth2Provider", - "group": "oauth2", - "weight": 645, - "cookies": false, - "type": "", - "demo": "project\/get-o-auth-2-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 provider key. For example: github, google, apple.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER>" - }, - "in": "path" - } - ] - } - }, - "\/project\/platforms": { - "get": { - "summary": "List project platforms", - "operationId": "projectListPlatforms", - "tags": [ - "project" - ], - "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", - "responses": { - "200": { - "description": "Platforms List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPlatforms", - "group": "platforms", - "weight": 626, - "cookies": false, - "type": "", - "demo": "project\/list-platforms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/project\/platforms\/android": { - "post": { - "summary": "Create project Android platform", - "operationId": "projectCreateAndroidPlatform", - "tags": [ - "project" - ], - "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Android", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformAndroid" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAndroidPlatform", - "group": "platforms", - "weight": 622, - "cookies": false, - "type": "", - "demo": "project\/create-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "platformId", - "name", - "applicationId" - ] - } - } - } - } - } - }, - "\/project\/platforms\/android\/{platformId}": { - "put": { - "summary": "Update project Android platform", - "operationId": "projectUpdateAndroidPlatform", - "tags": [ - "project" - ], - "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", - "responses": { - "200": { - "description": "Platform Android", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformAndroid" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAndroidPlatform", - "group": "platforms", - "weight": 617, - "cookies": false, - "type": "", - "demo": "project\/update-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "name", - "applicationId" - ] - } - } - } - } - } - }, - "\/project\/platforms\/apple": { - "post": { - "summary": "Create project Apple platform", - "operationId": "projectCreateApplePlatform", - "tags": [ - "project" - ], - "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformApple" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createApplePlatform", - "group": "platforms", - "weight": 621, - "cookies": false, - "type": "", - "demo": "project\/create-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "platformId", - "name", - "bundleIdentifier" - ] - } - } - } - } - } - }, - "\/project\/platforms\/apple\/{platformId}": { - "put": { - "summary": "Update project Apple platform", - "operationId": "projectUpdateApplePlatform", - "tags": [ - "project" - ], - "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", - "responses": { - "200": { - "description": "Platform Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformApple" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateApplePlatform", - "group": "platforms", - "weight": 616, - "cookies": false, - "type": "", - "demo": "project\/update-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "name", - "bundleIdentifier" - ] - } - } - } - } - } - }, - "\/project\/platforms\/linux": { - "post": { - "summary": "Create project Linux platform", - "operationId": "projectCreateLinuxPlatform", - "tags": [ - "project" - ], - "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Linux", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformLinux" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLinuxPlatform", - "group": "platforms", - "weight": 624, - "cookies": false, - "type": "", - "demo": "project\/create-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/linux\/{platformId}": { - "put": { - "summary": "Update project Linux platform", - "operationId": "projectUpdateLinuxPlatform", - "tags": [ - "project" - ], - "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", - "responses": { - "200": { - "description": "Platform Linux", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformLinux" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLinuxPlatform", - "group": "platforms", - "weight": 619, - "cookies": false, - "type": "", - "demo": "project\/update-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "name", - "packageName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/web": { - "post": { - "summary": "Create project web platform", - "operationId": "projectCreateWebPlatform", - "tags": [ - "project" - ], - "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Web", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWeb" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWebPlatform", - "group": "platforms", - "weight": 620, - "cookies": false, - "type": "", - "demo": "project\/create-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "x-example": "app.example.com" - } - }, - "required": [ - "platformId", - "name", - "hostname" - ] - } - } - } - } - } - }, - "\/project\/platforms\/web\/{platformId}": { - "put": { - "summary": "Update project web platform", - "operationId": "projectUpdateWebPlatform", - "tags": [ - "project" - ], - "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", - "responses": { - "200": { - "description": "Platform Web", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWeb" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWebPlatform", - "group": "platforms", - "weight": 615, - "cookies": false, - "type": "", - "demo": "project\/update-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "x-example": "app.example.com" - } - }, - "required": [ - "name", - "hostname" - ] - } - } - } - } - } - }, - "\/project\/platforms\/windows": { - "post": { - "summary": "Create project Windows platform", - "operationId": "projectCreateWindowsPlatform", - "tags": [ - "project" - ], - "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Windows", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWindows" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWindowsPlatform", - "group": "platforms", - "weight": 623, - "cookies": false, - "type": "", - "demo": "project\/create-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageIdentifierName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/windows\/{platformId}": { - "put": { - "summary": "Update project Windows platform", - "operationId": "projectUpdateWindowsPlatform", - "tags": [ - "project" - ], - "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", - "responses": { - "200": { - "description": "Platform Windows", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWindows" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWindowsPlatform", - "group": "platforms", - "weight": 618, - "cookies": false, - "type": "", - "demo": "project\/update-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "name", - "packageIdentifierName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/{platformId}": { - "get": { - "summary": "Get project platform", - "operationId": "projectGetPlatform", - "tags": [ - "project" - ], - "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", - "responses": { - "200": { - "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPlatform", - "group": "platforms", - "weight": 625, - "cookies": false, - "type": "", - "demo": "project\/get-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete project platform", - "operationId": "projectDeletePlatform", - "tags": [ - "project" - ], - "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePlatform", - "group": "platforms", - "weight": 614, - "cookies": false, - "type": "", - "demo": "project\/delete-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ] - } - }, - "\/project\/policies": { - "get": { - "summary": "List project policies", - "operationId": "projectListPolicies", - "tags": [ - "project" - ], - "description": "Get a list of all project policies and their current configuration.", - "responses": { - "200": { - "description": "Policies List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/policyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPolicies", - "group": "policies", - "weight": 632, - "cookies": false, - "type": "", - "demo": "project\/list-policies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/project\/policies\/membership-privacy": { - "patch": { - "summary": "Update membership privacy policy", - "operationId": "projectUpdateMembershipPrivacyPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipPrivacyPolicy", - "group": "policies", - "weight": 634, - "cookies": false, - "type": "", - "demo": "project\/update-membership-privacy-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "boolean", - "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", - "x-example": false - }, - "userEmail": { - "type": "boolean", - "description": "Set to true if you want make user email visible to all team members, or false to hide it.", - "x-example": false - }, - "userPhone": { - "type": "boolean", - "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", - "x-example": false - }, - "userName": { - "type": "boolean", - "description": "Set to true if you want make user name visible to all team members, or false to hide it.", - "x-example": false - }, - "userMFA": { - "type": "boolean", - "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", - "x-example": false - } - } - } - } - } - } - } - }, - "\/project\/policies\/password-dictionary": { - "patch": { - "summary": "Update password dictionary policy", - "operationId": "projectUpdatePasswordDictionaryPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordDictionaryPolicy", - "group": "policies", - "weight": 635, - "cookies": false, - "type": "", - "demo": "project\/update-password-dictionary-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/password-history": { - "patch": { - "summary": "Update password history policy", - "operationId": "projectUpdatePasswordHistoryPolicy", - "tags": [ - "project" - ], - "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordHistoryPolicy", - "group": "policies", - "weight": 636, - "cookies": false, - "type": "", - "demo": "project\/update-password-history-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/password-personal-data": { - "patch": { - "summary": "Update password personal data policy", - "operationId": "projectUpdatePasswordPersonalDataPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordPersonalDataPolicy", - "group": "policies", - "weight": 637, - "cookies": false, - "type": "", - "demo": "project\/update-password-personal-data-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-alert": { - "patch": { - "summary": "Update session alert policy", - "operationId": "projectUpdateSessionAlertPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionAlertPolicy", - "group": "policies", - "weight": 638, - "cookies": false, - "type": "", - "demo": "project\/update-session-alert-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-duration": { - "patch": { - "summary": "Update session duration policy", - "operationId": "projectUpdateSessionDurationPolicy", - "tags": [ - "project" - ], - "description": "Update maximum duration how long sessions created within a project should stay active for.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionDurationPolicy", - "group": "policies", - "weight": 639, - "cookies": false, - "type": "", - "demo": "project\/update-session-duration-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "duration" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-invalidation": { - "patch": { - "summary": "Update session invalidation policy", - "operationId": "projectUpdateSessionInvalidationPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionInvalidationPolicy", - "group": "policies", - "weight": 640, - "cookies": false, - "type": "", - "demo": "project\/update-session-invalidation-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-limit": { - "patch": { - "summary": "Update session limit policy", - "operationId": "projectUpdateSessionLimitPolicy", - "tags": [ - "project" - ], - "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionLimitPolicy", - "group": "policies", - "weight": 641, - "cookies": false, - "type": "", - "demo": "project\/update-session-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/user-limit": { - "patch": { - "summary": "Update user limit policy", - "operationId": "projectUpdateUserLimitPolicy", - "tags": [ - "project" - ], - "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUserLimitPolicy", - "group": "policies", - "weight": 642, - "cookies": false, - "type": "", - "demo": "project\/update-user-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/{policyId}": { - "get": { - "summary": "Get project policy", - "operationId": "projectGetPolicy", - "tags": [ - "project" - ], - "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", - "responses": { - "200": { - "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/policyPasswordDictionary" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordHistory" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordPersonalData" - }, - { - "$ref": "#\/components\/schemas\/policySessionAlert" - }, - { - "$ref": "#\/components\/schemas\/policySessionDuration" - }, - { - "$ref": "#\/components\/schemas\/policySessionInvalidation" - }, - { - "$ref": "#\/components\/schemas\/policySessionLimit" - }, - { - "$ref": "#\/components\/schemas\/policyUserLimit" - }, - { - "$ref": "#\/components\/schemas\/policyMembershipPrivacy" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", - "password-history": "#\/components\/schemas\/policyPasswordHistory", - "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", - "session-alert": "#\/components\/schemas\/policySessionAlert", - "session-duration": "#\/components\/schemas\/policySessionDuration", - "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", - "session-limit": "#\/components\/schemas\/policySessionLimit", - "user-limit": "#\/components\/schemas\/policyUserLimit", - "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPolicy", - "group": "policies", - "weight": 633, - "cookies": false, - "type": "", - "demo": "project\/get-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", - "required": true, - "schema": { - "type": "string", - "x-example": "password-dictionary", - "enum": [ - "password-dictionary", - "password-history", - "password-personal-data", - "session-alert", - "session-duration", - "session-invalidation", - "session-limit", - "user-limit", - "membership-privacy" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/project\/protocols\/{protocolId}": { - "patch": { - "summary": "Update project protocol", - "operationId": "projectUpdateProtocol", - "tags": [ - "project" - ], - "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateProtocol", - "group": null, - "weight": 596, - "cookies": false, - "type": "", - "demo": "project\/update-protocol.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "protocolId", - "description": "Protocol name. Can be one of: rest, graphql, websocket", - "required": true, - "schema": { - "type": "string", - "x-example": "rest", - "enum": [ - "rest", - "graphql", - "websocket" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Protocol status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/services\/{serviceId}": { - "patch": { - "summary": "Update project service", - "operationId": "projectUpdateService", - "tags": [ - "project" - ], - "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateService", - "group": null, - "weight": 597, - "cookies": false, - "type": "", - "demo": "project\/update-service.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "serviceId", - "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", - "required": true, - "schema": { - "type": "string", - "x-example": "account", - "enum": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Service status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/smtp": { - "patch": { - "summary": "Update project SMTP configuration", - "operationId": "projectUpdateSMTP", - "tags": [ - "project" - ], - "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSMTP", - "group": "smtp", - "weight": 598, - "cookies": false, - "type": "", - "demo": "project\/update-smtp.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "SMTP server hostname (domain)", - "x-example": null, - "x-nullable": true - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "SMTP server username. Leave empty for no authorization.", - "x-example": "<USERNAME>", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", - "x-example": "<PASSWORD>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email address shown in inbox as the sender of the email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name shown in inbox as the sender of the email.", - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Email used when user replies to the email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Name used when user replies to the email.", - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - }, - "secure": { - "type": "string", - "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", - "x-example": "tls", - "enum": [ - "tls", - "ssl" - ], - "x-enum-name": null, - "x-enum-keys": [], - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/smtp\/tests": { - "post": { - "summary": "Create project SMTP test", - "operationId": "projectCreateSMTPTest", - "tags": [ - "project" - ], - "description": "Send a test email to verify SMTP configuration. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSMTPTest", - "group": "smtp", - "weight": 599, - "cookies": false, - "type": "", - "demo": "project\/create-smtp-test.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "emails" - ] - } - } - } - } - } - }, - "\/project\/templates\/email": { - "get": { - "summary": "List project email templates", - "operationId": "projectListEmailTemplates", - "tags": [ - "project" - ], - "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", - "responses": { - "200": { - "description": "Email Templates List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplateList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listEmailTemplates", - "group": "templates", - "weight": 600, - "cookies": false, - "type": "", - "demo": "project\/list-email-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "patch": { - "summary": "Update project email template", - "operationId": "projectUpdateEmailTemplate", - "tags": [ - "project" - ], - "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", - "responses": { - "200": { - "description": "EmailTemplate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailTemplate", - "group": "templates", - "weight": 602, - "cookies": false, - "type": "", - "demo": "project\/update-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [] - }, - "locale": { - "type": "string", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [] - }, - "subject": { - "type": "string", - "description": "Subject of the email template. Can be up to 255 characters.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "message": { - "type": "string", - "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", - "x-example": "<MESSAGE>", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name of the email sender.", - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Reply to name.", - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - } - }, - "required": [ - "templateId" - ] - } - } - } - } - } - }, - "\/project\/templates\/email\/{templateId}": { - "get": { - "summary": "Get project email template", - "operationId": "projectGetEmailTemplate", - "tags": [ - "project" - ], - "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", - "responses": { - "200": { - "description": "EmailTemplate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getEmailTemplate", - "group": "templates", - "weight": 601, - "cookies": false, - "type": "", - "demo": "project\/get-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "required": true, - "schema": { - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "locale", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "required": false, - "schema": { - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/project\/usage": { - "get": { - "summary": "Get project usage stats", - "operationId": "projectGetUsage", - "tags": [ - "project" - ], - "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", - "responses": { - "200": { - "description": "UsageProject", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageProject" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 61, - "cookies": false, - "type": "", - "demo": "project\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "startDate", - "description": "Starting date for the usage", - "required": true, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "in": "query" - }, - { - "name": "endDate", - "description": "End date for the usage", - "required": true, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "in": "query" - }, - { - "name": "period", - "description": "Period used", - "required": false, - "schema": { - "type": "string", - "x-example": "1h", - "enum": [ - "1h", - "1d" - ], - "x-enum-name": "ProjectUsageRange", - "x-enum-keys": [ - "One Hour", - "One Day" - ], - "default": "1d" - }, - "in": "query" - } - ] - } - }, - "\/project\/variables": { - "get": { - "summary": "List project variables", - "operationId": "projectListVariables", - "tags": [ - "project" - ], - "description": "Get a list of all project environment variables.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 604, - "cookies": false, - "type": "", - "demo": "project\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project variable", - "operationId": "projectCreateVariable", - "tags": [ - "project" - ], - "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 603, - "cookies": false, - "type": "", - "demo": "project\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<VARIABLE_ID>" - }, - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "x-example": false - } - }, - "required": [ - "variableId", - "key", - "value" - ] - } - } - } - } - } - }, - "\/project\/variables\/{variableId}": { - "get": { - "summary": "Get project variable", - "operationId": "projectGetVariable", - "tags": [ - "project" - ], - "description": "Get a variable by its unique ID. ", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 605, - "cookies": false, - "type": "", - "demo": "project\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update project variable", - "operationId": "projectUpdateVariable", - "tags": [ - "project" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 607, - "cookies": false, - "type": "", - "demo": "project\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>", - "x-nullable": true - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete project variable", - "operationId": "projectDeleteVariable", - "tags": [ - "project" - ], - "description": "Delete a variable by its unique ID. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 606, - "cookies": false, - "type": "", - "demo": "project\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/projects": { - "get": { - "summary": "List projects", - "operationId": "projectsList", - "tags": [ - "projects" - ], - "description": "Get a list of all projects. You can use the query params to filter your results. ", - "responses": { - "200": { - "description": "Projects List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/projectList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "projects", - "weight": 408, - "cookies": false, - "type": "", - "demo": "projects\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project", - "operationId": "projectsCreate", - "tags": [ - "projects" - ], - "description": "Create a new project. You can create a maximum of 100 projects per account. ", - "responses": { - "201": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "projects", - "weight": 406, - "cookies": false, - "type": "", - "demo": "projects\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "projectId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "teamId": { - "type": "string", - "description": "Team unique ID.", - "x-example": "<TEAM_ID>" - }, - "region": { - "type": "string", - "description": "Project Region.", - "x-example": "default", - "enum": [ - "default" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "x-example": "<DESCRIPTION>" - }, - "logo": { - "type": "string", - "description": "Project logo.", - "x-example": "<LOGO>" - }, - "url": { - "type": "string", - "description": "Project URL.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "legalName": { - "type": "string", - "description": "Project legal Name. Max length: 256 chars.", - "x-example": "<LEGAL_NAME>" - }, - "legalCountry": { - "type": "string", - "description": "Project legal Country. Max length: 256 chars.", - "x-example": "<LEGAL_COUNTRY>" - }, - "legalState": { - "type": "string", - "description": "Project legal State. Max length: 256 chars.", - "x-example": "<LEGAL_STATE>" - }, - "legalCity": { - "type": "string", - "description": "Project legal City. Max length: 256 chars.", - "x-example": "<LEGAL_CITY>" - }, - "legalAddress": { - "type": "string", - "description": "Project legal Address. Max length: 256 chars.", - "x-example": "<LEGAL_ADDRESS>" - }, - "legalTaxId": { - "type": "string", - "description": "Project legal Tax ID. Max length: 256 chars.", - "x-example": "<LEGAL_TAX_ID>" - } - }, - "required": [ - "projectId", - "name", - "teamId" - ] - } - } - } - } - } - }, - "\/projects\/{projectId}": { - "get": { - "summary": "Get project", - "operationId": "projectsGet", - "tags": [ - "projects" - ], - "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "projects", - "weight": 57, - "cookies": false, - "type": "", - "demo": "projects\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update project", - "operationId": "projectsUpdate", - "tags": [ - "projects" - ], - "description": "Update a project by its unique ID.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "projects", - "weight": 407, - "cookies": false, - "type": "", - "demo": "projects\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "x-example": "<DESCRIPTION>" - }, - "logo": { - "type": "string", - "description": "Project logo.", - "x-example": "<LOGO>" - }, - "url": { - "type": "string", - "description": "Project URL.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "legalName": { - "type": "string", - "description": "Project legal name. Max length: 256 chars.", - "x-example": "<LEGAL_NAME>" - }, - "legalCountry": { - "type": "string", - "description": "Project legal country. Max length: 256 chars.", - "x-example": "<LEGAL_COUNTRY>" - }, - "legalState": { - "type": "string", - "description": "Project legal state. Max length: 256 chars.", - "x-example": "<LEGAL_STATE>" - }, - "legalCity": { - "type": "string", - "description": "Project legal city. Max length: 256 chars.", - "x-example": "<LEGAL_CITY>" - }, - "legalAddress": { - "type": "string", - "description": "Project legal address. Max length: 256 chars.", - "x-example": "<LEGAL_ADDRESS>" - }, - "legalTaxId": { - "type": "string", - "description": "Project legal tax ID. Max length: 256 chars.", - "x-example": "<LEGAL_TAX_ID>" - } - }, - "required": [ - "name" - ] - } - } - } - } - } - }, - "\/projects\/{projectId}\/dev-keys": { - "get": { - "summary": "List dev keys", - "operationId": "projectsListDevKeys", - "tags": [ - "projects" - ], - "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", - "responses": { - "200": { - "description": "Dev Keys List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/devKeyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDevKeys", - "group": "devKeys", - "weight": 404, - "cookies": false, - "type": "", - "demo": "projects\/list-dev-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create dev key", - "operationId": "projectsCreateDevKey", - "tags": [ - "projects" - ], - "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", - "responses": { - "201": { - "description": "DevKey", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/devKey" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDevKey", - "group": "devKeys", - "weight": 401, - "cookies": false, - "type": "", - "demo": "projects\/create-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - } - }, - "required": [ - "name", - "expire" - ] - } - } - } - } - } - }, - "\/projects\/{projectId}\/dev-keys\/{keyId}": { - "get": { - "summary": "Get dev key", - "operationId": "projectsGetDevKey", - "tags": [ - "projects" - ], - "description": "Get a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", - "responses": { - "200": { - "description": "DevKey", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/devKey" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDevKey", - "group": "devKeys", - "weight": 403, - "cookies": false, - "type": "", - "demo": "projects\/get-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update dev key", - "operationId": "projectsUpdateDevKey", - "tags": [ - "projects" - ], - "description": "Update a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", - "responses": { - "200": { - "description": "DevKey", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/devKey" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDevKey", - "group": "devKeys", - "weight": 402, - "cookies": false, - "type": "", - "demo": "projects\/update-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - } - }, - "required": [ - "name", - "expire" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete dev key", - "operationId": "projectsDeleteDevKey", - "tags": [ - "projects" - ], - "description": "Delete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDevKey", - "group": "devKeys", - "weight": 405, - "cookies": false, - "type": "", - "demo": "projects\/delete-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/projects\/{projectId}\/schedules": { - "get": { - "summary": "List schedules", - "operationId": "projectsListSchedules", - "tags": [ - "projects" - ], - "description": "Get a list of all the project's schedules. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Schedules List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/scheduleList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSchedules", - "group": "schedules", - "weight": 412, - "cookies": false, - "type": "", - "demo": "projects\/list-schedules.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "schedules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-schedules.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create schedule", - "operationId": "projectsCreateSchedule", - "tags": [ - "projects" - ], - "description": "Create a new schedule for a resource.", - "responses": { - "201": { - "description": "Schedule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/schedule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSchedule", - "group": "schedules", - "weight": 410, - "cookies": false, - "type": "", - "demo": "projects\/create-schedule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "schedules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-schedule.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resourceType": { - "type": "string", - "description": "The resource type for the schedule. Possible values: function, execution, message.", - "x-example": "function", - "enum": [ - "function", - "execution", - "message" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "resourceId": { - "type": "string", - "description": "The resource ID to associate with this schedule.", - "x-example": "<RESOURCE_ID>" - }, - "schedule": { - "type": "string", - "description": "Schedule CRON expression.", - "x-example": null - }, - "active": { - "type": "boolean", - "description": "Whether the schedule is active.", - "x-example": false - }, - "data": { - "type": "object", - "description": "Schedule data as a JSON string. Used to store resource-specific context needed for execution.", - "x-example": "{}" - } - }, - "required": [ - "resourceType", - "resourceId", - "schedule" - ] - } - } - } - } - } - }, - "\/projects\/{projectId}\/schedules\/{scheduleId}": { - "get": { - "summary": "Get schedule", - "operationId": "projectsGetSchedule", - "tags": [ - "projects" - ], - "description": "Get a schedule by its unique ID.", - "responses": { - "200": { - "description": "Schedule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/schedule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSchedule", - "group": "schedules", - "weight": 411, - "cookies": false, - "type": "", - "demo": "projects\/get-schedule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "schedules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-schedule.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "scheduleId", - "description": "Schedule ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SCHEDULE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/projects\/{projectId}\/team": { - "patch": { - "summary": "Update project team", - "operationId": "projectsUpdateTeam", - "tags": [ - "projects" - ], - "description": "Update the team ID of a project allowing for it to be transferred to another team.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTeam", - "group": "projects", - "weight": 409, - "cookies": false, - "type": "", - "demo": "projects\/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer project to.", - "x-example": "<TEAM_ID>" - } - }, - "required": [ - "teamId" - ] - } - } - } - } - } - }, - "\/proxy\/rules": { - "get": { - "summary": "List rules", - "operationId": "proxyListRules", - "tags": [ - "proxy" - ], - "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rule List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRuleList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRules", - "group": null, - "weight": 521, - "cookies": false, - "type": "", - "demo": "proxy\/list-rules.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/proxy\/rules\/api": { - "post": { - "summary": "Create API rule", - "operationId": "proxyCreateAPIRule", - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for serving Appwrite's API on custom domain.", - "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAPIRule", - "group": null, - "weight": 516, - "cookies": false, - "type": "", - "demo": "proxy\/create-api-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - } - }, - "required": [ - "domain" - ] - } - } - } - } - } - }, - "\/proxy\/rules\/function": { - "post": { - "summary": "Create function rule", - "operationId": "proxyCreateFunctionRule", - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for executing Appwrite Function on custom domain.", - "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFunctionRule", - "group": null, - "weight": 518, - "cookies": false, - "type": "", - "demo": "proxy\/create-function-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - }, - "functionId": { - "type": "string", - "description": "ID of function to be executed.", - "x-example": "<FUNCTION_ID>" - }, - "branch": { - "type": "string", - "description": "Name of VCS branch to deploy changes automatically", - "x-example": "<BRANCH>" - } - }, - "required": [ - "domain", - "functionId" - ] - } - } - } - } - } - }, - "\/proxy\/rules\/redirect": { - "post": { - "summary": "Create Redirect rule", - "operationId": "proxyCreateRedirectRule", - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for to redirect from custom domain to another domain.", - "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRedirectRule", - "group": null, - "weight": 519, - "cookies": false, - "type": "", - "demo": "proxy\/create-redirect-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - }, - "url": { - "type": "string", - "description": "Target URL of redirection", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "statusCode": { - "type": "string", - "description": "Status code of redirection", - "x-example": "301", - "enum": [ - "301", - "302", - "307", - "308" - ], - "x-enum-name": null, - "x-enum-keys": [ - "Moved Permanently 301", - "Found 302", - "Temporary Redirect 307", - "Permanent Redirect 308" - ] - }, - "resourceId": { - "type": "string", - "description": "ID of parent resource.", - "x-example": "<RESOURCE_ID>" - }, - "resourceType": { - "type": "string", - "description": "Type of parent resource.", - "x-example": "site", - "enum": [ - "site", - "function" - ], - "x-enum-name": "ProxyResourceType", - "x-enum-keys": [ - "Site", - "Function" - ] - } - }, - "required": [ - "domain", - "url", - "statusCode", - "resourceId", - "resourceType" - ] - } - } - } - } - } - }, - "\/proxy\/rules\/site": { - "post": { - "summary": "Create site rule", - "operationId": "proxyCreateSiteRule", - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for serving Appwrite Site on custom domain.", - "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSiteRule", - "group": null, - "weight": 517, - "cookies": false, - "type": "", - "demo": "proxy\/create-site-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - }, - "siteId": { - "type": "string", - "description": "ID of site to be executed.", - "x-example": "<SITE_ID>" - }, - "branch": { - "type": "string", - "description": "Name of VCS branch to deploy changes automatically", - "x-example": "<BRANCH>" - } - }, - "required": [ - "domain", - "siteId" - ] - } - } - } - } - } - }, - "\/proxy\/rules\/{ruleId}": { - "get": { - "summary": "Get rule", - "operationId": "proxyGetRule", - "tags": [ - "proxy" - ], - "description": "Get a proxy rule by its unique ID.", - "responses": { - "200": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRule", - "group": null, - "weight": 520, - "cookies": false, - "type": "", - "demo": "proxy\/get-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RULE_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete rule", - "operationId": "proxyDeleteRule", - "tags": [ - "proxy" - ], - "description": "Delete a proxy rule by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRule", - "group": null, - "weight": 522, - "cookies": false, - "type": "", - "demo": "proxy\/delete-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RULE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/proxy\/rules\/{ruleId}\/verification": { - "patch": { - "summary": "Update rule verification status", - "operationId": "proxyUpdateRuleVerification", - "tags": [ - "proxy" - ], - "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", - "responses": { - "200": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRuleVerification", - "group": null, - "weight": 523, - "cookies": false, - "type": "", - "demo": "proxy\/update-rule-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RULE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites": { - "get": { - "summary": "List sites", - "operationId": "sitesList", - "tags": [ - "sites" - ], - "description": "Get a list of all the project's sites. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Sites List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/siteList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "sites", - "weight": 476, - "cookies": false, - "type": "", - "demo": "sites\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create site", - "operationId": "sitesCreate", - "tags": [ - "sites" - ], - "description": "Create a new site.", - "responses": { - "201": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "sites", - "weight": 474, - "cookies": false, - "type": "", - "demo": "sites\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "siteId": { - "type": "string", - "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<SITE_ID>" - }, - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "x-example": "<FALLBACK_FILE>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "siteId", - "name", - "framework", - "buildRuntime" - ] - } - } - } - } - } - }, - "\/sites\/frameworks": { - "get": { - "summary": "List frameworks", - "operationId": "sitesListFrameworks", - "tags": [ - "sites" - ], - "description": "Get a list of all frameworks that are currently available on the server instance.", - "responses": { - "200": { - "description": "Frameworks List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/frameworkList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFrameworks", - "group": "frameworks", - "weight": 479, - "cookies": false, - "type": "", - "demo": "sites\/list-frameworks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "sitesListSpecifications", - "tags": [ - "sites" - ], - "description": "List allowed site specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/specificationList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "frameworks", - "weight": 502, - "cookies": false, - "type": "", - "demo": "sites\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/templates": { - "get": { - "summary": "List templates", - "operationId": "sitesListTemplates", - "tags": [ - "sites" - ], - "description": "List available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", - "responses": { - "200": { - "description": "Site Templates List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/templateSiteList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTemplates", - "group": "templates", - "weight": 498, - "cookies": false, - "type": "", - "demo": "sites\/list-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "frameworks", - "description": "List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [] - }, - "in": "query" - }, - { - "name": "useCases", - "description": "List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "portfolio", - "starter", - "events", - "ecommerce", - "documentation", - "blog", - "ai", - "forms", - "dashboard" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [] - }, - "in": "query" - }, - { - "name": "limit", - "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25 - }, - "in": "query" - }, - { - "name": "offset", - "description": "Offset the list of returned templates. Maximum offset is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - } - }, - "\/sites\/templates\/{templateId}": { - "get": { - "summary": "Get site template", - "operationId": "sitesGetTemplate", - "tags": [ - "sites" - ], - "description": "Get a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", - "responses": { - "200": { - "description": "Template Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/templateSite" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTemplate", - "group": "templates", - "weight": 499, - "cookies": false, - "type": "", - "demo": "sites\/get-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Template ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEMPLATE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/usage": { - "get": { - "summary": "Get sites usage", - "operationId": "sitesListUsage", - "tags": [ - "sites" - ], - "description": "Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageSites", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageSites" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 500, - "cookies": false, - "type": "", - "demo": "sites\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}": { - "get": { - "summary": "Get site", - "operationId": "sitesGet", - "tags": [ - "sites" - ], - "description": "Get a site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "sites", - "weight": 475, - "cookies": false, - "type": "", - "demo": "sites\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update site", - "operationId": "sitesUpdate", - "tags": [ - "sites" - ], - "description": "Update site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "sites", - "weight": 477, - "cookies": false, - "type": "", - "demo": "sites\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "x-example": "<FALLBACK_FILE>" - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name", - "framework" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete site", - "operationId": "sitesDelete", - "tags": [ - "sites" - ], - "description": "Delete a site by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "sites", - "weight": 478, - "cookies": false, - "type": "", - "demo": "sites\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployment": { - "patch": { - "summary": "Update site's deployment", - "operationId": "sitesUpdateSiteDeployment", - "tags": [ - "sites" - ], - "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", - "responses": { - "200": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSiteDeployment", - "group": "sites", - "weight": 485, - "cookies": false, - "type": "", - "demo": "sites\/update-site-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "sitesListDeployments", - "tags": [ - "sites" - ], - "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deploymentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 484, - "cookies": false, - "type": "", - "demo": "sites\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "sitesCreateDeployment", - "tags": [ - "sites" - ], - "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 480, - "cookies": false, - "type": "upload", - "demo": "sites\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "installCommand": { - "type": "string", - "description": "Install Commands.", - "x-example": "<INSTALL_COMMAND>", - "x-nullable": true - }, - "buildCommand": { - "type": "string", - "description": "Build Commands.", - "x-example": "<BUILD_COMMAND>", - "x-nullable": true - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory.", - "x-example": "<OUTPUT_DIRECTORY>", - "x-nullable": true - }, - "code": { - "type": "string", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "x-example": null, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "code" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "sitesCreateDuplicateDeployment", - "tags": [ - "sites" - ], - "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 488, - "cookies": false, - "type": "", - "demo": "sites\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "sitesCreateTemplateDeployment", - "tags": [ - "sites" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 481, - "cookies": false, - "type": "", - "demo": "sites\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to site code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "sitesCreateVcsDeployment", - "tags": [ - "sites" - ], - "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 482, - "cookies": false, - "type": "", - "demo": "sites\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "sitesGetDeployment", - "tags": [ - "sites" - ], - "description": "Get a site deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 483, - "cookies": false, - "type": "", - "demo": "sites\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "sitesDeleteDeployment", - "tags": [ - "sites" - ], - "description": "Delete a site deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 486, - "cookies": false, - "type": "", - "demo": "sites\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "sitesGetDeploymentDownload", - "tags": [ - "sites" - ], - "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 487, - "cookies": false, - "type": "location", - "demo": "sites\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source" - }, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "sitesUpdateDeploymentStatus", - "tags": [ - "sites" - ], - "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 489, - "cookies": false, - "type": "", - "demo": "sites\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/logs": { - "get": { - "summary": "List logs", - "operationId": "sitesListLogs", - "tags": [ - "sites" - ], - "description": "Get a list of all site logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/executionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 491, - "cookies": false, - "type": "", - "demo": "sites\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/logs\/{logId}": { - "get": { - "summary": "Get log", - "operationId": "sitesGetLog", - "tags": [ - "sites" - ], - "description": "Get a site request log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getLog", - "group": "logs", - "weight": 490, - "cookies": false, - "type": "", - "demo": "sites\/get-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<LOG_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete log", - "operationId": "sitesDeleteLog", - "tags": [ - "sites" - ], - "description": "Delete a site log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteLog", - "group": "logs", - "weight": 492, - "cookies": false, - "type": "", - "demo": "sites\/delete-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<LOG_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/usage": { - "get": { - "summary": "Get site usage", - "operationId": "sitesGetUsage", - "tags": [ - "sites" - ], - "description": "Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageSite", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageSite" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 501, - "cookies": false, - "type": "", - "demo": "sites\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "sitesListVariables", - "tags": [ - "sites" - ], - "description": "Get a list of all variables of a specific site.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 495, - "cookies": false, - "type": "", - "demo": "sites\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "sitesCreateVariable", - "tags": [ - "sites" - ], - "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 493, - "cookies": false, - "type": "", - "demo": "sites\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "sitesGetVariable", - "tags": [ - "sites" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 494, - "cookies": false, - "type": "", - "demo": "sites\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "sitesUpdateVariable", - "tags": [ - "sites" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 496, - "cookies": false, - "type": "", - "demo": "sites\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete variable", - "operationId": "sitesDeleteVariable", - "tags": [ - "sites" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 497, - "cookies": false, - "type": "", - "demo": "sites\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", - "tags": [ - "storage" - ], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Buckets List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucketList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listBuckets", - "group": "buckets", - "weight": 545, - "cookies": false, - "type": "", - "demo": "storage\/list-buckets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create bucket", - "operationId": "storageCreateBucket", - "tags": [ - "storage" - ], - "description": "Create a new storage bucket.", - "responses": { - "201": { - "description": "Bucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBucket", - "group": "buckets", - "weight": 543, - "cookies": false, - "type": "", - "demo": "storage\/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<BUCKET_ID>" - }, - "name": { - "type": "string", - "description": "Bucket name", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "x-example": false - } - }, - "required": [ - "bucketId", - "name" - ] - } - } - } - } - } - }, - "\/storage\/buckets\/{bucketId}": { - "get": { - "summary": "Get bucket", - "operationId": "storageGetBucket", - "tags": [ - "storage" - ], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucket", - "group": "buckets", - "weight": 544, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update bucket", - "operationId": "storageUpdateBucket", - "tags": [ - "storage" - ], - "description": "Update a storage bucket by its unique ID.", - "responses": { - "200": { - "description": "Bucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBucket", - "group": "buckets", - "weight": 546, - "cookies": false, - "type": "", - "demo": "storage\/update-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete bucket", - "operationId": "storageDeleteBucket", - "tags": [ - "storage" - ], - "description": "Delete a storage bucket by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteBucket", - "group": "buckets", - "weight": 547, - "cookies": false, - "type": "", - "demo": "storage\/delete-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", - "tags": [ - "storage" - ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Files List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/fileList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFiles", - "group": "files", - "weight": 550, - "cookies": false, - "type": "", - "demo": "storage\/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", - "tags": [ - "storage" - ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFile", - "group": "files", - "weight": 548, - "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "fileId": { - "type": "string", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<FILE_ID>", - "x-upload-id": true - }, - "file": { - "type": "string", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "x-example": null, - "format": "binary" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - }, - "required": [ - "fileId", - "file" - ] - } - } - } - } - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "Get file", - "operationId": "storageGetFile", - "tags": [ - "storage" - ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFile", - "group": "files", - "weight": 549, - "cookies": false, - "type": "", - "demo": "storage\/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", - "tags": [ - "storage" - ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFile", - "group": "files", - "weight": 551, - "cookies": false, - "type": "", - "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", - "tags": [ - "storage" - ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "weight": 552, - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { - "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileDownload", - "group": "files", - "weight": 554, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", - "tags": [ - "storage" - ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFilePreview", - "group": "files", - "weight": 553, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "schema": { - "type": "string", - "x-example": "center", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "default": "center" - }, - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0 - }, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileView", - "group": "files", - "weight": 555, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/usage": { - "get": { - "summary": "Get storage usage stats", - "operationId": "storageGetUsage", - "tags": [ - "storage" - ], - "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, 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.\n", - "responses": { - "200": { - "description": "StorageUsage", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageStorage" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 557, - "cookies": false, - "type": "", - "demo": "storage\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/storage\/{bucketId}\/usage": { - "get": { - "summary": "Get bucket usage stats", - "operationId": "storageGetBucketUsage", - "tags": [ - "storage" - ], - "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, 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.\n", - "responses": { - "200": { - "description": "UsageBuckets", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageBuckets" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucketUsage", - "group": null, - "weight": 558, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/tablesdb": { - "get": { - "summary": "List databases", - "operationId": "tablesDBList", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "tablesdb", - "weight": 265, - "cookies": false, - "type": "", - "demo": "tablesdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "tablesDBCreate", - "tags": [ - "tablesDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "tablesdb", - "weight": 261, - "cookies": false, - "type": "", - "demo": "tablesdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", - "tags": [ - "tablesDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 332, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", - "tags": [ - "tablesDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 328, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", - "tags": [ - "tablesDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 329, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", - "tags": [ - "tablesDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 330, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 331, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", - "tags": [ - "tablesDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 333, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/tablesdb\/usage": { - "get": { - "summary": "Get TablesDB usage stats", - "operationId": "tablesDBListUsage", - "tags": [ - "tablesDB" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageDatabases" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 267, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "tablesdb\/list-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "tablesDBGet", - "tags": [ - "tablesDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tablesdb", - "weight": 262, - "cookies": false, - "type": "", - "demo": "tablesdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "tablesDBUpdate", - "tags": [ - "tablesDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tablesdb", - "weight": 263, - "cookies": false, - "type": "", - "demo": "tablesdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "tablesDBDelete", - "tags": [ - "tablesDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tablesdb", - "weight": 264, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables": { - "get": { - "summary": "List tables", - "operationId": "tablesDBListTables", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": "tables", - "weight": 272, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "tablesDBCreateTable", - "tags": [ - "tablesDB" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": "tables", - "weight": 268, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TABLE_ID>" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - }, - "columns": { - "type": "array", - "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "tableId", - "name" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "tablesDBGetTable", - "tags": [ - "tablesDB" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": "tables", - "weight": 269, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "tablesDBUpdateTable", - "tags": [ - "tablesDB" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": "tables", - "weight": 270, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete table", - "operationId": "tablesDBDeleteTable", - "tags": [ - "tablesDB" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": "tables", - "weight": 271, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "tablesDBListColumns", - "tags": [ - "tablesDB" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 277, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "tablesDBCreateBooleanColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 278, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "tablesDBUpdateBooleanColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 279, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "tablesDBCreateDatetimeColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 280, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "tablesDBUpdateDatetimeColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 281, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "tablesDBCreateEmailColumn", - "tags": [ - "tablesDB" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 282, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "tablesDBUpdateEmailColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 283, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "tablesDBCreateEnumColumn", - "tags": [ - "tablesDB" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 284, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "tablesDBUpdateEnumColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 285, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "tablesDBCreateFloatColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 286, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "tablesDBUpdateFloatColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 287, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "tablesDBCreateIntegerColumn", - "tags": [ - "tablesDB" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 288, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "tablesDBUpdateIntegerColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 289, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "tablesDBCreateIpColumn", - "tags": [ - "tablesDB" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 290, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "tablesDBUpdateIpColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 291, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { - "post": { - "summary": "Create line column", - "operationId": "tablesDBCreateLineColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a geometric line column.", - "responses": { - "202": { - "description": "ColumnLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLine" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLineColumn", - "group": "columns", - "weight": 292, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { - "patch": { - "summary": "Update line column", - "operationId": "tablesDBUpdateLineColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a line column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLine" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLineColumn", - "group": "columns", - "weight": 293, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { - "post": { - "summary": "Create longtext column", - "operationId": "tablesDBCreateLongtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a longtext column.\n", - "responses": { - "202": { - "description": "ColumnLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextColumn", - "group": "columns", - "weight": 310, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { - "patch": { - "summary": "Update longtext column", - "operationId": "tablesDBUpdateLongtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextColumn", - "group": "columns", - "weight": 311, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { - "post": { - "summary": "Create mediumtext column", - "operationId": "tablesDBCreateMediumtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a mediumtext column.\n", - "responses": { - "202": { - "description": "ColumnMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextColumn", - "group": "columns", - "weight": 308, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext column", - "operationId": "tablesDBUpdateMediumtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextColumn", - "group": "columns", - "weight": 309, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { - "post": { - "summary": "Create point column", - "operationId": "tablesDBCreatePointColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a geometric point column.", - "responses": { - "202": { - "description": "ColumnPoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPoint" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPointColumn", - "group": "columns", - "weight": 294, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { - "patch": { - "summary": "Update point column", - "operationId": "tablesDBUpdatePointColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a point column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPoint" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePointColumn", - "group": "columns", - "weight": 295, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { - "post": { - "summary": "Create polygon column", - "operationId": "tablesDBCreatePolygonColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a geometric polygon column.", - "responses": { - "202": { - "description": "ColumnPolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPolygon" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPolygonColumn", - "group": "columns", - "weight": 296, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { - "patch": { - "summary": "Update polygon column", - "operationId": "tablesDBUpdatePolygonColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPolygon" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePolygonColumn", - "group": "columns", - "weight": 297, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "tablesDBCreateRelationshipColumn", - "tags": [ - "tablesDB" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 298, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "<RELATED_TABLE_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "tablesDBCreateStringColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 300, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", - "deprecated": { - "since": "1.9.0", - "replaceWith": "tablesDB.createTextColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for text columns, in number of characters.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "tablesDBUpdateStringColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 301, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { - "post": { - "summary": "Create text column", - "operationId": "tablesDBCreateTextColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a text column.\n", - "responses": { - "202": { - "description": "ColumnText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextColumn", - "group": "columns", - "weight": 306, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { - "patch": { - "summary": "Update text column", - "operationId": "tablesDBUpdateTextColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextColumn", - "group": "columns", - "weight": 307, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "tablesDBCreateUrlColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 302, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "tablesDBUpdateUrlColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 303, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { - "post": { - "summary": "Create varchar column", - "operationId": "tablesDBCreateVarcharColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a varchar column.\n", - "responses": { - "202": { - "description": "ColumnVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharColumn", - "group": "columns", - "weight": 304, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { - "patch": { - "summary": "Update varchar column", - "operationId": "tablesDBUpdateVarcharColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharColumn", - "group": "columns", - "weight": 305, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar column.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "tablesDBGetColumn", - "tags": [ - "tablesDB" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 275, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "tablesDBDeleteColumn", - "tags": [ - "tablesDB" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 276, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "tablesDBUpdateRelationshipColumn", - "tags": [ - "tablesDB" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 299, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [], - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "tablesDBListIndexes", - "tags": [ - "tablesDB" - ], - "description": "List indexes on the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 315, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "tablesDBCreateIndex", - "tags": [ - "tablesDB" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 312, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "TablesDBIndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "tablesDBGetIndex", - "tags": [ - "tablesDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 313, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "tablesDBDeleteIndex", - "tags": [ - "tablesDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 314, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "tablesDBListTableLogs", - "tags": [ - "tablesDB" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 273, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 324, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", - "tags": [ - "tablesDB" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 316, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - }, - { - "name": "createRows", - "namespace": "tablesDB", - "desc": "Create rows", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-rows.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<ROW_ID>" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert rows", - "operationId": "tablesDBUpsertRows", - "tags": [ - "tablesDB" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 321, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", - "methods": [ - { - "name": "upsertRows", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "demo": "tablesdb\/upsert-rows.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "rows" - ] - } - } - } - } - }, - "patch": { - "summary": "Update rows", - "operationId": "tablesDBUpdateRows", - "tags": [ - "tablesDB" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 319, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete rows", - "operationId": "tablesDBDeleteRows", - "tags": [ - "tablesDB" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 323, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", - "tags": [ - "tablesDB" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 317, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", - "tags": [ - "tablesDB" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 320, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", - "tags": [ - "tablesDB" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 318, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", - "tags": [ - "tablesDB" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 322, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "tablesDBListRowLogs", - "tags": [ - "tablesDB" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 325, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 327, - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 326, - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "tablesDBGetTableUsage", - "tags": [ - "tablesDB" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageTable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 274, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/usage": { - "get": { - "summary": "Get TablesDB usage stats", - "operationId": "tablesDBGetUsage", - "tags": [ - "tablesDB" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabase", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageDatabase" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 266, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "tablesdb\/get-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/teams": { - "get": { - "summary": "List teams", - "operationId": "teamsList", - "tags": [ - "teams" - ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", - "responses": { - "200": { - "description": "Teams List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/teamList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "teams", - "weight": 526, - "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", - "tags": [ - "teams" - ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "teams", - "weight": 524, - "cookies": false, - "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TEAM_ID>" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", - "tags": [ - "teams" - ], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "teams", - "weight": 525, - "cookies": false, - "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "tags": [ - "teams" - ], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "teams", - "weight": 528, - "cookies": false, - "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", - "tags": [ - "teams" - ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "teams", - "weight": 527, - "cookies": false, - "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/logs": { - "get": { - "summary": "List team logs", - "operationId": "teamsListLogs", - "tags": [ - "teams" - ], - "description": "Get the team 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": 537, - "cookies": false, - "type": "", - "demo": "teams\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "tags": [ - "teams" - ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membershipList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 533, - "cookies": false, - "type": "", - "demo": "teams\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "tags": [ - "teams" - ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMembership", - "group": "memberships", - "weight": 531, - "cookies": false, - "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "x-example": "email@example.com", - "format": "email" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "roles" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { - "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", - "tags": [ - "teams" - ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMembership", - "group": "memberships", - "weight": 532, - "cookies": false, - "type": "", - "demo": "teams\/get-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", - "tags": [ - "teams" - ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembership", - "group": "memberships", - "weight": 534, - "cookies": false, - "type": "", - "demo": "teams\/update-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", - "tags": [ - "teams" - ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", - "weight": 535, - "cookies": false, - "type": "", - "demo": "teams\/delete-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { - "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", - "tags": [ - "teams" - ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", - "weight": 536, - "cookies": false, - "type": "", - "demo": "teams\/update-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "tags": [ - "teams" - ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "teams", - "weight": 529, - "cookies": false, - "type": "", - "demo": "teams\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", - "tags": [ - "teams" - ], - "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "teams", - "weight": 530, - "cookies": false, - "type": "", - "demo": "teams\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "List tokens", - "operationId": "tokensList", - "tags": [ - "tokens" - ], - "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Resource Tokens List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceTokenList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "files", - "weight": 540, - "cookies": false, - "type": "", - "demo": "tokens\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file token", - "operationId": "tokensCreateFileToken", - "tags": [ - "tokens" - ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", - "responses": { - "201": { - "description": "ResourceToken", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceToken" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFileToken", - "group": "files", - "weight": 538, - "cookies": false, - "type": "", - "demo": "tokens\/create-file-token.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "Token expiry date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tokens\/{tokenId}": { - "get": { - "summary": "Get token", - "operationId": "tokensGet", - "tags": [ - "tokens" - ], - "description": "Get a token by its unique ID.", - "responses": { - "200": { - "description": "ResourceToken", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceToken" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tokens", - "weight": 539, - "cookies": false, - "type": "", - "demo": "tokens\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update token", - "operationId": "tokensUpdate", - "tags": [ - "tokens" - ], - "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", - "responses": { - "200": { - "description": "ResourceToken", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceToken" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tokens", - "weight": 541, - "cookies": false, - "type": "", - "demo": "tokens\/update.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "File token expiry date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete token", - "operationId": "tokensDelete", - "tags": [ - "tokens" - ], - "description": "Delete a token by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tokens", - "weight": 542, - "cookies": false, - "type": "", - "demo": "tokens\/delete.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users": { - "get": { - "summary": "List users", - "operationId": "usersList", - "tags": [ - "users" - ], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Users List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/userList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "users", - "weight": 71, - "cookies": false, - "type": "", - "demo": "users\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user", - "operationId": "usersCreate", - "tags": [ - "users" - ], - "description": "Create a new user.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "users", - "weight": 62, - "cookies": false, - "type": "", - "demo": "users\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId" - ] - } - } - } - } - } - }, - "\/users\/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createArgon2User", - "group": "users", - "weight": 65, - "cookies": false, - "type": "", - "demo": "users\/create-argon-2-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Argon2.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBcryptUser", - "group": "users", - "weight": 63, - "cookies": false, - "type": "", - "demo": "users\/create-bcrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Bcrypt.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "tags": [ - "users" - ], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/identityList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 79, - "cookies": false, - "type": "", - "demo": "users\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/users\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "tags": [ - "users" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 103, - "cookies": false, - "type": "", - "demo": "users\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<IDENTITY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMD5User", - "group": "users", - "weight": 64, - "cookies": false, - "type": "", - "demo": "users\/create-md-5-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using MD5.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPHPassUser", - "group": "users", - "weight": 67, - "cookies": false, - "type": "", - "demo": "users\/create-ph-pass-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using PHPass.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptUser", - "group": "users", - "weight": 68, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt.", - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "x-example": null, - "format": "int32" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" - ] - } - } - } - } - } - }, - "\/users\/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptModifiedUser", - "group": "users", - "weight": 69, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-modified-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "x-example": "<PASSWORD_SIGNER_KEY>" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } - } - } - } - }, - "\/users\/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSHAUser", - "group": "users", - "weight": 66, - "cookies": false, - "type": "", - "demo": "users\/create-sha-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using SHA.", - "x-example": "password", - "format": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/usage": { - "get": { - "summary": "Get users usage stats", - "operationId": "usersGetUsage", - "tags": [ - "users" - ], - "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. 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.\n", - "responses": { - "200": { - "description": "UsageUsers", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageUsers" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 105, - "cookies": false, - "type": "", - "demo": "users\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/users\/{userId}": { - "get": { - "summary": "Get user", - "operationId": "usersGet", - "tags": [ - "users" - ], - "description": "Get a user by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "users", - "weight": 72, - "cookies": false, - "type": "", - "demo": "users\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user", - "operationId": "usersDelete", - "tags": [ - "users" - ], - "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "users", - "weight": 101, - "cookies": false, - "type": "", - "demo": "users\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/email": { - "patch": { - "summary": "Update email", - "operationId": "usersUpdateEmail", - "tags": [ - "users" - ], - "description": "Update the user email by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "users", - "weight": 86, - "cookies": false, - "type": "", - "demo": "users\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - } - }, - "required": [ - "email" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/impersonator": { - "patch": { - "summary": "Update user impersonator capability", - "operationId": "usersUpdateImpersonator", - "tags": [ - "users" - ], - "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateImpersonator", - "group": "users", - "weight": 82, - "cookies": false, - "type": "", - "demo": "users\/update-impersonator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", - "x-example": false - } - }, - "required": [ - "impersonator" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "tags": [ - "users" - ], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/jwt" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "sessions", - "weight": 104, - "cookies": false, - "type": "", - "demo": "users\/create-jwt.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "x-example": 0, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/users\/{userId}\/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "tags": [ - "users" - ], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": "users", - "weight": 81, - "cookies": false, - "type": "", - "demo": "users\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "tags": [ - "users" - ], - "description": "Get the user 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": 77, - "cookies": false, - "type": "", - "demo": "users\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "tags": [ - "users" - ], - "description": "Get the user membership list by its unique ID.", - "responses": { - "200": { - "description": "Memberships List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membershipList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 76, - "cookies": false, - "type": "", - "demo": "users\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "tags": [ - "users" - ], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfa", - "group": "users", - "weight": 91, - "cookies": false, - "type": "", - "demo": "users\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - }, - "methods": [ - { - "name": "updateMfa", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - } - }, - { - "name": "updateMFA", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/mfa\/authenticators\/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "tags": [ - "users" - ], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 96, - "cookies": false, - "type": "", - "demo": "users\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "tags": [ - "users" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 92, - "cookies": false, - "type": "", - "demo": "users\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "tags": [ - "users" - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 93, - "cookies": false, - "type": "", - "demo": "users\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "usersUpdateMfaRecoveryCodes", - "tags": [ - "users" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 95, - "cookies": false, - "type": "", - "demo": "users\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "tags": [ - "users" - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 94, - "cookies": false, - "type": "", - "demo": "users\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/name": { - "patch": { - "summary": "Update name", - "operationId": "usersUpdateName", - "tags": [ - "users" - ], - "description": "Update the user name by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "users", - "weight": 84, - "cookies": false, - "type": "", - "demo": "users\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/password": { - "patch": { - "summary": "Update password", - "operationId": "usersUpdatePassword", - "tags": [ - "users" - ], - "description": "Update the user password by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "users", - "weight": 85, - "cookies": false, - "type": "", - "demo": "users\/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - } - }, - "required": [ - "password" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "tags": [ - "users" - ], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "users", - "weight": 87, - "cookies": false, - "type": "", - "demo": "users\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "number" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "tags": [ - "users" - ], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "users", - "weight": 73, - "cookies": false, - "type": "", - "demo": "users\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user preferences", - "operationId": "usersUpdatePrefs", - "tags": [ - "users" - ], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "users", - "weight": 89, - "cookies": false, - "type": "", - "demo": "users\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/sessions": { - "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", - "tags": [ - "users" - ], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { - "description": "Sessions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/sessionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 75, - "cookies": false, - "type": "", - "demo": "users\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.read", - "sessions.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "tags": [ - "users" - ], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 97, - "cookies": false, - "type": "", - "demo": "users\/create-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user sessions", - "operationId": "usersDeleteSessions", - "tags": [ - "users" - ], - "description": "Delete all user's sessions by using the user's unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 100, - "cookies": false, - "type": "", - "demo": "users\/delete-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/sessions\/{sessionId}": { - "delete": { - "summary": "Delete user session", - "operationId": "usersDeleteSession", - "tags": [ - "users" - ], - "description": "Delete a user sessions by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 99, - "cookies": false, - "type": "", - "demo": "users\/delete-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/status": { - "patch": { - "summary": "Update user status", - "operationId": "usersUpdateStatus", - "tags": [ - "users" - ], - "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "users", - "weight": 80, - "cookies": false, - "type": "", - "demo": "users\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", - "x-example": false - } - }, - "required": [ - "status" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "tags": [ - "users" - ], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/targetList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "targets", - "weight": 78, - "cookies": false, - "type": "", - "demo": "users\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "tags": [ - "users" - ], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTarget", - "group": "targets", - "weight": 70, - "cookies": false, - "type": "", - "demo": "users\/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TARGET_ID>" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email", - "enum": [ - "email", - "sms", - "push" - ], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "x-example": "<NAME>" - } - }, - "required": [ - "targetId", - "providerType", - "identifier" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/targets\/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "tags": [ - "users" - ], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTarget", - "group": "targets", - "weight": 74, - "cookies": false, - "type": "", - "demo": "users\/get-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "tags": [ - "users" - ], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTarget", - "group": "targets", - "weight": 90, - "cookies": false, - "type": "", - "demo": "users\/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "x-example": "<NAME>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "tags": [ - "users" - ], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTarget", - "group": "targets", - "weight": 102, - "cookies": false, - "type": "", - "demo": "users\/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "tags": [ - "users" - ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createToken", - "group": "sessions", - "weight": 98, - "cookies": false, - "type": "", - "demo": "users\/create-token.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "x-example": 4, - "format": "int32" - }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/users\/{userId}\/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "tags": [ - "users" - ], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "users", - "weight": 88, - "cookies": false, - "type": "", - "demo": "users\/update-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "x-example": false - } - }, - "required": [ - "emailVerification" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/verification\/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "tags": [ - "users" - ], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "users", - "weight": 83, - "cookies": false, - "type": "", - "demo": "users\/update-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "x-example": false - } - }, - "required": [ - "phoneVerification" - ] - } - } - } - } - } - }, - "\/vcs\/github\/installations\/{installationId}\/detections": { - "post": { - "summary": "Create repository detection", - "operationId": "vcsCreateRepositoryDetection", - "tags": [ - "vcs" - ], - "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", - "responses": { - "200": { - "description": "DetectionRuntime, or DetectionFramework", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/detectionRuntime" - }, - { - "$ref": "#\/components\/schemas\/detectionFramework" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "runtime": "#\/components\/schemas\/detectionRuntime", - "framework": "#\/components\/schemas\/detectionFramework" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRepositoryDetection", - "group": "repositories", - "weight": 570, - "cookies": false, - "type": "", - "demo": "vcs\/create-repository-detection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerRepositoryId": { - "type": "string", - "description": "Repository Id", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "type": { - "type": "string", - "description": "Detector type. Must be one of the following: runtime, framework", - "x-example": "runtime", - "enum": [ - "runtime", - "framework" - ], - "x-enum-name": "VCSDetectionType", - "x-enum-keys": [] - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to Root Directory", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - } - }, - "required": [ - "providerRepositoryId", - "type" - ] - } - } - } - } - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { - "get": { - "summary": "List repositories", - "operationId": "vcsListRepositories", - "tags": [ - "vcs" - ], - "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", - "responses": { - "200": { - "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/providerRepositoryRuntimeList" - }, - { - "$ref": "#\/components\/schemas\/providerRepositoryFrameworkList" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "runtime": "#\/components\/schemas\/providerRepositoryRuntimeList", - "framework": "#\/components\/schemas\/providerRepositoryFrameworkList" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRepositories", - "group": "repositories", - "weight": 567, - "cookies": false, - "type": "", - "demo": "vcs\/list-repositories.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Detector type. Must be one of the following: runtime, framework", - "required": true, - "schema": { - "type": "string", - "x-example": "runtime", - "enum": [ - "runtime", - "framework" - ], - "x-enum-name": "VCSDetectionType", - "x-enum-keys": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "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" - } - ] - }, - "post": { - "summary": "Create repository", - "operationId": "vcsCreateRepository", - "tags": [ - "vcs" - ], - "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", - "responses": { - "200": { - "description": "ProviderRepository", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/providerRepository" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRepository", - "group": "repositories", - "weight": 565, - "cookies": false, - "type": "", - "demo": "vcs\/create-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Repository name (slug)", - "x-example": "<NAME>" - }, - "private": { - "type": "boolean", - "description": "Mark repository public or private", - "x-example": false - } - }, - "required": [ - "name", - "private" - ] - } - } - } - } - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { - "get": { - "summary": "Get repository", - "operationId": "vcsGetRepository", - "tags": [ - "vcs" - ], - "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", - "responses": { - "200": { - "description": "ProviderRepository", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/providerRepository" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRepository", - "group": "repositories", - "weight": 566, - "cookies": false, - "type": "", - "demo": "vcs\/get-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { - "get": { - "summary": "List repository branches", - "operationId": "vcsListRepositoryBranches", - "tags": [ - "vcs" - ], - "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", - "responses": { - "200": { - "description": "Branches List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/branchList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRepositoryBranches", - "group": "repositories", - "weight": 568, - "cookies": false, - "type": "", - "demo": "vcs\/list-repository-branches.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { - "get": { - "summary": "Get files and directories of a VCS repository", - "operationId": "vcsGetRepositoryContents", - "tags": [ - "vcs" - ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", - "responses": { - "200": { - "description": "VCS Content List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vcsContentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRepositoryContents", - "group": "repositories", - "weight": 569, - "cookies": false, - "type": "", - "demo": "vcs\/get-repository-contents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "in": "path" - }, - { - "name": "providerRootDirectory", - "description": "Path to get contents of nested directory", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ROOT_DIRECTORY>", - "default": "" - }, - "in": "query" - }, - { - "name": "providerReference", - "description": "Git reference (branch, tag, commit) to get contents from", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROVIDER_REFERENCE>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { - "patch": { - "summary": "Update external deployment (authorize)", - "operationId": "vcsUpdateExternalDeployments", - "tags": [ - "vcs" - ], - "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateExternalDeployments", - "group": "repositories", - "weight": 561, - "cookies": false, - "type": "", - "demo": "vcs\/update-external-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - }, - { - "name": "repositoryId", - "description": "VCS Repository Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<REPOSITORY_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerPullRequestId": { - "type": "string", - "description": "GitHub Pull Request Id", - "x-example": "<PROVIDER_PULL_REQUEST_ID>" - } - }, - "required": [ - "providerPullRequestId" - ] - } - } - } - } - } - }, - "\/vcs\/installations": { - "get": { - "summary": "List installations", - "operationId": "vcsListInstallations", - "tags": [ - "vcs" - ], - "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", - "responses": { - "200": { - "description": "Installations List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/installationList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listInstallations", - "group": "installations", - "weight": 563, - "cookies": false, - "type": "", - "demo": "vcs\/list-installations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/vcs\/installations\/{installationId}": { - "get": { - "summary": "Get installation", - "operationId": "vcsGetInstallation", - "tags": [ - "vcs" - ], - "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", - "responses": { - "200": { - "description": "Installation", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/installation" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInstallation", - "group": "installations", - "weight": 562, - "cookies": false, - "type": "", - "demo": "vcs\/get-installation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete installation", - "operationId": "vcsDeleteInstallation", - "tags": [ - "vcs" - ], - "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteInstallation", - "group": "installations", - "weight": 564, - "cookies": false, - "type": "", - "demo": "vcs\/delete-installation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb": { - "get": { - "summary": "List databases", - "operationId": "vectorsDBList", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "vectorsdb", - "weight": 372, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "vectorsDBCreate", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "vectorsdb", - "weight": 368, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/vectorsdb\/embeddings\/text": { - "post": { - "summary": "Create Text Embeddings", - "operationId": "vectorsDBCreateTextEmbeddings", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "200": { - "description": "Embedding list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/embeddingList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextEmbeddings", - "group": "documents", - "weight": 394, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-text-embeddings.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createTextEmbeddings", - "namespace": "vectorsDB", - "desc": "Create Text Embedding", - "auth": { - "Project": [] - }, - "parameters": [ - "texts", - "model" - ], - "required": [ - "texts" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/embeddingList" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-text-embeddings.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "texts": { - "type": "array", - "description": "Array of text to generate embeddings.", - "x-example": null, - "items": { - "type": "string" - } - }, - "model": { - "type": "string", - "description": "The embedding model to use for generating vector embeddings.", - "x-example": "embeddinggemma", - "enum": [ - "embeddinggemma" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "required": [ - "texts" - ] - } - } - } - } - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", - "tags": [ - "vectorsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 399, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 395, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 396, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 397, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 398, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", - "tags": [ - "vectorsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 400, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/vectorsdb\/usage": { - "get": { - "summary": "Get VectorsDB usage stats", - "operationId": "vectorsDBListUsage", - "tags": [ - "vectorsDB" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageVectorsDBs", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageVectorsDBs" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageVectorsDBs" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "vectorsdb\/list-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/vectorsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "vectorsDBGet", - "tags": [ - "vectorsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "vectorsdb", - "weight": 369, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "vectorsDBUpdate", - "tags": [ - "vectorsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "vectorsdb", - "weight": 370, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "vectorsDBDelete", - "tags": [ - "vectorsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "vectorsdb", - "weight": 371, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "vectorsDBListCollections", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "VectorsDB Collections List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollectionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 379, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "vectorsDBCreateCollection", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "VectorsDB Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 375, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "collectionId", - "name", - "dimension" - ] - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "vectorsDBGetCollection", - "tags": [ - "vectorsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 376, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "vectorsDBUpdateCollection", - "tags": [ - "vectorsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 377, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimensions.", - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "vectorsDBDeleteCollection", - "tags": [ - "vectorsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 378, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 389, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 385, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "vectorsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "vectorsDBUpsertDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 392, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "vectorsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - } - } - }, - "patch": { - "summary": "Update documents", - "operationId": "vectorsDBUpdateDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 391, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "vectorsDBDeleteDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 393, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", - "tags": [ - "vectorsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 388, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", - "tags": [ - "vectorsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 387, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", - "tags": [ - "vectorsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 386, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 390, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "vectorsDBListIndexes", - "tags": [ - "vectorsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 384, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "vectorsDBCreateIndex", - "tags": [ - "vectorsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 381, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "hnsw_euclidean", - "enum": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ], - "x-enum-name": "VectorsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "vectorsDBGetIndex", - "tags": [ - "vectorsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 382, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "vectorsDBDeleteIndex", - "tags": [ - "vectorsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 383, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "vectorsDBGetCollectionUsage", - "tags": [ - "vectorsDB" - ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollectionUsage", - "group": null, - "weight": 380, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/usage": { - "get": { - "summary": "Get VectorsDB usage stats", - "operationId": "vectorsDBGetUsage", - "tags": [ - "vectorsDB" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageVectorsDB", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageVectorsDB" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageVectorsDB" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "vectorsdb\/get-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/webhooks": { - "get": { - "summary": "List webhooks", - "operationId": "webhooksList", - "tags": [ - "webhooks" - ], - "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Webhooks List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhookList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "weight": 573, - "cookies": false, - "type": "", - "demo": "webhooks\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create webhook", - "operationId": "webhooksCreate", - "tags": [ - "webhooks" - ], - "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", - "responses": { - "201": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": null, - "weight": 572, - "cookies": false, - "type": "", - "demo": "webhooks\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "webhookId": { - "type": "string", - "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<WEBHOOK_ID>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "x-example": null - }, - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "x-example": "<AUTH_PASSWORD>" - }, - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "x-example": "<SECRET>", - "x-nullable": true - } - }, - "required": [ - "webhookId", - "url", - "name", - "events" - ] - } - } - } - } - } - }, - "\/webhooks\/{webhookId}": { - "get": { - "summary": "Get webhook", - "operationId": "webhooksGet", - "tags": [ - "webhooks" - ], - "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 574, - "cookies": false, - "type": "", - "demo": "webhooks\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update webhook", - "operationId": "webhooksUpdate", - "tags": [ - "webhooks" - ], - "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": null, - "weight": 576, - "cookies": false, - "type": "", - "demo": "webhooks\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "x-example": null - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "x-example": "<AUTH_PASSWORD>" - } - }, - "required": [ - "name", - "url", - "events" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete webhook", - "operationId": "webhooksDelete", - "tags": [ - "webhooks" - ], - "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 575, - "cookies": false, - "type": "", - "demo": "webhooks\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ] - } - }, - "\/webhooks\/{webhookId}\/secret": { - "patch": { - "summary": "Update webhook secret key", - "operationId": "webhooksUpdateSecret", - "tags": [ - "webhooks" - ], - "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSecret", - "group": null, - "weight": 577, - "cookies": false, - "type": "", - "demo": "webhooks\/update-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "x-example": "<SECRET>", - "x-nullable": true - } - } - } - } - } - } - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - } - ], - "components": { - "schemas": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] - }, - "error": { - "description": "Error", - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Error message.", - "x-example": "Not found" - }, - "code": { - "type": "string", - "description": "Error code.", - "x-example": "404" - }, - "type": { - "type": "string", - "description": "Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes", - "x-example": "not_found" - }, - "version": { - "type": "string", - "description": "Server version number.", - "x-example": "1.0" - } - }, - "required": [ - "message", - "code", - "type", - "version" - ], - "example": { - "message": "Not found", - "code": "404", - "type": "not_found", - "version": "1.0" - } - }, - "rowList": { - "description": "Rows List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rows that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "List of rows.", - "items": { - "$ref": "#\/components\/schemas\/row" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rows" - ], - "example": { - "total": 5, - "rows": "" - } - }, - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { - "$ref": "#\/components\/schemas\/document" - }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "$ref": "#\/components\/schemas\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "tableList": { - "description": "Tables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tables": { - "type": "array", - "description": "List of tables.", - "items": { - "$ref": "#\/components\/schemas\/table" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tables" - ], - "example": { - "total": 5, - "tables": "" - } - }, - "collectionList": { - "description": "Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "$ref": "#\/components\/schemas\/collection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "$ref": "#\/components\/schemas\/database" - }, - "x-example": "" - } - }, - "required": [ - "total", - "databases" - ], - "example": { - "total": 5, - "databases": "" - } - }, - "indexList": { - "description": "Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "columnIndexList": { - "description": "Column Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "$ref": "#\/components\/schemas\/columnIndex" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "userList": { - "description": "Users List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of users that matched your query.", - "x-example": 5, - "format": "int32" - }, - "users": { - "type": "array", - "description": "List of users.", - "items": { - "$ref": "#\/components\/schemas\/user" - }, - "x-example": "" - } - }, - "required": [ - "total", - "users" - ], - "example": { - "total": 5, - "users": "" - } - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "$ref": "#\/components\/schemas\/session" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sessions" - ], - "example": { - "total": 5, - "sessions": "" - } - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "$ref": "#\/components\/schemas\/identity" - }, - "x-example": "" - } - }, - "required": [ - "total", - "identities" - ], - "example": { - "total": 5, - "identities": "" - } - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { - "$ref": "#\/components\/schemas\/log" - }, - "x-example": "" - } - }, - "required": [ - "total", - "logs" - ], - "example": { - "total": 5, - "logs": "" - } - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "$ref": "#\/components\/schemas\/file" - }, - "x-example": "" - } - }, - "required": [ - "total", - "files" - ], - "example": { - "total": 5, - "files": "" - } - }, - "bucketList": { - "description": "Buckets List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { - "$ref": "#\/components\/schemas\/bucket" - }, - "x-example": "" - } - }, - "required": [ - "total", - "buckets" - ], - "example": { - "total": 5, - "buckets": "" - } - }, - "resourceTokenList": { - "description": "Resource Tokens List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tokens that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tokens": { - "type": "array", - "description": "List of tokens.", - "items": { - "$ref": "#\/components\/schemas\/resourceToken" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tokens" - ], - "example": { - "total": 5, - "tokens": "" - } - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "$ref": "#\/components\/schemas\/team" - }, - "x-example": "" - } - }, - "required": [ - "total", - "teams" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { - "$ref": "#\/components\/schemas\/membership" - }, - "x-example": "" - } - }, - "required": [ - "total", - "memberships" - ], - "example": { - "total": 5, - "memberships": "" - } - }, - "siteList": { - "description": "Sites List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sites that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "List of sites.", - "items": { - "$ref": "#\/components\/schemas\/site" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sites" - ], - "example": { - "total": 5, - "sites": "" - } - }, - "templateSiteList": { - "description": "Site Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "$ref": "#\/components\/schemas\/templateSite" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "functionList": { - "description": "Functions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of functions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "List of functions.", - "items": { - "$ref": "#\/components\/schemas\/function" - }, - "x-example": "" - } - }, - "required": [ - "total", - "functions" - ], - "example": { - "total": 5, - "functions": "" - } - }, - "templateFunctionList": { - "description": "Function Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "$ref": "#\/components\/schemas\/templateFunction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "installationList": { - "description": "Installations List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of installations that matched your query.", - "x-example": 5, - "format": "int32" - }, - "installations": { - "type": "array", - "description": "List of installations.", - "items": { - "$ref": "#\/components\/schemas\/installation" - }, - "x-example": "" - } - }, - "required": [ - "total", - "installations" - ], - "example": { - "total": 5, - "installations": "" - } - }, - "providerRepositoryFrameworkList": { - "description": "Framework Provider Repositories List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of frameworkProviderRepositories that matched your query.", - "x-example": 5, - "format": "int32" - }, - "frameworkProviderRepositories": { - "type": "array", - "description": "List of frameworkProviderRepositories.", - "items": { - "$ref": "#\/components\/schemas\/providerRepositoryFramework" - }, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Provider repository list type.", - "x-example": "framework" - } - }, - "required": [ - "total", - "frameworkProviderRepositories", - "type" - ], - "example": { - "total": 5, - "frameworkProviderRepositories": "", - "type": "framework" - } - }, - "providerRepositoryRuntimeList": { - "description": "Runtime Provider Repositories List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimeProviderRepositories that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimeProviderRepositories": { - "type": "array", - "description": "List of runtimeProviderRepositories.", - "items": { - "$ref": "#\/components\/schemas\/providerRepositoryRuntime" - }, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Provider repository list type.", - "x-example": "runtime" - } - }, - "required": [ - "total", - "runtimeProviderRepositories", - "type" - ], - "example": { - "total": 5, - "runtimeProviderRepositories": "", - "type": "runtime" - } - }, - "branchList": { - "description": "Branches List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of branches that matched your query.", - "x-example": 5, - "format": "int32" - }, - "branches": { - "type": "array", - "description": "List of branches.", - "items": { - "$ref": "#\/components\/schemas\/branch" - }, - "x-example": "" - } - }, - "required": [ - "total", - "branches" - ], - "example": { - "total": 5, - "branches": "" - } - }, - "frameworkList": { - "description": "Frameworks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of frameworks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "frameworks": { - "type": "array", - "description": "List of frameworks.", - "items": { - "$ref": "#\/components\/schemas\/framework" - }, - "x-example": "" - } - }, - "required": [ - "total", - "frameworks" - ], - "example": { - "total": 5, - "frameworks": "" - } - }, - "runtimeList": { - "description": "Runtimes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { - "$ref": "#\/components\/schemas\/runtime" - }, - "x-example": "" - } - }, - "required": [ - "total", - "runtimes" - ], - "example": { - "total": 5, - "runtimes": "" - } - }, - "deploymentList": { - "description": "Deployments List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments that matched your query.", - "x-example": 5, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { - "$ref": "#\/components\/schemas\/deployment" - }, - "x-example": "" - } - }, - "required": [ - "total", - "deployments" - ], - "example": { - "total": 5, - "deployments": "" - } - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "$ref": "#\/components\/schemas\/execution" - }, - "x-example": "" - } - }, - "required": [ - "total", - "executions" - ], - "example": { - "total": 5, - "executions": "" - } - }, - "projectList": { - "description": "Projects List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of projects that matched your query.", - "x-example": 5, - "format": "int32" - }, - "projects": { - "type": "array", - "description": "List of projects.", - "items": { - "$ref": "#\/components\/schemas\/project" - }, - "x-example": "" - } - }, - "required": [ - "total", - "projects" - ], - "example": { - "total": 5, - "projects": "" - } - }, - "webhookList": { - "description": "Webhooks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of webhooks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "webhooks": { - "type": "array", - "description": "List of webhooks.", - "items": { - "$ref": "#\/components\/schemas\/webhook" - }, - "x-example": "" - } - }, - "required": [ - "total", - "webhooks" - ], - "example": { - "total": 5, - "webhooks": "" - } - }, - "keyList": { - "description": "API Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of keys that matched your query.", - "x-example": 5, - "format": "int32" - }, - "keys": { - "type": "array", - "description": "List of keys.", - "items": { - "$ref": "#\/components\/schemas\/key" - }, - "x-example": "" - } - }, - "required": [ - "total", - "keys" - ], - "example": { - "total": 5, - "keys": "" - } - }, - "devKeyList": { - "description": "Dev Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of devKeys that matched your query.", - "x-example": 5, - "format": "int32" - }, - "devKeys": { - "type": "array", - "description": "List of devKeys.", - "items": { - "$ref": "#\/components\/schemas\/devKey" - }, - "x-example": "" - } - }, - "required": [ - "total", - "devKeys" - ], - "example": { - "total": 5, - "devKeys": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "$ref": "#\/components\/schemas\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "$ref": "#\/components\/schemas\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "$ref": "#\/components\/schemas\/language" - }, - "x-example": "" - } - }, - "required": [ - "total", - "languages" - ], - "example": { - "total": 5, - "languages": "" - } - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "$ref": "#\/components\/schemas\/currency" - }, - "x-example": "" - } - }, - "required": [ - "total", - "currencies" - ], - "example": { - "total": 5, - "currencies": "" - } - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "$ref": "#\/components\/schemas\/phone" - }, - "x-example": "" - } - }, - "required": [ - "total", - "phones" - ], - "example": { - "total": 5, - "phones": "" - } - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": "" - } - }, - "required": [ - "total", - "variables" - ], - "example": { - "total": 5, - "variables": "" - } - }, - "mockNumberList": { - "description": "Mock Numbers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of mockNumbers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "mockNumbers": { - "type": "array", - "description": "List of mockNumbers.", - "items": { - "$ref": "#\/components\/schemas\/mockNumber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "mockNumbers" - ], - "example": { - "total": 5, - "mockNumbers": "" - } - }, - "policyList": { - "description": "Policies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of policies in the given project.", - "x-example": 9, - "format": "int32" - }, - "policies": { - "type": "array", - "description": "List of policies.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/policyPasswordDictionary" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordHistory" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordPersonalData" - }, - { - "$ref": "#\/components\/schemas\/policySessionAlert" - }, - { - "$ref": "#\/components\/schemas\/policySessionDuration" - }, - { - "$ref": "#\/components\/schemas\/policySessionInvalidation" - }, - { - "$ref": "#\/components\/schemas\/policySessionLimit" - }, - { - "$ref": "#\/components\/schemas\/policyUserLimit" - }, - { - "$ref": "#\/components\/schemas\/policyMembershipPrivacy" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", - "password-history": "#\/components\/schemas\/policyPasswordHistory", - "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", - "session-alert": "#\/components\/schemas\/policySessionAlert", - "session-duration": "#\/components\/schemas\/policySessionDuration", - "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", - "session-limit": "#\/components\/schemas\/policySessionLimit", - "user-limit": "#\/components\/schemas\/policyUserLimit", - "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "policies" - ], - "example": { - "total": 9, - "policies": "" - } - }, - "emailTemplateList": { - "description": "Email Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "$ref": "#\/components\/schemas\/emailTemplate" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "healthStatusList": { - "description": "Status List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of statuses that matched your query.", - "x-example": 5, - "format": "int32" - }, - "statuses": { - "type": "array", - "description": "List of statuses.", - "items": { - "$ref": "#\/components\/schemas\/healthStatus" - }, - "x-example": "" - } - }, - "required": [ - "total", - "statuses" - ], - "example": { - "total": 5, - "statuses": "" - } - }, - "proxyRuleList": { - "description": "Rule List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rules that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rules": { - "type": "array", - "description": "List of rules.", - "items": { - "$ref": "#\/components\/schemas\/proxyRule" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rules" - ], - "example": { - "total": 5, - "rules": "" - } - }, - "scheduleList": { - "description": "Schedules List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of schedules that matched your query.", - "x-example": 5, - "format": "int32" - }, - "schedules": { - "type": "array", - "description": "List of schedules.", - "items": { - "$ref": "#\/components\/schemas\/schedule" - }, - "x-example": "" - } - }, - "required": [ - "total", - "schedules" - ], - "example": { - "total": 5, - "schedules": "" - } - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "$ref": "#\/components\/schemas\/localeCode" - }, - "x-example": "" - } - }, - "required": [ - "total", - "localeCodes" - ], - "example": { - "total": 5, - "localeCodes": "" - } - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "$ref": "#\/components\/schemas\/provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "$ref": "#\/components\/schemas\/message" - }, - "x-example": "" - } - }, - "required": [ - "total", - "messages" - ], - "example": { - "total": 5, - "messages": "" - } - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "$ref": "#\/components\/schemas\/topic" - }, - "x-example": "" - } - }, - "required": [ - "total", - "topics" - ], - "example": { - "total": 5, - "topics": "" - } - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "$ref": "#\/components\/schemas\/subscriber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "subscribers" - ], - "example": { - "total": 5, - "subscribers": "" - } - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": "" - } - }, - "required": [ - "total", - "targets" - ], - "example": { - "total": 5, - "targets": "" - } - }, - "transactionList": { - "description": "Transaction List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "$ref": "#\/components\/schemas\/transaction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "transactions" - ], - "example": { - "total": 5, - "transactions": "" - } - }, - "migrationList": { - "description": "Migrations List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of migrations that matched your query.", - "x-example": 5, - "format": "int32" - }, - "migrations": { - "type": "array", - "description": "List of migrations.", - "items": { - "$ref": "#\/components\/schemas\/migration" - }, - "x-example": "" - } - }, - "required": [ - "total", - "migrations" - ], - "example": { - "total": 5, - "migrations": "" - } - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "$ref": "#\/components\/schemas\/specification" - }, - "x-example": "" - } - }, - "required": [ - "total", - "specifications" - ], - "example": { - "total": 5, - "specifications": "" - } - }, - "vcsContentList": { - "description": "VCS Content List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of contents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "contents": { - "type": "array", - "description": "List of contents.", - "items": { - "$ref": "#\/components\/schemas\/vcsContent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "contents" - ], - "example": { - "total": 5, - "contents": "" - } - }, - "vectorsdbCollectionList": { - "description": "VectorsDB Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "embeddingList": { - "description": "Embedding list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of embeddings that matched your query.", - "x-example": 5, - "format": "int32" - }, - "embeddings": { - "type": "array", - "description": "List of embeddings.", - "items": { - "$ref": "#\/components\/schemas\/embedding" - }, - "x-example": "" - } - }, - "required": [ - "total", - "embeddings" - ], - "example": { - "total": 5, - "embeddings": "" - } - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "type": { - "type": "string", - "description": "Database type.", - "x-example": "legacy", - "enum": [ - "legacy", - "tablesdb", - "documentsdb", - "vectorsdb" - ] - } - }, - "required": [ - "$id", - "name", - "$createdAt", - "$updatedAt", - "enabled", - "type" - ], - "example": { - "$id": "5e5ea5c16897e", - "name": "My Database", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "enabled": false, - "type": "legacy" - } - }, - "embedding": { - "description": "Embedding", - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" - }, - "dimension": { - "type": "integer", - "description": "Number of dimensions for each embedding vector.", - "x-example": 768, - "format": "int32" - }, - "embedding": { - "type": "array", - "description": "Embedding vector values. If an error occurs, this will be an empty array.", - "items": { - "type": "number", - "format": "double" - }, - "x-example": [ - 0.01, - 0.02, - 0.03 - ] - }, - "error": { - "type": "string", - "description": "Error message if embedding generation fails. Empty string if no error.", - "x-example": "Error message" - } - }, - "required": [ - "model", - "dimension", - "embedding", - "error" - ], - "example": { - "model": "embeddinggemma", - "dimension": 768, - "embedding": [ - 0.01, - 0.02, - 0.03 - ], - "error": "Error message" - } - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeInteger" - }, - { - "$ref": "#\/components\/schemas\/attributeFloat" - }, - { - "$ref": "#\/components\/schemas\/attributeEmail" - }, - { - "$ref": "#\/components\/schemas\/attributeEnum" - }, - { - "$ref": "#\/components\/schemas\/attributeUrl" - }, - { - "$ref": "#\/components\/schemas\/attributeIp" - }, - { - "$ref": "#\/components\/schemas\/attributeDatetime" - }, - { - "$ref": "#\/components\/schemas\/attributeRelationship" - }, - { - "$ref": "#\/components\/schemas\/attributePoint" - }, - { - "$ref": "#\/components\/schemas\/attributeLine" - }, - { - "$ref": "#\/components\/schemas\/attributePolygon" - }, - { - "$ref": "#\/components\/schemas\/attributeVarchar" - }, - { - "$ref": "#\/components\/schemas\/attributeText" - }, - { - "$ref": "#\/components\/schemas\/attributeMediumtext" - }, - { - "$ref": "#\/components\/schemas\/attributeLongtext" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship", - "point": "#\/components\/schemas\/attributePoint", - "linestring": "#\/components\/schemas\/attributeLine", - "polygon": "#\/components\/schemas\/attributePolygon", - "varchar": "#\/components\/schemas\/attributeVarchar", - "text": "#\/components\/schemas\/attributeText", - "mediumtext": "#\/components\/schemas\/attributeMediumtext", - "longtext": "#\/components\/schemas\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributePoint": { - "type": "point" - }, - "#\/components\/schemas\/attributeLine": { - "type": "linestring" - }, - "#\/components\/schemas\/attributePolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/attributeVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/attributeText": { - "type": "text" - }, - "#\/components\/schemas\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/attributeLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "attributeList": { - "description": "Attributes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" - }, - "attributes": { - "type": "array", - "description": "List of attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeInteger" - }, - { - "$ref": "#\/components\/schemas\/attributeFloat" - }, - { - "$ref": "#\/components\/schemas\/attributeEmail" - }, - { - "$ref": "#\/components\/schemas\/attributeEnum" - }, - { - "$ref": "#\/components\/schemas\/attributeUrl" - }, - { - "$ref": "#\/components\/schemas\/attributeIp" - }, - { - "$ref": "#\/components\/schemas\/attributeDatetime" - }, - { - "$ref": "#\/components\/schemas\/attributeRelationship" - }, - { - "$ref": "#\/components\/schemas\/attributePoint" - }, - { - "$ref": "#\/components\/schemas\/attributeLine" - }, - { - "$ref": "#\/components\/schemas\/attributePolygon" - }, - { - "$ref": "#\/components\/schemas\/attributeVarchar" - }, - { - "$ref": "#\/components\/schemas\/attributeText" - }, - { - "$ref": "#\/components\/schemas\/attributeMediumtext" - }, - { - "$ref": "#\/components\/schemas\/attributeLongtext" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship", - "point": "#\/components\/schemas\/attributePoint", - "linestring": "#\/components\/schemas\/attributeLine", - "polygon": "#\/components\/schemas\/attributePolygon", - "varchar": "#\/components\/schemas\/attributeVarchar", - "text": "#\/components\/schemas\/attributeText", - "mediumtext": "#\/components\/schemas\/attributeMediumtext", - "longtext": "#\/components\/schemas\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributePoint": { - "type": "point" - }, - "#\/components\/schemas\/attributeLine": { - "type": "linestring" - }, - "#\/components\/schemas\/attributePolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/attributeVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/attributeText": { - "type": "text" - }, - "#\/components\/schemas\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/attributeLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "attributes" - ], - "example": { - "total": 5, - "attributes": "" - } - }, - "attributeString": { - "description": "AttributeString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeInteger": { - "description": "AttributeInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int32", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "attributeFloat": { - "description": "AttributeFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "nullable": true - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "attributeBoolean": { - "description": "AttributeBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "attributeEmail": { - "description": "AttributeEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "attributeEnum": { - "description": "AttributeEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "attributeIp": { - "description": "AttributeIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "192.0.2.0", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "attributeUrl": { - "description": "AttributeURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http:\/\/example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "http:\/\/example.com" - } - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedCollection": "collection", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "attributePoint": { - "description": "AttributePoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - 0, - 0 - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "attributeLine": { - "description": "AttributeLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "attributePolygon": { - "description": "AttributePolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "attributeVarchar": { - "description": "AttributeVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeText": { - "description": "AttributeText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeMediumtext": { - "description": "AttributeMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeLongtext": { - "description": "AttributeLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "usageDocumentsDB": { - "description": "UsageDocumentsDB", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "documents": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "vectorsdbCollection": { - "description": "VectorsDB Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeObject" - }, - { - "$ref": "#\/components\/schemas\/attributeVector" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "object": "#\/components\/schemas\/attributeObject", - "vector": "#\/components\/schemas\/attributeVector" - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed", - "dimension" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500, - "dimension": 1536 - } - }, - "attributeObject": { - "description": "AttributeObject", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeVector": { - "description": "AttributeVector", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Vector dimensions.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 1536 - } - }, - "usageVectorsDBs": { - "description": "UsageVectorsDBs", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB databases.", - "x-example": 0, - "format": "int32" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage in bytes.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "Aggregated number of databases per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "documents", - "storage", - "databasesReads", - "databasesWrites" - ], - "example": { - "range": "30d", - "databasesTotal": 0, - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "databases": [], - "collections": [], - "documents": [], - "storage": [], - "databasesReads": [], - "databasesWrites": [] - } - }, - "usageVectorsDB": { - "description": "UsageVectorsDB", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "documents": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "table": { - "description": "Table", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Table creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Table update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Table name.", - "x-example": "My Table" - }, - "enabled": { - "type": "boolean", - "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "rowSecurity": { - "type": "boolean", - "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "columns": { - "type": "array", - "description": "Table columns.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnPoint" - }, - { - "$ref": "#\/components\/schemas\/columnLine" - }, - { - "$ref": "#\/components\/schemas\/columnPolygon" - }, - { - "$ref": "#\/components\/schemas\/columnVarchar" - }, - { - "$ref": "#\/components\/schemas\/columnText" - }, - { - "$ref": "#\/components\/schemas\/columnMediumtext" - }, - { - "$ref": "#\/components\/schemas\/columnLongtext" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship", - "point": "#\/components\/schemas\/columnPoint", - "linestring": "#\/components\/schemas\/columnLine", - "polygon": "#\/components\/schemas\/columnPolygon", - "varchar": "#\/components\/schemas\/columnVarchar", - "text": "#\/components\/schemas\/columnText", - "mediumtext": "#\/components\/schemas\/columnMediumtext", - "longtext": "#\/components\/schemas\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnPoint": { - "type": "point" - }, - "#\/components\/schemas\/columnLine": { - "type": "linestring" - }, - "#\/components\/schemas\/columnPolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/columnVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/columnText": { - "type": "text" - }, - "#\/components\/schemas\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/columnLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Table indexes.", - "items": { - "$ref": "#\/components\/schemas\/columnIndex" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum row size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used row size in bytes based on defined columns.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "rowSecurity", - "columns", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Table", - "enabled": false, - "rowSecurity": true, - "columns": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "columnList": { - "description": "Columns List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of columns in the given table.", - "x-example": 5, - "format": "int32" - }, - "columns": { - "type": "array", - "description": "List of columns.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnPoint" - }, - { - "$ref": "#\/components\/schemas\/columnLine" - }, - { - "$ref": "#\/components\/schemas\/columnPolygon" - }, - { - "$ref": "#\/components\/schemas\/columnVarchar" - }, - { - "$ref": "#\/components\/schemas\/columnText" - }, - { - "$ref": "#\/components\/schemas\/columnMediumtext" - }, - { - "$ref": "#\/components\/schemas\/columnLongtext" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship", - "point": "#\/components\/schemas\/columnPoint", - "linestring": "#\/components\/schemas\/columnLine", - "polygon": "#\/components\/schemas\/columnPolygon", - "varchar": "#\/components\/schemas\/columnVarchar", - "text": "#\/components\/schemas\/columnText", - "mediumtext": "#\/components\/schemas\/columnMediumtext", - "longtext": "#\/components\/schemas\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnPoint": { - "type": "point" - }, - "#\/components\/schemas\/columnLine": { - "type": "linestring" - }, - "#\/components\/schemas\/columnPolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/columnVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/columnText": { - "type": "text" - }, - "#\/components\/schemas\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/columnLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "columns" - ], - "example": { - "total": 5, - "columns": "" - } - }, - "columnString": { - "description": "ColumnString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnInteger": { - "description": "ColumnInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 10, - "format": "int32", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "columnFloat": { - "description": "ColumnFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "nullable": true - }, - "default": { - "type": "number", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 2.5, - "format": "double", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "columnBoolean": { - "description": "ColumnBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "columnEmail": { - "description": "ColumnEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default@example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "columnEnum": { - "description": "ColumnEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "element", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "columnIp": { - "description": "ColumnIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "192.0.2.0", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "columnUrl": { - "description": "ColumnURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "https:\/\/example.com" - } - }, - "columnDatetime": { - "description": "ColumnDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "columnRelationship": { - "description": "ColumnRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedTable": { - "type": "string", - "description": "The ID of the related table.", - "x-example": "table" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedTable", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedTable": "table", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "columnPoint": { - "description": "ColumnPoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - 0, - 0 - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "columnLine": { - "description": "ColumnLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "columnPolygon": { - "description": "ColumnPolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "columnVarchar": { - "description": "ColumnVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnText": { - "description": "ColumnText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnMediumtext": { - "description": "ColumnMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnLongtext": { - "description": "ColumnLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "index": { - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ] - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index attributes length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "attributes", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "attributes": [], - "lengths": [], - "orders": [] - } - }, - "columnIndex": { - "description": "Index", - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "columns": { - "type": "array", - "description": "Index columns.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index columns length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "columns", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "columns": [], - "lengths": [], - "orders": [] - } - }, - "row": { - "description": "Row", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] - } - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false - } - }, - "presence": { - "description": "Presence", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Presence sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Presence creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Presence update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userInternalId": { - "type": "string", - "description": "User internal ID.", - "x-example": "1" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", - "required": [ - "$id", - "$sequence", - "$createdAt", - "$updatedAt", - "$permissions", - "userInternalId", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userInternalId": "1", - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ], - "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" - } - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/algoArgon2" - }, - { - "$ref": "#\/components\/schemas\/algoScrypt" - }, - { - "$ref": "#\/components\/schemas\/algoScryptModified" - }, - { - "$ref": "#\/components\/schemas\/algoBcrypt" - }, - { - "$ref": "#\/components\/schemas\/algoPhpass" - }, - { - "$ref": "#\/components\/schemas\/algoSha" - }, - { - "$ref": "#\/components\/schemas\/algoMd5" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/components\/schemas\/algoArgon2", - "scrypt": "#\/components\/schemas\/algoScrypt", - "scryptMod": "#\/components\/schemas\/algoScryptModified", - "bcrypt": "#\/components\/schemas\/algoBcrypt", - "phpass": "#\/components\/schemas\/algoPhpass", - "sha": "#\/components\/schemas\/algoSha", - "md5": "#\/components\/schemas\/algoMd5" - } - } - }, - "nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#\/components\/schemas\/preferences" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "nullable": true - }, - "impersonatorUserId": { - "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" - } - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" - } - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": [ - "jwt" - ], - "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the European Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ], - "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" - } - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": [ - "code", - "name" - ], - "example": { - "code": "en-us", - "name": "US" - } - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true - }, - "compression": { - "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" - ], - "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" - } - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { - "type": "string" - }, - "x-example": [ - "jpg", - "png" - ] - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Image transformations are enabled.", - "x-example": false - }, - "totalSize": { - "type": "integer", - "description": "Total size of this bucket in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus", - "transformations", - "totalSize" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "fileSecurity": true, - "name": "Documents", - "enabled": false, - "maximumFileSize": 100, - "allowedFileExtensions": [ - "jpg", - "png" - ], - "compression": "gzip", - "encryption": false, - "antivirus": false, - "transformations": false, - "totalSize": 128 - } - }, - "resourceToken": { - "description": "ResourceToken", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "files" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "resourceId", - "resourceType", - "expire", - "secret", - "accessedAt" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", - "resourceType": "files", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "accessedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#\/components\/schemas\/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } - } - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": [ - "owner" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "roles": [ - "owner" - ] - } - }, - "site": { - "description": "Site", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Site ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Site creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Site update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Site name.", - "x-example": "My Site" - }, - "enabled": { - "type": "boolean", - "description": "Site enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "framework": { - "type": "string", - "description": "Site framework.", - "x-example": "react" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Site's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "deploymentScreenshotLight": { - "type": "string", - "description": "Screenshot of active deployment with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentScreenshotDark": { - "type": "string", - "description": "Screenshot of active deployment with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentId": { - "type": "string", - "description": "Site's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "vars": { - "type": "array", - "description": "Site variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": [] - }, - "timeout": { - "type": "integer", - "description": "Site request timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "The install command used to install the site dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "The build command used to build the site.", - "x-example": "npm run build" - }, - "startCommand": { - "type": "string", - "description": "Custom command to use when starting site runtime.", - "x-example": "node custom-server.mjs" - }, - "outputDirectory": { - "type": "string", - "description": "The directory where the site build output is located.", - "x-example": "build" - }, - "installationId": { - "type": "string", - "description": "Site VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": "sites\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for SSR executions.", - "x-example": "s-1vcpu-512mb" - }, - "buildRuntime": { - "type": "string", - "description": "Site build runtime.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework adapter.", - "x-example": "static" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "enabled", - "live", - "logging", - "framework", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "deploymentScreenshotLight", - "deploymentScreenshotDark", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "vars", - "timeout", - "installCommand", - "buildCommand", - "startCommand", - "outputDirectory", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification", - "buildRuntime", - "adapter", - "fallbackFile" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Site", - "enabled": false, - "live": false, - "logging": false, - "framework": "react", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "deploymentScreenshotLight": "5e5ea5c16897e", - "deploymentScreenshotDark": "5e5ea5c16897e", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "vars": [], - "timeout": 300, - "installCommand": "npm install", - "buildCommand": "npm run build", - "startCommand": "node custom-server.mjs", - "outputDirectory": "build", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "sites\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb", - "buildRuntime": "node-22", - "adapter": "static", - "fallbackFile": "index.html" - } - }, - "templateSite": { - "description": "Template Site", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Site Template ID.", - "x-example": "starter" - }, - "name": { - "type": "string", - "description": "Site Template Name.", - "x-example": "Starter site" - }, - "tagline": { - "type": "string", - "description": "Short description of template", - "x-example": "Minimal web app integrating with Appwrite." - }, - "demoUrl": { - "type": "string", - "description": "URL hosting a template demo.", - "x-example": "https:\/\/nextjs-starter.appwrite.network\/" - }, - "screenshotDark": { - "type": "string", - "description": "File URL with preview screenshot in dark theme preference.", - "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png" - }, - "screenshotLight": { - "type": "string", - "description": "File URL with preview screenshot in light theme preference.", - "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png" - }, - "useCases": { - "type": "array", - "description": "Site use cases.", - "items": { - "type": "string" - }, - "x-example": "Starter" - }, - "frameworks": { - "type": "array", - "description": "List of frameworks that can be used with this template.", - "items": { - "$ref": "#\/components\/schemas\/templateFramework" - }, - "x-example": [] - }, - "vcsProvider": { - "type": "string", - "description": "VCS (Version Control System) Provider.", - "x-example": "github" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "templates" - }, - "providerOwner": { - "type": "string", - "description": "VCS (Version Control System) Owner.", - "x-example": "appwrite" - }, - "providerVersion": { - "type": "string", - "description": "VCS (Version Control System) branch version (tag).", - "x-example": "main" - }, - "variables": { - "type": "array", - "description": "Site variables.", - "items": { - "$ref": "#\/components\/schemas\/templateVariable" - }, - "x-example": [] - } - }, - "required": [ - "key", - "name", - "tagline", - "demoUrl", - "screenshotDark", - "screenshotLight", - "useCases", - "frameworks", - "vcsProvider", - "providerRepositoryId", - "providerOwner", - "providerVersion", - "variables" - ], - "example": { - "key": "starter", - "name": "Starter site", - "tagline": "Minimal web app integrating with Appwrite.", - "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", - "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", - "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", - "useCases": "Starter", - "frameworks": [], - "vcsProvider": "github", - "providerRepositoryId": "templates", - "providerOwner": "appwrite", - "providerVersion": "main", - "variables": [] - } - }, - "templateFramework": { - "description": "Template Framework", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Parent framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "installCommand": { - "type": "string", - "description": "The install command used to install the dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "The output directory to store the build output.", - "x-example": ".\/build" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": ".\/svelte-kit\/starter" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime used during build step of template.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework runtime", - "x-example": "ssr" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for SPA. Only relevant for static serve runtime.", - "x-example": "index.html" - } - }, - "required": [ - "key", - "name", - "installCommand", - "buildCommand", - "outputDirectory", - "providerRootDirectory", - "buildRuntime", - "adapter", - "fallbackFile" - ], - "example": { - "key": "sveltekit", - "name": "SvelteKit", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/build", - "providerRootDirectory": ".\/svelte-kit\/starter", - "buildRuntime": "node-22", - "adapter": "ssr", - "fallbackFile": "index.html" - } - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "runtime": { - "type": "string", - "description": "Function execution and build runtime.", - "x-example": "python-3.8" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentId": { - "type": "string", - "description": "Function's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "execute": "users", - "name": "My Function", - "enabled": false, - "live": false, - "logging": false, - "runtime": "python-3.8", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "scopes": "users.read", - "vars": [], - "events": "account.create", - "schedule": "5 4 * * *", - "timeout": 300, - "entrypoint": "index.js", - "commands": "npm install", - "version": "v2", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "functions\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb" - } - }, - "templateFunction": { - "description": "Template Function", - "type": "object", - "properties": { - "icon": { - "type": "string", - "description": "Function Template Icon.", - "x-example": "icon-lightning-bolt" - }, - "id": { - "type": "string", - "description": "Function Template ID.", - "x-example": "starter" - }, - "name": { - "type": "string", - "description": "Function Template Name.", - "x-example": "Starter function" - }, - "tagline": { - "type": "string", - "description": "Function Template Tagline.", - "x-example": "A simple function to get started." - }, - "permissions": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "any" - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "cron": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "0 0 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "useCases": { - "type": "array", - "description": "Function use cases.", - "items": { - "type": "string" - }, - "x-example": "Starter" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes that can be used with this template.", - "items": { - "$ref": "#\/components\/schemas\/templateRuntime" - }, - "x-example": [] - }, - "instructions": { - "type": "string", - "description": "Function Template Instructions.", - "x-example": "For documentation and instructions check out <link>." - }, - "vcsProvider": { - "type": "string", - "description": "VCS (Version Control System) Provider.", - "x-example": "github" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "templates" - }, - "providerOwner": { - "type": "string", - "description": "VCS (Version Control System) Owner.", - "x-example": "appwrite" - }, - "providerVersion": { - "type": "string", - "description": "VCS (Version Control System) branch version (tag).", - "x-example": "main" - }, - "variables": { - "type": "array", - "description": "Function variables.", - "items": { - "$ref": "#\/components\/schemas\/templateVariable" - }, - "x-example": [] - }, - "scopes": { - "type": "array", - "description": "Function scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - } - }, - "required": [ - "icon", - "id", - "name", - "tagline", - "permissions", - "events", - "cron", - "timeout", - "useCases", - "runtimes", - "instructions", - "vcsProvider", - "providerRepositoryId", - "providerOwner", - "providerVersion", - "variables", - "scopes" - ], - "example": { - "icon": "icon-lightning-bolt", - "id": "starter", - "name": "Starter function", - "tagline": "A simple function to get started.", - "permissions": "any", - "events": "account.create", - "cron": "0 0 * * *", - "timeout": 300, - "useCases": "Starter", - "runtimes": [], - "instructions": "For documentation and instructions check out <link>.", - "vcsProvider": "github", - "providerRepositoryId": "templates", - "providerOwner": "appwrite", - "providerVersion": "main", - "variables": [], - "scopes": "users.read" - } - }, - "templateRuntime": { - "description": "Template Runtime", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "node-19.0" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "node\/starter" - } - }, - "required": [ - "name", - "commands", - "entrypoint", - "providerRootDirectory" - ], - "example": { - "name": "node-19.0", - "commands": "npm install", - "entrypoint": "index.js", - "providerRootDirectory": "node\/starter" - } - }, - "templateVariable": { - "description": "Template Variable", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Variable Name.", - "x-example": "APPWRITE_DATABASE_ID" - }, - "description": { - "type": "string", - "description": "Variable Description.", - "x-example": "The ID of the Appwrite database that contains the collection to sync." - }, - "value": { - "type": "string", - "description": "Variable Value.", - "x-example": "512" - }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false - }, - "placeholder": { - "type": "string", - "description": "Variable Placeholder.", - "x-example": "64a55...7b912" - }, - "required": { - "type": "boolean", - "description": "Is the variable required?", - "x-example": false - }, - "type": { - "type": "string", - "description": "Variable Type.", - "x-example": "password" - } - }, - "required": [ - "name", - "description", - "value", - "secret", - "placeholder", - "required", - "type" - ], - "example": { - "name": "APPWRITE_DATABASE_ID", - "description": "The ID of the Appwrite database that contains the collection to sync.", - "value": "512", - "secret": false, - "placeholder": "64a55...7b912", - "required": false, - "type": "password" - } - }, - "installation": { - "description": "Installation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name.", - "x-example": "appwrite" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "5322" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "provider", - "organization", - "providerInstallationId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "provider": "github", - "organization": "appwrite", - "providerInstallationId": "5322" - } - }, - "providerRepository": { - "description": "ProviderRepository", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "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" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "108104697" - }, - "authorized": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository authorized for the installation?", - "x-example": true - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "string" - }, - "x-example": [ - "PORT", - "NODE_ENV" - ] - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "defaultBranch", - "providerInstallationId", - "authorized", - "pushedAt", - "variables" - ], - "example": { - "id": "5e5ea5c16897e", - "name": "appwrite", - "organization": "appwrite", - "provider": "github", - "private": true, - "defaultBranch": "main", - "providerInstallationId": "108104697", - "authorized": true, - "pushedAt": "datetime", - "variables": [ - "PORT", - "NODE_ENV" - ] - } - }, - "providerRepositoryFramework": { - "description": "ProviderRepositoryFramework", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "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" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "108104697" - }, - "authorized": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository authorized for the installation?", - "x-example": true - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "string" - }, - "x-example": [ - "PORT", - "NODE_ENV" - ] - }, - "framework": { - "type": "string", - "description": "Auto-detected framework. Empty if type is not \"framework\".", - "x-example": "nextjs" - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "defaultBranch", - "providerInstallationId", - "authorized", - "pushedAt", - "variables", - "framework" - ], - "example": { - "id": "5e5ea5c16897e", - "name": "appwrite", - "organization": "appwrite", - "provider": "github", - "private": true, - "defaultBranch": "main", - "providerInstallationId": "108104697", - "authorized": true, - "pushedAt": "datetime", - "variables": [ - "PORT", - "NODE_ENV" - ], - "framework": "nextjs" - } - }, - "providerRepositoryRuntime": { - "description": "ProviderRepositoryRuntime", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "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" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "108104697" - }, - "authorized": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository authorized for the installation?", - "x-example": true - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "string" - }, - "x-example": [ - "PORT", - "NODE_ENV" - ] - }, - "runtime": { - "type": "string", - "description": "Auto-detected runtime. Empty if type is not \"runtime\".", - "x-example": "node-22" - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "defaultBranch", - "providerInstallationId", - "authorized", - "pushedAt", - "variables", - "runtime" - ], - "example": { - "id": "5e5ea5c16897e", - "name": "appwrite", - "organization": "appwrite", - "provider": "github", - "private": true, - "defaultBranch": "main", - "providerInstallationId": "108104697", - "authorized": true, - "pushedAt": "datetime", - "variables": [ - "PORT", - "NODE_ENV" - ], - "runtime": "node-22" - } - }, - "detectionFramework": { - "description": "DetectionFramework", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Repository detection type.", - "x-example": "framework", - "enum": [ - "framework" - ] - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "$ref": "#\/components\/schemas\/detectionVariable" - }, - "x-example": {}, - "nullable": true - }, - "framework": { - "type": "string", - "description": "Framework", - "x-example": "nuxt" - }, - "installCommand": { - "type": "string", - "description": "Site Install Command", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Site Build Command", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "Site Output Directory", - "x-example": "dist" - } - }, - "required": [ - "type", - "framework", - "installCommand", - "buildCommand", - "outputDirectory" - ], - "example": { - "type": "framework", - "variables": {}, - "framework": "nuxt", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": "dist" - } - }, - "detectionRuntime": { - "description": "DetectionRuntime", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Repository detection type.", - "x-example": "runtime", - "enum": [ - "runtime" - ] - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "$ref": "#\/components\/schemas\/detectionVariable" - }, - "x-example": {}, - "nullable": true - }, - "runtime": { - "type": "string", - "description": "Runtime", - "x-example": "node" - }, - "entrypoint": { - "type": "string", - "description": "Function Entrypoint", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "Function install and build commands", - "x-example": "npm install && npm run build" - } - }, - "required": [ - "type", - "runtime", - "entrypoint", - "commands" - ], - "example": { - "type": "runtime", - "variables": {}, - "runtime": "node", - "entrypoint": "index.js", - "commands": "npm install && npm run build" - } - }, - "detectionVariable": { - "description": "DetectionVariable", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of environment variable", - "x-example": "NODE_ENV" - }, - "value": { - "type": "string", - "description": "Value of environment variable", - "x-example": "production" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "NODE_ENV", - "value": "production" - } - }, - "vcsContent": { - "description": "VcsContents", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", - "x-example": 1523, - "format": "int32", - "nullable": true - }, - "isDirectory": { - "type": "boolean", - "description": "If a content is a directory. Directories can be used to check nested contents.", - "x-example": true, - "nullable": true - }, - "name": { - "type": "string", - "description": "Name of directory or file.", - "x-example": "Main.java" - } - }, - "required": [ - "name" - ], - "example": { - "size": 1523, - "isDirectory": true, - "name": "Main.java" - } - }, - "branch": { - "description": "Branch", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Branch Name.", - "x-example": "main" - } - }, - "required": [ - "name" - ], - "example": { - "name": "main" - } - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { - "type": "string" - }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ], - "example": { - "$id": "python-3.8", - "key": "python", - "name": "Python", - "version": "3.8", - "base": "python:3.8-alpine", - "image": "appwrite\\\/runtime-for-python:3.8", - "logo": "python.png", - "supports": "amd64" - } - }, - "framework": { - "description": "Framework", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "buildRuntime": { - "type": "string", - "description": "Default runtime version.", - "x-example": "node-22" - }, - "runtimes": { - "type": "array", - "description": "List of supported runtime versions.", - "items": { - "type": "string" - }, - "x-example": [ - "static-1", - "node-22" - ] - }, - "adapters": { - "type": "array", - "description": "List of supported adapters.", - "items": { - "$ref": "#\/components\/schemas\/frameworkAdapter" - }, - "x-example": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "required": [ - "key", - "name", - "buildRuntime", - "runtimes", - "adapters" - ], - "example": { - "key": "sveltekit", - "name": "SvelteKit", - "buildRuntime": "node-22", - "runtimes": [ - "static-1", - "node-22" - ], - "adapters": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "frameworkAdapter": { - "description": "Framework Adapter", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Adapter key.", - "x-example": "static" - }, - "installCommand": { - "type": "string", - "description": "Default command to download dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Default command to build site into output directory.", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "Default output directory of build.", - "x-example": ".\/dist" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "key", - "installCommand", - "buildCommand", - "outputDirectory", - "fallbackFile" - ], - "example": { - "key": "static", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/dist", - "fallbackFile": "index.html" - } - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "sourceSize": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output size in bytes.", - "x-example": 128, - "format": "int32" - }, - "totalSize": { - "type": "integer", - "description": "The total size in bytes (source and build output).", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "screenshotLight": { - "type": "string", - "description": "Screenshot with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "screenshotDark": { - "type": "string", - "description": "Screenshot with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", - "x-example": "ready", - "enum": [ - "waiting", - "processing", - "building", - "ready", - "canceled", - "failed" - ] - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildDuration": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https:\/\/github.com\/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "sourceSize", - "buildSize", - "totalSize", - "buildId", - "activate", - "screenshotLight", - "screenshotDark", - "status", - "buildLogs", - "buildDuration", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranch", - "providerBranchUrl" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "type": "vcs", - "resourceId": "5e5ea6g16897e", - "resourceType": "functions", - "entrypoint": "index.js", - "sourceSize": 128, - "buildSize": 128, - "totalSize": 128, - "buildId": "5e5ea5c16897e", - "activate": true, - "screenshotLight": "5e5ea5c16897e", - "screenshotDark": "5e5ea5c16897e", - "status": "ready", - "buildLogs": "Compiling source files...", - "buildDuration": 128, - "providerRepositoryName": "database", - "providerRepositoryOwner": "utopia", - "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerCommitHash": "7c3f25d", - "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", - "providerCommitAuthor": "Khushboo Verma", - "providerCommitMessage": "Update index.js", - "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", - "providerBranch": "0.7.x", - "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": [ - "any" - ] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Project creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Project update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Project name.", - "x-example": "New Project" - }, - "description": { - "type": "string", - "description": "Project description.", - "x-example": "This is a new project." - }, - "teamId": { - "type": "string", - "description": "Project team ID.", - "x-example": "1592981250" - }, - "logo": { - "type": "string", - "description": "Project logo file ID.", - "x-example": "5f5c451b403cb" - }, - "url": { - "type": "string", - "description": "Project website URL.", - "x-example": "5f5c451b403cb" - }, - "legalName": { - "type": "string", - "description": "Company legal name.", - "x-example": "Company LTD." - }, - "legalCountry": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", - "x-example": "US" - }, - "legalState": { - "type": "string", - "description": "State name.", - "x-example": "New York" - }, - "legalCity": { - "type": "string", - "description": "City name.", - "x-example": "New York City." - }, - "legalAddress": { - "type": "string", - "description": "Company Address.", - "x-example": "620 Eighth Avenue, New York, NY 10018" - }, - "legalTaxId": { - "type": "string", - "description": "Company Tax ID.", - "x-example": "131102020" - }, - "authDuration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 60, - "format": "int32" - }, - "authLimit": { - "type": "integer", - "description": "Max users allowed. 0 is unlimited.", - "x-example": 100, - "format": "int32" - }, - "authSessionsLimit": { - "type": "integer", - "description": "Max sessions allowed per user. 100 maximum.", - "x-example": 10, - "format": "int32" - }, - "authPasswordHistory": { - "type": "integer", - "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", - "x-example": 5, - "format": "int32" - }, - "authPasswordDictionary": { - "type": "boolean", - "description": "Whether or not to check user's password against most commonly used passwords.", - "x-example": true - }, - "authPersonalDataCheck": { - "type": "boolean", - "description": "Whether or not to check the user password for similarity with their personal data.", - "x-example": true - }, - "authDisposableEmails": { - "type": "boolean", - "description": "Whether or not to disallow disposable email addresses during signup and email updates.", - "x-example": true - }, - "authCanonicalEmails": { - "type": "boolean", - "description": "Whether or not to require canonical email addresses during signup and email updates.", - "x-example": true - }, - "authFreeEmails": { - "type": "boolean", - "description": "Whether or not to disallow free email addresses during signup and email updates.", - "x-example": true - }, - "authMockNumbers": { - "type": "array", - "description": "An array of mock numbers and their corresponding verification codes (OTPs).", - "items": { - "$ref": "#\/components\/schemas\/mockNumber" - }, - "x-example": [ - {} - ] - }, - "authSessionAlerts": { - "type": "boolean", - "description": "Whether or not to send session alert emails to users.", - "x-example": true - }, - "authMembershipsUserName": { - "type": "boolean", - "description": "Whether or not to show user names in the teams membership response.", - "x-example": true - }, - "authMembershipsUserEmail": { - "type": "boolean", - "description": "Whether or not to show user emails in the teams membership response.", - "x-example": true - }, - "authMembershipsMfa": { - "type": "boolean", - "description": "Whether or not to show user MFA status in the teams membership response.", - "x-example": true - }, - "authMembershipsUserId": { - "type": "boolean", - "description": "Whether or not to show user IDs in the teams membership response.", - "x-example": true - }, - "authMembershipsUserPhone": { - "type": "boolean", - "description": "Whether or not to show user phone numbers in the teams membership response.", - "x-example": true - }, - "authInvalidateSessions": { - "type": "boolean", - "description": "Whether or not all existing sessions should be invalidated on password change", - "x-example": true - }, - "oAuthProviders": { - "type": "array", - "description": "List of Auth Providers.", - "items": { - "$ref": "#\/components\/schemas\/authProvider" - }, - "x-example": [ - {} - ] - }, - "platforms": { - "type": "array", - "description": "List of Platforms.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } - }, - "x-example": {} - }, - "webhooks": { - "type": "array", - "description": "List of Webhooks.", - "items": { - "$ref": "#\/components\/schemas\/webhook" - }, - "x-example": {} - }, - "keys": { - "type": "array", - "description": "List of API Keys.", - "items": { - "$ref": "#\/components\/schemas\/key" - }, - "x-example": {} - }, - "devKeys": { - "type": "array", - "description": "List of dev keys.", - "items": { - "$ref": "#\/components\/schemas\/devKey" - }, - "x-example": {} - }, - "smtpEnabled": { - "type": "boolean", - "description": "Status for custom SMTP", - "x-example": false - }, - "smtpSenderName": { - "type": "string", - "description": "SMTP sender name", - "x-example": "John Appwrite" - }, - "smtpSenderEmail": { - "type": "string", - "description": "SMTP sender email", - "x-example": "john@appwrite.io" - }, - "smtpReplyToName": { - "type": "string", - "description": "SMTP reply to name", - "x-example": "Support Team" - }, - "smtpReplyToEmail": { - "type": "string", - "description": "SMTP reply to email", - "x-example": "support@appwrite.io" - }, - "smtpHost": { - "type": "string", - "description": "SMTP server host name", - "x-example": "mail.appwrite.io" - }, - "smtpPort": { - "type": "integer", - "description": "SMTP server port", - "x-example": 25, - "format": "int32" - }, - "smtpUsername": { - "type": "string", - "description": "SMTP server username", - "x-example": "emailuser" - }, - "smtpPassword": { - "type": "string", - "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" - }, - "smtpSecure": { - "type": "string", - "description": "SMTP server secure protocol", - "x-example": "tls" - }, - "pingCount": { - "type": "integer", - "description": "Number of times the ping was received for this project.", - "x-example": 1, - "format": "int32" - }, - "pingedAt": { - "type": "string", - "description": "Last ping datetime in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "labels": { - "type": "array", - "description": "Labels for the project.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "status": { - "type": "string", - "description": "Project status.", - "x-example": "active" - }, - "authEmailPassword": { - "type": "boolean", - "description": "Email\/Password auth method status", - "x-example": true - }, - "authUsersAuthMagicURL": { - "type": "boolean", - "description": "Magic URL auth method status", - "x-example": true - }, - "authEmailOtp": { - "type": "boolean", - "description": "Email (OTP) auth method status", - "x-example": true - }, - "authAnonymous": { - "type": "boolean", - "description": "Anonymous auth method status", - "x-example": true - }, - "authInvites": { - "type": "boolean", - "description": "Invites auth method status", - "x-example": true - }, - "authJWT": { - "type": "boolean", - "description": "JWT auth method status", - "x-example": true - }, - "authPhone": { - "type": "boolean", - "description": "Phone auth method status", - "x-example": true - }, - "serviceStatusForAccount": { - "type": "boolean", - "description": "Account service status", - "x-example": true - }, - "serviceStatusForAvatars": { - "type": "boolean", - "description": "Avatars service status", - "x-example": true - }, - "serviceStatusForDatabases": { - "type": "boolean", - "description": "Databases (legacy) service status", - "x-example": true - }, - "serviceStatusForTablesdb": { - "type": "boolean", - "description": "TablesDB service status", - "x-example": true - }, - "serviceStatusForLocale": { - "type": "boolean", - "description": "Locale service status", - "x-example": true - }, - "serviceStatusForHealth": { - "type": "boolean", - "description": "Health service status", - "x-example": true - }, - "serviceStatusForProject": { - "type": "boolean", - "description": "Project service status", - "x-example": true - }, - "serviceStatusForStorage": { - "type": "boolean", - "description": "Storage service status", - "x-example": true - }, - "serviceStatusForTeams": { - "type": "boolean", - "description": "Teams service status", - "x-example": true - }, - "serviceStatusForUsers": { - "type": "boolean", - "description": "Users service status", - "x-example": true - }, - "serviceStatusForVcs": { - "type": "boolean", - "description": "VCS service status", - "x-example": true - }, - "serviceStatusForSites": { - "type": "boolean", - "description": "Sites service status", - "x-example": true - }, - "serviceStatusForFunctions": { - "type": "boolean", - "description": "Functions service status", - "x-example": true - }, - "serviceStatusForProxy": { - "type": "boolean", - "description": "Proxy service status", - "x-example": true - }, - "serviceStatusForGraphql": { - "type": "boolean", - "description": "GraphQL service status", - "x-example": true - }, - "serviceStatusForMigrations": { - "type": "boolean", - "description": "Migrations service status", - "x-example": true - }, - "serviceStatusForMessaging": { - "type": "boolean", - "description": "Messaging service status", - "x-example": true - }, - "protocolStatusForRest": { - "type": "boolean", - "description": "REST protocol status", - "x-example": true - }, - "protocolStatusForGraphql": { - "type": "boolean", - "description": "GraphQL protocol status", - "x-example": true - }, - "protocolStatusForWebsocket": { - "type": "boolean", - "description": "Websocket protocol status", - "x-example": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authDuration", - "authLimit", - "authSessionsLimit", - "authPasswordHistory", - "authPasswordDictionary", - "authPersonalDataCheck", - "authDisposableEmails", - "authCanonicalEmails", - "authFreeEmails", - "authMockNumbers", - "authSessionAlerts", - "authMembershipsUserName", - "authMembershipsUserEmail", - "authMembershipsMfa", - "authMembershipsUserId", - "authMembershipsUserPhone", - "authInvalidateSessions", - "oAuthProviders", - "platforms", - "webhooks", - "keys", - "devKeys", - "smtpEnabled", - "smtpSenderName", - "smtpSenderEmail", - "smtpReplyToName", - "smtpReplyToEmail", - "smtpHost", - "smtpPort", - "smtpUsername", - "smtpPassword", - "smtpSecure", - "pingCount", - "pingedAt", - "labels", - "status", - "authEmailPassword", - "authUsersAuthMagicURL", - "authEmailOtp", - "authAnonymous", - "authInvites", - "authJWT", - "authPhone", - "serviceStatusForAccount", - "serviceStatusForAvatars", - "serviceStatusForDatabases", - "serviceStatusForTablesdb", - "serviceStatusForLocale", - "serviceStatusForHealth", - "serviceStatusForProject", - "serviceStatusForStorage", - "serviceStatusForTeams", - "serviceStatusForUsers", - "serviceStatusForVcs", - "serviceStatusForSites", - "serviceStatusForFunctions", - "serviceStatusForProxy", - "serviceStatusForGraphql", - "serviceStatusForMigrations", - "serviceStatusForMessaging", - "protocolStatusForRest", - "protocolStatusForGraphql", - "protocolStatusForWebsocket" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "New Project", - "description": "This is a new project.", - "teamId": "1592981250", - "logo": "5f5c451b403cb", - "url": "5f5c451b403cb", - "legalName": "Company LTD.", - "legalCountry": "US", - "legalState": "New York", - "legalCity": "New York City.", - "legalAddress": "620 Eighth Avenue, New York, NY 10018", - "legalTaxId": "131102020", - "authDuration": 60, - "authLimit": 100, - "authSessionsLimit": 10, - "authPasswordHistory": 5, - "authPasswordDictionary": true, - "authPersonalDataCheck": true, - "authDisposableEmails": true, - "authCanonicalEmails": true, - "authFreeEmails": true, - "authMockNumbers": [ - {} - ], - "authSessionAlerts": true, - "authMembershipsUserName": true, - "authMembershipsUserEmail": true, - "authMembershipsMfa": true, - "authMembershipsUserId": true, - "authMembershipsUserPhone": true, - "authInvalidateSessions": true, - "oAuthProviders": [ - {} - ], - "platforms": {}, - "webhooks": {}, - "keys": {}, - "devKeys": {}, - "smtpEnabled": false, - "smtpSenderName": "John Appwrite", - "smtpSenderEmail": "john@appwrite.io", - "smtpReplyToName": "Support Team", - "smtpReplyToEmail": "support@appwrite.io", - "smtpHost": "mail.appwrite.io", - "smtpPort": 25, - "smtpUsername": "emailuser", - "smtpPassword": "", - "smtpSecure": "tls", - "pingCount": 1, - "pingedAt": "2020-10-15T06:38:00.000+00:00", - "labels": [ - "vip" - ], - "status": "active", - "authEmailPassword": true, - "authUsersAuthMagicURL": true, - "authEmailOtp": true, - "authAnonymous": true, - "authInvites": true, - "authJWT": true, - "authPhone": true, - "serviceStatusForAccount": true, - "serviceStatusForAvatars": true, - "serviceStatusForDatabases": true, - "serviceStatusForTablesdb": true, - "serviceStatusForLocale": true, - "serviceStatusForHealth": true, - "serviceStatusForProject": true, - "serviceStatusForStorage": true, - "serviceStatusForTeams": true, - "serviceStatusForUsers": true, - "serviceStatusForVcs": true, - "serviceStatusForSites": true, - "serviceStatusForFunctions": true, - "serviceStatusForProxy": true, - "serviceStatusForGraphql": true, - "serviceStatusForMigrations": true, - "serviceStatusForMessaging": true, - "protocolStatusForRest": true, - "protocolStatusForGraphql": true, - "protocolStatusForWebsocket": true - } - }, - "webhook": { - "description": "Webhook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Webhook ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Webhook creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Webhook update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Webhook name.", - "x-example": "My Webhook" - }, - "url": { - "type": "string", - "description": "Webhook URL endpoint.", - "x-example": "https:\/\/example.com\/webhook" - }, - "events": { - "type": "array", - "description": "Webhook trigger events.", - "items": { - "type": "string" - }, - "x-example": [ - "databases.tables.update", - "databases.collections.update" - ] - }, - "tls": { - "type": "boolean", - "description": "Indicates if SSL \/ TLS certificate verification is enabled.", - "x-example": true - }, - "authUsername": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "authPassword": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - }, - "secret": { - "type": "string", - "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", - "x-example": "ad3d581ca230e2b7059c545e5a" - }, - "enabled": { - "type": "boolean", - "description": "Indicates if this webhook is enabled.", - "x-example": true - }, - "logs": { - "type": "string", - "description": "Webhook error logs from the most recent failure.", - "x-example": "Failed to connect to remote server." - }, - "attempts": { - "type": "integer", - "description": "Number of consecutive failed webhook attempts.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "url", - "events", - "tls", - "authUsername", - "authPassword", - "secret", - "enabled", - "logs", - "attempts" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Webhook", - "url": "https:\/\/example.com\/webhook", - "events": [ - "databases.tables.update", - "databases.collections.update" - ], - "tls": true, - "authUsername": "username", - "authPassword": "password", - "secret": "ad3d581ca230e2b7059c545e5a", - "enabled": true, - "logs": "Failed to connect to remote server.", - "attempts": 10 - } - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "ephemeralKey": { - "description": "Ephemeral Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "devKey": { - "description": "DevKey", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "Dev API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Dev API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "mockNumber": { - "description": "Mock Number", - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", - "x-example": "+1612842323" - }, - "otp": { - "type": "string", - "description": "Mock OTP for the number. ", - "x-example": "123456" - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "number", - "otp", - "$createdAt", - "$updatedAt" - ], - "example": { - "number": "+1612842323", - "otp": "123456", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "oAuth2Github": { - "description": "OAuth2GitHub", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", - "x-example": "e4d87900000000540733" - }, - "clientSecret": { - "type": "string", - "description": "GitHub OAuth2 client secret.", - "x-example": "5e07c00000000000000000000000000000198bcc" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "e4d87900000000540733", - "clientSecret": "5e07c00000000000000000000000000000198bcc" - } - }, - "oAuth2Discord": { - "description": "OAuth2Discord", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Discord OAuth2 client ID.", - "x-example": "950722000000343754" - }, - "clientSecret": { - "type": "string", - "description": "Discord OAuth2 client secret.", - "x-example": "YmPXnM000000000000000000002zFg5D" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "950722000000343754", - "clientSecret": "YmPXnM000000000000000000002zFg5D" - } - }, - "oAuth2Figma": { - "description": "OAuth2Figma", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Figma OAuth2 client ID.", - "x-example": "byay5H0000000000VtiI40" - }, - "clientSecret": { - "type": "string", - "description": "Figma OAuth2 client secret.", - "x-example": "yEpOYn0000000000000000004iIsU5" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "byay5H0000000000VtiI40", - "clientSecret": "yEpOYn0000000000000000004iIsU5" - } - }, - "oAuth2Dropbox": { - "description": "OAuth2Dropbox", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appKey": { - "type": "string", - "description": "Dropbox OAuth2 app key.", - "x-example": "jl000000000009t" - }, - "appSecret": { - "type": "string", - "description": "Dropbox OAuth2 app secret.", - "x-example": "g200000000000vw" - } - }, - "required": [ - "$id", - "enabled", - "appKey", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appKey": "jl000000000009t", - "appSecret": "g200000000000vw" - } - }, - "oAuth2Dailymotion": { - "description": "OAuth2Dailymotion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Dailymotion OAuth2 API key.", - "x-example": "07a9000000000000067f" - }, - "apiSecret": { - "type": "string", - "description": "Dailymotion OAuth2 API secret.", - "x-example": "a399a90000000000000000000000000000d90639" - } - }, - "required": [ - "$id", - "enabled", - "apiKey", - "apiSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "apiKey": "07a9000000000000067f", - "apiSecret": "a399a90000000000000000000000000000d90639" - } - }, - "oAuth2Bitbucket": { - "description": "OAuth2Bitbucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "key": { - "type": "string", - "description": "Bitbucket OAuth2 key.", - "x-example": "Knt70000000000ByRc" - }, - "secret": { - "type": "string", - "description": "Bitbucket OAuth2 secret.", - "x-example": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "required": [ - "$id", - "enabled", - "key", - "secret" - ], - "example": { - "$id": "github", - "enabled": false, - "key": "Knt70000000000ByRc", - "secret": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "oAuth2Bitly": { - "description": "OAuth2Bitly", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Bitly OAuth2 client ID.", - "x-example": "d95151000000000000000000000000000067af9b" - }, - "clientSecret": { - "type": "string", - "description": "Bitly OAuth2 client secret.", - "x-example": "a13e250000000000000000000000000000d73095" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "d95151000000000000000000000000000067af9b", - "clientSecret": "a13e250000000000000000000000000000d73095" - } - }, - "oAuth2Box": { - "description": "OAuth2Box", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Box OAuth2 client ID.", - "x-example": "deglcs00000000000000000000x2og6y" - }, - "clientSecret": { - "type": "string", - "description": "Box OAuth2 client secret.", - "x-example": "OKM1f100000000000000000000eshEif" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "deglcs00000000000000000000x2og6y", - "clientSecret": "OKM1f100000000000000000000eshEif" - } - }, - "oAuth2Autodesk": { - "description": "OAuth2Autodesk", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Autodesk OAuth2 client ID.", - "x-example": "5zw90v00000000000000000000kVYXN7" - }, - "clientSecret": { - "type": "string", - "description": "Autodesk OAuth2 client secret.", - "x-example": "7I000000000000MW" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "5zw90v00000000000000000000kVYXN7", - "clientSecret": "7I000000000000MW" - } - }, - "oAuth2Google": { - "description": "OAuth2Google", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Google OAuth2 client ID.", - "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" - }, - "clientSecret": { - "type": "string", - "description": "Google OAuth2 client secret.", - "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "oAuth2Zoom": { - "description": "OAuth2Zoom", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoom OAuth2 client ID.", - "x-example": "QMAC00000000000000w0AQ" - }, - "clientSecret": { - "type": "string", - "description": "Zoom OAuth2 client secret.", - "x-example": "GAWsG4000000000000000000007U01ON" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "QMAC00000000000000w0AQ", - "clientSecret": "GAWsG4000000000000000000007U01ON" - } - }, - "oAuth2Zoho": { - "description": "OAuth2Zoho", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoho OAuth2 client ID.", - "x-example": "1000.83C178000000000000000000RPNX0B" - }, - "clientSecret": { - "type": "string", - "description": "Zoho OAuth2 client secret.", - "x-example": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "1000.83C178000000000000000000RPNX0B", - "clientSecret": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "oAuth2Yandex": { - "description": "OAuth2Yandex", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yandex OAuth2 client ID.", - "x-example": "6a8a6a0000000000000000000091483c" - }, - "clientSecret": { - "type": "string", - "description": "Yandex OAuth2 client secret.", - "x-example": "bbf98500000000000000000000c75a63" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6a8a6a0000000000000000000091483c", - "clientSecret": "bbf98500000000000000000000c75a63" - } - }, - "oAuth2X": { - "description": "OAuth2X", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "X OAuth2 customer key.", - "x-example": "slzZV0000000000000NFLaWT" - }, - "secretKey": { - "type": "string", - "description": "X OAuth2 secret key.", - "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "slzZV0000000000000NFLaWT", - "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "oAuth2WordPress": { - "description": "OAuth2WordPress", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "WordPress OAuth2 client ID.", - "x-example": "130005" - }, - "clientSecret": { - "type": "string", - "description": "WordPress OAuth2 client secret.", - "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "130005", - "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "oAuth2Twitch": { - "description": "OAuth2Twitch", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Twitch OAuth2 client ID.", - "x-example": "vvi0in000000000000000000ikmt9p" - }, - "clientSecret": { - "type": "string", - "description": "Twitch OAuth2 client secret.", - "x-example": "pmapue000000000000000000zylw3v" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "vvi0in000000000000000000ikmt9p", - "clientSecret": "pmapue000000000000000000zylw3v" - } - }, - "oAuth2Stripe": { - "description": "OAuth2Stripe", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Stripe OAuth2 client ID.", - "x-example": "ca_UKibXX0000000000000000000006byvR" - }, - "apiSecretKey": { - "type": "string", - "description": "Stripe OAuth2 API secret key.", - "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "apiSecretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "ca_UKibXX0000000000000000000006byvR", - "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "oAuth2Spotify": { - "description": "OAuth2Spotify", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Spotify OAuth2 client ID.", - "x-example": "6ec271000000000000000000009beace" - }, - "clientSecret": { - "type": "string", - "description": "Spotify OAuth2 client secret.", - "x-example": "db068a000000000000000000008b5b9f" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6ec271000000000000000000009beace", - "clientSecret": "db068a000000000000000000008b5b9f" - } - }, - "oAuth2Slack": { - "description": "OAuth2Slack", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Slack OAuth2 client ID.", - "x-example": "23000000089.15000000000023" - }, - "clientSecret": { - "type": "string", - "description": "Slack OAuth2 client secret.", - "x-example": "81656000000000000000000000f3d2fd" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "23000000089.15000000000023", - "clientSecret": "81656000000000000000000000f3d2fd" - } - }, - "oAuth2Podio": { - "description": "OAuth2Podio", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Podio OAuth2 client ID.", - "x-example": "appwrite-oauth-test-app" - }, - "clientSecret": { - "type": "string", - "description": "Podio OAuth2 client secret.", - "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-oauth-test-app", - "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "oAuth2Notion": { - "description": "OAuth2Notion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauthClientId": { - "type": "string", - "description": "Notion OAuth2 client ID.", - "x-example": "341d8700-0000-0000-0000-000000446ee3" - }, - "oauthClientSecret": { - "type": "string", - "description": "Notion OAuth2 client secret.", - "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "required": [ - "$id", - "enabled", - "oauthClientId", - "oauthClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", - "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "oAuth2Salesforce": { - "description": "OAuth2Salesforce", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "Salesforce OAuth2 consumer key.", - "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" - }, - "customerSecret": { - "type": "string", - "description": "Salesforce OAuth2 consumer secret.", - "x-example": "3w000000000000e2" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "customerSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "customerSecret": "3w000000000000e2" - } - }, - "oAuth2Yahoo": { - "description": "OAuth2Yahoo", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yahoo OAuth2 client ID.", - "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" - }, - "clientSecret": { - "type": "string", - "description": "Yahoo OAuth2 client secret.", - "x-example": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "clientSecret": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "oAuth2Linkedin": { - "description": "OAuth2Linkedin", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "LinkedIn OAuth2 client ID.", - "x-example": "770000000000dv" - }, - "primaryClientSecret": { - "type": "string", - "description": "LinkedIn OAuth2 primary client secret.", - "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "primaryClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "770000000000dv", - "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "oAuth2Disqus": { - "description": "OAuth2Disqus", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "publicKey": { - "type": "string", - "description": "Disqus OAuth2 public key.", - "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" - }, - "secretKey": { - "type": "string", - "description": "Disqus OAuth2 secret key.", - "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "required": [ - "$id", - "enabled", - "publicKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "oAuth2Amazon": { - "description": "OAuth2Amazon", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Amazon OAuth2 client ID.", - "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" - }, - "clientSecret": { - "type": "string", - "description": "Amazon OAuth2 client secret.", - "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "oAuth2Etsy": { - "description": "OAuth2Etsy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "keyString": { - "type": "string", - "description": "Etsy OAuth2 keystring.", - "x-example": "nsgzxh0000000000008j85a2" - }, - "sharedSecret": { - "type": "string", - "description": "Etsy OAuth2 shared secret.", - "x-example": "tp000000ru" - } - }, - "required": [ - "$id", - "enabled", - "keyString", - "sharedSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "keyString": "nsgzxh0000000000008j85a2", - "sharedSecret": "tp000000ru" - } - }, - "oAuth2Facebook": { - "description": "OAuth2Facebook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appId": { - "type": "string", - "description": "Facebook OAuth2 app ID.", - "x-example": "260600000007694" - }, - "appSecret": { - "type": "string", - "description": "Facebook OAuth2 app secret.", - "x-example": "2d0b2800000000000000000000d38af4" - } - }, - "required": [ - "$id", - "enabled", - "appId", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appId": "260600000007694", - "appSecret": "2d0b2800000000000000000000d38af4" - } - }, - "oAuth2Tradeshift": { - "description": "OAuth2Tradeshift", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauth2ClientId": { - "type": "string", - "description": "Tradeshift OAuth2 client ID.", - "x-example": "appwrite-test-org.appwrite-test-app" - }, - "oauth2ClientSecret": { - "type": "string", - "description": "Tradeshift OAuth2 client secret.", - "x-example": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "required": [ - "$id", - "enabled", - "oauth2ClientId", - "oauth2ClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauth2ClientId": "appwrite-test-org.appwrite-test-app", - "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "oAuth2Paypal": { - "description": "OAuth2Paypal", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "PayPal OAuth2 client ID.", - "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" - }, - "secretKey": { - "type": "string", - "description": "PayPal OAuth2 secret key.", - "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "oAuth2Gitlab": { - "description": "OAuth2Gitlab", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "GitLab OAuth2 application ID.", - "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" - }, - "secret": { - "type": "string", - "description": "GitLab OAuth2 secret.", - "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" - }, - "endpoint": { - "type": "string", - "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", - "x-example": "https:\/\/gitlab.com" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "secret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "endpoint": "https:\/\/gitlab.com" - } - }, - "oAuth2Authentik": { - "description": "OAuth2Authentik", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Authentik OAuth2 client ID.", - "x-example": "dTKOPa0000000000000000000000000000e7G8hv" - }, - "clientSecret": { - "type": "string", - "description": "Authentik OAuth2 client secret.", - "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" - }, - "endpoint": { - "type": "string", - "description": "Authentik OAuth2 endpoint domain.", - "x-example": "example.authentik.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dTKOPa0000000000000000000000000000e7G8hv", - "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "endpoint": "example.authentik.com" - } - }, - "oAuth2Auth0": { - "description": "OAuth2Auth0", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Auth0 OAuth2 client ID.", - "x-example": "OaOkIA000000000000000000005KLSYq" - }, - "clientSecret": { - "type": "string", - "description": "Auth0 OAuth2 client secret.", - "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" - }, - "endpoint": { - "type": "string", - "description": "Auth0 OAuth2 endpoint domain.", - "x-example": "example.us.auth0.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "OaOkIA000000000000000000005KLSYq", - "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "endpoint": "example.us.auth0.com" - } - }, - "oAuth2FusionAuth": { - "description": "OAuth2FusionAuth", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "FusionAuth OAuth2 client ID.", - "x-example": "b2222c00-0000-0000-0000-000000862097" - }, - "clientSecret": { - "type": "string", - "description": "FusionAuth OAuth2 client secret.", - "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" - }, - "endpoint": { - "type": "string", - "description": "FusionAuth OAuth2 endpoint domain.", - "x-example": "example.fusionauth.io" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "b2222c00-0000-0000-0000-000000862097", - "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", - "endpoint": "example.fusionauth.io" - } - }, - "oAuth2Keycloak": { - "description": "OAuth2Keycloak", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Keycloak OAuth2 client ID.", - "x-example": "appwrite-o0000000st-app" - }, - "clientSecret": { - "type": "string", - "description": "Keycloak OAuth2 client secret.", - "x-example": "jdjrJd00000000000000000000HUsaZO" - }, - "endpoint": { - "type": "string", - "description": "Keycloak OAuth2 endpoint domain.", - "x-example": "keycloak.example.com" - }, - "realmName": { - "type": "string", - "description": "Keycloak OAuth2 realm name.", - "x-example": "appwrite-realm" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint", - "realmName" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-o0000000st-app", - "clientSecret": "jdjrJd00000000000000000000HUsaZO", - "endpoint": "keycloak.example.com", - "realmName": "appwrite-realm" - } - }, - "oAuth2Oidc": { - "description": "OAuth2Oidc", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "OpenID Connect OAuth2 client ID.", - "x-example": "qibI2x0000000000000000000000000006L2YFoG" - }, - "clientSecret": { - "type": "string", - "description": "OpenID Connect OAuth2 client secret.", - "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", - "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/token" - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "wellKnownURL", - "authorizationURL", - "tokenUrl", - "userInfoUrl" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "qibI2x0000000000000000000000000006L2YFoG", - "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", - "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", - "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", - "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "oAuth2Okta": { - "description": "OAuth2Okta", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Okta OAuth2 client ID.", - "x-example": "0oa00000000000000698" - }, - "clientSecret": { - "type": "string", - "description": "Okta OAuth2 client secret.", - "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" - }, - "domain": { - "type": "string", - "description": "Okta OAuth2 domain.", - "x-example": "trial-6400025.okta.com" - }, - "authorizationServerId": { - "type": "string", - "description": "Okta OAuth2 authorization server ID.", - "x-example": "aus000000000000000h7z" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "domain", - "authorizationServerId" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "0oa00000000000000698", - "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "domain": "trial-6400025.okta.com", - "authorizationServerId": "aus000000000000000h7z" - } - }, - "oAuth2Kick": { - "description": "OAuth2Kick", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Kick OAuth2 client ID.", - "x-example": "01KQ7C00000000000001MFHS32" - }, - "clientSecret": { - "type": "string", - "description": "Kick OAuth2 client secret.", - "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "01KQ7C00000000000001MFHS32", - "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "oAuth2Apple": { - "description": "OAuth2Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "apple" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "serviceId": { - "type": "string", - "description": "Apple OAuth2 service ID.", - "x-example": "ip.appwrite.app.web" - }, - "keyId": { - "type": "string", - "description": "Apple OAuth2 key ID.", - "x-example": "P4000000N8" - }, - "teamId": { - "type": "string", - "description": "Apple OAuth2 team ID.", - "x-example": "D4000000R6" - }, - "p8File": { - "type": "string", - "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", - "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "required": [ - "$id", - "enabled", - "serviceId", - "keyId", - "teamId", - "p8File" - ], - "example": { - "$id": "apple", - "enabled": false, - "serviceId": "ip.appwrite.app.web", - "keyId": "P4000000N8", - "teamId": "D4000000R6", - "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "oAuth2Microsoft": { - "description": "OAuth2Microsoft", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "Microsoft OAuth2 application ID.", - "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" - }, - "applicationSecret": { - "type": "string", - "description": "Microsoft OAuth2 application secret.", - "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", - "x-example": "common" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "applicationSecret", - "tenant" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", - "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "tenant": "common" - } - }, - "oAuth2ProviderList": { - "description": "OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers in the given project.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of OAuth2 providers.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/oAuth2Github" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Discord" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Figma" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Box" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Google" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - }, - { - "$ref": "#\/components\/schemas\/oAuth2X" - }, - { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Slack" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Podio" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Notion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - }, - { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Apple" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Okta" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Kick" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/components\/schemas\/oAuth2Github", - "discord": "#\/components\/schemas\/oAuth2Discord", - "figma": "#\/components\/schemas\/oAuth2Figma", - "dropbox": "#\/components\/schemas\/oAuth2Dropbox", - "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", - "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", - "bitly": "#\/components\/schemas\/oAuth2Bitly", - "box": "#\/components\/schemas\/oAuth2Box", - "autodesk": "#\/components\/schemas\/oAuth2Autodesk", - "google": "#\/components\/schemas\/oAuth2Google", - "zoom": "#\/components\/schemas\/oAuth2Zoom", - "zoho": "#\/components\/schemas\/oAuth2Zoho", - "yandex": "#\/components\/schemas\/oAuth2Yandex", - "x": "#\/components\/schemas\/oAuth2X", - "wordpress": "#\/components\/schemas\/oAuth2WordPress", - "twitch": "#\/components\/schemas\/oAuth2Twitch", - "stripe": "#\/components\/schemas\/oAuth2Stripe", - "spotify": "#\/components\/schemas\/oAuth2Spotify", - "slack": "#\/components\/schemas\/oAuth2Slack", - "podio": "#\/components\/schemas\/oAuth2Podio", - "notion": "#\/components\/schemas\/oAuth2Notion", - "salesforce": "#\/components\/schemas\/oAuth2Salesforce", - "yahoo": "#\/components\/schemas\/oAuth2Yahoo", - "linkedin": "#\/components\/schemas\/oAuth2Linkedin", - "disqus": "#\/components\/schemas\/oAuth2Disqus", - "amazon": "#\/components\/schemas\/oAuth2Amazon", - "etsy": "#\/components\/schemas\/oAuth2Etsy", - "facebook": "#\/components\/schemas\/oAuth2Facebook", - "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", - "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", - "paypal": "#\/components\/schemas\/oAuth2Paypal", - "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", - "gitlab": "#\/components\/schemas\/oAuth2Gitlab", - "authentik": "#\/components\/schemas\/oAuth2Authentik", - "auth0": "#\/components\/schemas\/oAuth2Auth0", - "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", - "keycloak": "#\/components\/schemas\/oAuth2Keycloak", - "oidc": "#\/components\/schemas\/oAuth2Oidc", - "apple": "#\/components\/schemas\/oAuth2Apple", - "okta": "#\/components\/schemas\/oAuth2Okta", - "kick": "#\/components\/schemas\/oAuth2Kick", - "microsoft": "#\/components\/schemas\/oAuth2Microsoft" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "policyPasswordDictionary": { - "description": "Policy Password Dictionary", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password dictionary policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyPasswordHistory": { - "description": "Policy Password History", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Password history length. A value of 0 means the policy is disabled.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 5 - } - }, - "policyPasswordPersonalData": { - "description": "Policy Password Personal Data", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password personal data policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionAlert": { - "description": "Policy Session Alert", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session alert policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionDuration": { - "description": "Policy Session Duration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "duration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 3600, - "format": "int32" - } - }, - "required": [ - "$id", - "duration" - ], - "example": { - "$id": "password-dictionary", - "duration": 3600 - } - }, - "policySessionInvalidation": { - "description": "Policy Session Invalidation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session invalidation policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionLimit": { - "description": "Policy Session Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 10 - } - }, - "policyUserLimit": { - "description": "Policy User Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", - "x-example": 100, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 100 - } - }, - "policyMembershipPrivacy": { - "description": "Policy Membership Privacy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "userId": { - "type": "boolean", - "description": "Whether user ID is visible in memberships.", - "x-example": true - }, - "userEmail": { - "type": "boolean", - "description": "Whether user email is visible in memberships.", - "x-example": true - }, - "userPhone": { - "type": "boolean", - "description": "Whether user phone is visible in memberships.", - "x-example": true - }, - "userName": { - "type": "boolean", - "description": "Whether user name is visible in memberships.", - "x-example": true - }, - "userMFA": { - "type": "boolean", - "description": "Whether user MFA status is visible in memberships.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "userEmail", - "userPhone", - "userName", - "userMFA" - ], - "example": { - "$id": "password-dictionary", - "userId": true, - "userEmail": true, - "userPhone": true, - "userName": true, - "userMFA": true - } - }, - "authProvider": { - "description": "AuthProvider", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Auth Provider.", - "x-example": "github" - }, - "name": { - "type": "string", - "description": "Auth Provider name.", - "x-example": "GitHub" - }, - "appId": { - "type": "string", - "description": "OAuth 2.0 application ID.", - "x-example": "259125845563242502" - }, - "secret": { - "type": "string", - "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Auth Provider is active and can be used to create session.", - "x-example": "" - } - }, - "required": [ - "key", - "name", - "appId", - "secret", - "enabled" - ], - "example": { - "key": "github", - "name": "GitHub", - "appId": "259125845563242502", - "secret": "", - "enabled": "" - } - }, - "platformWeb": { - "description": "Platform Web", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": "app.example.com" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "hostname", - "key" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "hostname": "app.example.com" - } - }, - "platformApple": { - "description": "Platform Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "bundleIdentifier" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "bundleIdentifier": "com.company.appname" - } - }, - "platformAndroid": { - "description": "Platform Android", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "applicationId": { - "type": "string", - "description": "Android application ID.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "applicationId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "applicationId": "com.company.appname" - } - }, - "platformWindows": { - "description": "Platform Windows", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageIdentifierName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageIdentifierName": "com.company.appname" - } - }, - "platformLinux": { - "description": "Platform Linux", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageName": { - "type": "string", - "description": "Linux package name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageName": "com.company.appname" - } - }, - "platformList": { - "description": "Platforms List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of platforms in the given project.", - "x-example": 5, - "format": "int32" - }, - "platforms": { - "type": "array", - "description": "List of platforms.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "platforms" - ], - "example": { - "total": 5, - "platforms": "" - } - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "secret", - "resourceType", - "resourceId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "API_KEY", - "value": "myPa$$word1", - "secret": false, - "resourceType": "function", - "resourceId": "myAwesomeFunction" - } - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", - "x-example": "online", - "enum": [ - "disabled", - "offline", - "online" - ] - } - }, - "required": [ - "version", - "status" - ], - "example": { - "version": "1.0.0", - "status": "online" - } - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": [ - "size" - ], - "example": { - "size": 8 - } - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values are: `pass`, `fail`", - "x-example": "pass", - "enum": [ - "pass", - "fail" - ], - "x-enum-name": "HealthCheckStatus" - } - }, - "required": [ - "name", - "ping", - "status" - ], - "example": { - "name": "database", - "ping": 128, - "status": "pass" - } - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "\/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ], - "example": { - "name": "\/CN=www.google.com", - "subjectSN": "", - "issuerOrganisation": "", - "validFrom": "1704200998", - "validTo": "1711458597", - "signatureTypeSN": "RSA-SHA256" - } - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": [ - "remoteTime", - "localTime", - "diff" - ], - "example": { - "remoteTime": 1639490751, - "localTime": 1639490844, - "diff": 93 - } - }, - "metric": { - "description": "Metric", - "type": "object", - "properties": { - "value": { - "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, - "format": "int32" - }, - "date": { - "type": "string", - "description": "The date at which this metric was aggregated in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "value", - "date" - ], - "example": { - "value": 1, - "date": "2020-10-15T06:38:00.000+00:00" - } - }, - "metricBreakdown": { - "description": "Metric Breakdown", - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c16897e", - "nullable": true - }, - "name": { - "type": "string", - "description": "Resource name.", - "x-example": "Documents" - }, - "value": { - "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, - "format": "int32" - }, - "estimate": { - "type": "number", - "description": "The estimated value of this metric at the end of the period.", - "x-example": 1, - "format": "double", - "nullable": true - } - }, - "required": [ - "name", - "value" - ], - "example": { - "resourceId": "5e5ea5c16897e", - "name": "Documents", - "value": 1, - "estimate": 1 - } - }, - "usageDatabases": { - "description": "UsageDatabases", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "tablesTotal": { - "type": "integer", - "description": "Total aggregated number of tables.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated number of total databases storage in bytes.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "Aggregated number of databases per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "tables": { - "type": "array", - "description": "Aggregated number of tables per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "rows": { - "type": "array", - "description": "Aggregated number of rows per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "An array of the aggregated number of databases storage in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "tablesTotal", - "documentsTotal", - "rowsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "tables", - "documents", - "rows", - "storage", - "databasesReads", - "databasesWrites" - ], - "example": { - "range": "30d", - "databasesTotal": 0, - "collectionsTotal": 0, - "tablesTotal": 0, - "documentsTotal": 0, - "rowsTotal": 0, - "storageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "databases": [], - "collections": [], - "tables": [], - "documents": [], - "rows": [], - "storage": [], - "databasesReads": [], - "databasesWrites": [] - } - }, - "usageDatabase": { - "description": "UsageDatabase", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "tablesTotal": { - "type": "integer", - "description": "Total aggregated number of tables.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated number of total storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "tables": { - "type": "array", - "description": "Aggregated number of tables per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "rows": { - "type": "array", - "description": "Aggregated number of rows per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "tablesTotal", - "documentsTotal", - "rowsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "tables", - "documents", - "rows", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "tablesTotal": 0, - "documentsTotal": 0, - "rowsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "tables": [], - "documents": [], - "rows": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "usageTable": { - "description": "UsageTable", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of of rows.", - "x-example": 0, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "Aggregated number of rows per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "rowsTotal", - "rows" - ], - "example": { - "range": "30d", - "rowsTotal": 0, - "rows": [] - } - }, - "usageCollection": { - "description": "UsageCollection", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of of documents.", - "x-example": 0, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "documentsTotal", - "documents" - ], - "example": { - "range": "30d", - "documentsTotal": 0, - "documents": [] - } - }, - "usageUsers": { - "description": "UsageUsers", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of statistics of users.", - "x-example": 0, - "format": "int32" - }, - "sessionsTotal": { - "type": "integer", - "description": "Total aggregated number of active sessions.", - "x-example": 0, - "format": "int32" - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "sessions": { - "type": "array", - "description": "Aggregated number of active sessions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "usersTotal", - "sessionsTotal", - "users", - "sessions" - ], - "example": { - "range": "30d", - "usersTotal": 0, - "sessionsTotal": 0, - "users": [], - "sessions": [] - } - }, - "usagePresence": { - "description": "UsagePresence", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersOnlineTotal": { - "type": "integer", - "description": "Current total number of online users.", - "x-example": 0, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "Aggregated number of online users per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "usersOnlineTotal", - "presences" - ], - "example": { - "range": "30d", - "usersOnlineTotal": 0, - "presences": [] - } - }, - "usageStorage": { - "description": "StorageUsage", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets", - "x-example": 0, - "format": "int32" - }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of files.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of files storage (in bytes).", - "x-example": 0, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "Aggregated number of buckets per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "files": { - "type": "array", - "description": "Aggregated number of files per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated number of files storage (in bytes) per period .", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "bucketsTotal", - "filesTotal", - "filesStorageTotal", - "buckets", - "files", - "storage" - ], - "example": { - "range": "30d", - "bucketsTotal": 0, - "filesTotal": 0, - "filesStorageTotal": 0, - "buckets": [], - "files": [], - "storage": [] - } - }, - "usageBuckets": { - "description": "UsageBuckets", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files storage (in bytes).", - "x-example": 0, - "format": "int32" - }, - "files": { - "type": "array", - "description": "Aggregated number of bucket files per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated number of bucket storage files (in bytes) per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "imageTransformations": { - "type": "array", - "description": "Aggregated number of files transformations per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Total aggregated number of files transformations.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "range", - "filesTotal", - "filesStorageTotal", - "files", - "storage", - "imageTransformations", - "imageTransformationsTotal" - ], - "example": { - "range": "30d", - "filesTotal": 0, - "filesStorageTotal": 0, - "files": [], - "storage": [], - "imageTransformations": [], - "imageTransformationsTotal": 0 - } - }, - "usageFunctions": { - "description": "UsageFunctions", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "functionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions.", - "x-example": 0, - "format": "int32" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of functions deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions deployment storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of functions build.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of functions build storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions execution.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "Aggregated number of functions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": 0 - }, - "deployments": { - "type": "array", - "description": "Aggregated number of functions deployment per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of functions deployment storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "builds": { - "type": "array", - "description": "Aggregated number of functions build per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of functions build storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of functions build compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of functions build mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of functions execution per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of functions execution compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of functions mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "functionsTotal", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "functions", - "deployments", - "deploymentsStorage", - "buildsSuccessTotal", - "buildsFailedTotal", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" - ], - "example": { - "range": "30d", - "functionsTotal": 0, - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "functions": 0, - "deployments": [], - "deploymentsStorage": [], - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] - } - }, - "usageFunction": { - "description": "UsageFunction", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeAverage": { - "type": "integer", - "description": "Average builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of function executions compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of function mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsSuccessTotal", - "buildsFailedTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsTimeAverage", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" - ], - "example": { - "range": "30d", - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsTimeAverage": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "deployments": [], - "deploymentsStorage": [], - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] - } - }, - "usageSites": { - "description": "UsageSites", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "sitesTotal": { - "type": "integer", - "description": "Total aggregated number of sites.", - "x-example": 0, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "Aggregated number of sites per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of sites deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of sites deployment storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of sites build.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of sites build storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of sites build compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of sites build mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of sites execution.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of sites execution compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of sites execution mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "requestsTotal": { - "type": "integer", - "description": "Total aggregated number of requests.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "inbound": { - "type": "array", - "description": "Aggregated number of inbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "outbound": { - "type": "array", - "description": "Aggregated number of outbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deployments": { - "type": "array", - "description": "Aggregated number of sites deployment per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of sites deployment storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful site builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed site builds.", - "x-example": 0, - "format": "int32" - }, - "builds": { - "type": "array", - "description": "Aggregated number of sites build per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of sites build storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of sites build compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of sites build mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of sites execution per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of sites execution compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of sites mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful site builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed site builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "sitesTotal", - "sites", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "requestsTotal", - "requests", - "inboundTotal", - "inbound", - "outboundTotal", - "outbound", - "deployments", - "deploymentsStorage", - "buildsSuccessTotal", - "buildsFailedTotal", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" - ], - "example": { - "range": "30d", - "sitesTotal": 0, - "sites": [], - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "requestsTotal": 0, - "requests": [], - "inboundTotal": 0, - "inbound": [], - "outboundTotal": 0, - "outbound": [], - "deployments": [], - "deploymentsStorage": [], - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] - } - }, - "usageSite": { - "description": "UsageSite", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeAverage": { - "type": "integer", - "description": "Average builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of function executions compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of function mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "requestsTotal": { - "type": "integer", - "description": "Total aggregated number of requests.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "inbound": { - "type": "array", - "description": "Aggregated number of inbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "outbound": { - "type": "array", - "description": "Aggregated number of outbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsSuccessTotal", - "buildsFailedTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsTimeAverage", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed", - "requestsTotal", - "requests", - "inboundTotal", - "inbound", - "outboundTotal", - "outbound" - ], - "example": { - "range": "30d", - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsTimeAverage": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "deployments": [], - "deploymentsStorage": [], - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [], - "requestsTotal": 0, - "requests": [], - "inboundTotal": 0, - "inbound": [], - "outboundTotal": 0, - "outbound": [] - } - }, - "usageProject": { - "description": "UsageProject", - "type": "object", - "properties": { - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents in legacy\/tablesdb.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDocumentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents in documentsdb.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" - }, - "documentsdbTotal": { - "type": "integer", - "description": "Total aggregated number of documentsdb.", - "x-example": 0, - "format": "int32" - }, - "databasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of databases storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "documentsdbDatabasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of documentsdb databases storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of users.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of files storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "functionsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of builds storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of deployments storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDatabasesReadsTotal": { - "type": "integer", - "description": "Total number of documentsdb databases reads.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDatabasesWritesTotal": { - "type": "integer", - "description": "Total number of documentsdb databases writes.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "network": { - "type": "array", - "description": "Aggregated number of consumed bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of executions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executionsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of executions by functions.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "bucketsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of usage by buckets.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "databasesStorageBreakdown": { - "type": "array", - "description": "An array of the aggregated breakdown of storage usage by databases.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "executionsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "buildsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of build mbSeconds by functions.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "functionsStorageBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of functions storage size (in bytes).", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "authPhoneTotal": { - "type": "integer", - "description": "Total aggregated number of phone auth.", - "x-example": 0, - "format": "int32" - }, - "authPhoneEstimate": { - "type": "number", - "description": "Estimated total aggregated cost of phone auth.", - "x-example": 0, - "format": "double" - }, - "authPhoneCountryBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of phone auth by country.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documentsdbDatabasesReads": { - "type": "array", - "description": "An array of aggregated number of documentsdb database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documentsdbDatabasesWrites": { - "type": "array", - "description": "An array of aggregated number of documentsdb database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documentsdbDatabasesStorage": { - "type": "array", - "description": "An array of aggregated sum of documentsdb databases storage size (in bytes) per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "imageTransformations": { - "type": "array", - "description": "An array of aggregated number of image transformations.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Total aggregated number of image transformations.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB databases.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbCollectionsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB collections.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDocumentsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB documents.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesStorageTotal": { - "type": "integer", - "description": "Total aggregated VectorsDB storage (bytes).", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesReadsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB reads.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesWritesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB writes.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabases": { - "type": "array", - "description": "Aggregated VectorsDB databases per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "vectorsdbCollections": { - "type": "array", - "description": "Aggregated VectorsDB collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "vectorsdbDocuments": { - "type": "array", - "description": "Aggregated VectorsDB documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "vectorsdbDatabasesStorage": { - "type": "array", - "description": "Aggregated VectorsDB storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "vectorsdbDatabasesReads": { - "type": "array", - "description": "Aggregated VectorsDB reads per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "vectorsdbDatabasesWrites": { - "type": "array", - "description": "Aggregated VectorsDB writes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "embeddingsText": { - "type": "object", - "description": "Aggregated number of text embedding calls per period.", - "x-example": [], - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextTokens": { - "type": "object", - "description": "Aggregated number of tokens processed by text embeddings per period.", - "x-example": [], - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextDuration": { - "type": "object", - "description": "Aggregated duration spent generating text embeddings per period.", - "x-example": [], - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextErrors": { - "type": "object", - "description": "Aggregated number of errors while generating text embeddings per period.", - "x-example": [], - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextTotal": { - "type": "object", - "description": "Total aggregated number of text embedding calls.", - "x-example": 0, - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextTokensTotal": { - "type": "object", - "description": "Total aggregated number of tokens processed by text.", - "x-example": 0, - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextDurationTotal": { - "type": "object", - "description": "Total aggregated duration spent generating text embeddings.", - "x-example": 0, - "items": { - "$ref": "#\/components\/schemas\/metric" - } - }, - "embeddingsTextErrorsTotal": { - "type": "object", - "description": "Total aggregated number of errors while generating text embeddings.", - "x-example": 0, - "items": { - "$ref": "#\/components\/schemas\/metric" - } - } - }, - "required": [ - "executionsTotal", - "documentsTotal", - "documentsdbDocumentsTotal", - "rowsTotal", - "databasesTotal", - "documentsdbTotal", - "databasesStorageTotal", - "documentsdbDatabasesStorageTotal", - "usersTotal", - "filesStorageTotal", - "functionsStorageTotal", - "buildsStorageTotal", - "deploymentsStorageTotal", - "bucketsTotal", - "executionsMbSecondsTotal", - "buildsMbSecondsTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "documentsdbDatabasesReadsTotal", - "documentsdbDatabasesWritesTotal", - "requests", - "network", - "users", - "executions", - "executionsBreakdown", - "bucketsBreakdown", - "databasesStorageBreakdown", - "executionsMbSecondsBreakdown", - "buildsMbSecondsBreakdown", - "functionsStorageBreakdown", - "authPhoneTotal", - "authPhoneEstimate", - "authPhoneCountryBreakdown", - "databasesReads", - "databasesWrites", - "documentsdbDatabasesReads", - "documentsdbDatabasesWrites", - "documentsdbDatabasesStorage", - "imageTransformations", - "imageTransformationsTotal", - "vectorsdbDatabasesTotal", - "vectorsdbCollectionsTotal", - "vectorsdbDocumentsTotal", - "vectorsdbDatabasesStorageTotal", - "vectorsdbDatabasesReadsTotal", - "vectorsdbDatabasesWritesTotal", - "vectorsdbDatabases", - "vectorsdbCollections", - "vectorsdbDocuments", - "vectorsdbDatabasesStorage", - "vectorsdbDatabasesReads", - "vectorsdbDatabasesWrites", - "embeddingsText", - "embeddingsTextTokens", - "embeddingsTextDuration", - "embeddingsTextErrors", - "embeddingsTextTotal", - "embeddingsTextTokensTotal", - "embeddingsTextDurationTotal", - "embeddingsTextErrorsTotal" - ], - "example": { - "executionsTotal": 0, - "documentsTotal": 0, - "documentsdbDocumentsTotal": 0, - "rowsTotal": 0, - "databasesTotal": 0, - "documentsdbTotal": 0, - "databasesStorageTotal": 0, - "documentsdbDatabasesStorageTotal": 0, - "usersTotal": 0, - "filesStorageTotal": 0, - "functionsStorageTotal": 0, - "buildsStorageTotal": 0, - "deploymentsStorageTotal": 0, - "bucketsTotal": 0, - "executionsMbSecondsTotal": 0, - "buildsMbSecondsTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "documentsdbDatabasesReadsTotal": 0, - "documentsdbDatabasesWritesTotal": 0, - "requests": [], - "network": [], - "users": [], - "executions": [], - "executionsBreakdown": [], - "bucketsBreakdown": [], - "databasesStorageBreakdown": [], - "executionsMbSecondsBreakdown": [], - "buildsMbSecondsBreakdown": [], - "functionsStorageBreakdown": [], - "authPhoneTotal": 0, - "authPhoneEstimate": 0, - "authPhoneCountryBreakdown": [], - "databasesReads": [], - "databasesWrites": [], - "documentsdbDatabasesReads": [], - "documentsdbDatabasesWrites": [], - "documentsdbDatabasesStorage": [], - "imageTransformations": [], - "imageTransformationsTotal": 0, - "vectorsdbDatabasesTotal": 0, - "vectorsdbCollectionsTotal": 0, - "vectorsdbDocumentsTotal": 0, - "vectorsdbDatabasesStorageTotal": 0, - "vectorsdbDatabasesReadsTotal": 0, - "vectorsdbDatabasesWritesTotal": 0, - "vectorsdbDatabases": [], - "vectorsdbCollections": [], - "vectorsdbDocuments": [], - "vectorsdbDatabasesStorage": [], - "vectorsdbDatabasesReads": [], - "vectorsdbDatabasesWrites": [], - "embeddingsText": [], - "embeddingsTextTokens": [], - "embeddingsTextDuration": [], - "embeddingsTextErrors": [], - "embeddingsTextTotal": 0, - "embeddingsTextTokensTotal": 0, - "embeddingsTextDurationTotal": 0, - "embeddingsTextErrorsTotal": 0 - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application\/json" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "Content-Type", - "value": "application\/json" - } - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "memory", - "cpus", - "enabled", - "slug" - ], - "example": { - "memory": 512, - "cpus": 1, - "enabled": true, - "slug": "s-1vcpu-512mb" - } - }, - "proxyRule": { - "description": "Rule", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Rule ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Rule creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Rule update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": "appwrite.company.com" - }, - "type": { - "type": "string", - "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", - "x-example": "deployment" - }, - "trigger": { - "type": "string", - "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", - "x-example": "manual" - }, - "redirectUrl": { - "type": "string", - "description": "URL to redirect to. Used if type is \"redirect\"", - "x-example": "https:\/\/appwrite.io\/docs" - }, - "redirectStatusCode": { - "type": "integer", - "description": "Status code to apply during redirect. Used if type is \"redirect\"", - "x-example": 301, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "ID of deployment. Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" - }, - "deploymentResourceType": { - "type": "string", - "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function", - "enum": [ - "function", - "site" - ], - "nullable": true - }, - "deploymentResourceId": { - "type": "string", - "description": "ID deployment's resource. Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" - }, - "deploymentVcsProviderBranch": { - "type": "string", - "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "main" - }, - "status": { - "type": "string", - "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified", - "enum": [ - "created", - "verifying", - "verified", - "unverified" - ] - }, - "logs": { - "type": "string", - "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", - "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." - }, - "renewAt": { - "type": "string", - "description": "Certificate auto-renewal date in ISO 8601 format.", - "x-example": "datetime" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "domain", - "type", - "trigger", - "redirectUrl", - "redirectStatusCode", - "deploymentId", - "deploymentResourceId", - "deploymentVcsProviderBranch", - "status", - "logs", - "renewAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "domain": "appwrite.company.com", - "type": "deployment", - "trigger": "manual", - "redirectUrl": "https:\/\/appwrite.io\/docs", - "redirectStatusCode": 301, - "deploymentId": "n3u9feiwmf", - "deploymentResourceType": "function", - "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "main", - "status": "verified", - "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", - "renewAt": "datetime" - } - }, - "schedule": { - "description": "Schedule", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Schedule ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Schedule creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Schedule update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceType": { - "type": "string", - "description": "The resource type associated with this schedule.", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "The resource ID associated with this schedule.", - "x-example": "5e5ea5c16897e" - }, - "resourceUpdatedAt": { - "type": "string", - "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "projectId": { - "type": "string", - "description": "The project ID associated with this schedule.", - "x-example": "5e5ea5c16897e" - }, - "schedule": { - "type": "string", - "description": "The CRON schedule expression.", - "x-example": "5 4 * * *" - }, - "data": { - "type": "object", - "description": "Schedule data used to store resource-specific context needed for execution.", - "x-example": [] - }, - "active": { - "type": "boolean", - "description": "Whether the schedule is active.", - "x-example": true - }, - "region": { - "type": "string", - "description": "The region where the schedule is deployed.", - "x-example": "fra" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "resourceType", - "resourceId", - "resourceUpdatedAt", - "projectId", - "schedule", - "data", - "active", - "region" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "resourceType": "function", - "resourceId": "5e5ea5c16897e", - "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", - "projectId": "5e5ea5c16897e", - "schedule": "5 4 * * *", - "data": [], - "active": true, - "region": "fra" - } - }, - "emailTemplate": { - "description": "EmailTemplate", - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Template type", - "x-example": "verification" - }, - "locale": { - "type": "string", - "description": "Template locale", - "x-example": "en_us" - }, - "message": { - "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." - }, - "senderName": { - "type": "string", - "description": "Name of the sender", - "x-example": "My User" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" - }, - "replyToName": { - "type": "string", - "description": "Reply to name", - "x-example": "Support Team" - }, - "subject": { - "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" - } - }, - "required": [ - "templateId", - "locale", - "message", - "senderName", - "senderEmail", - "replyToEmail", - "replyToName", - "subject" - ], - "example": { - "templateId": "verification", - "locale": "en_us", - "message": "Click on the link to verify your account.", - "senderName": "My User", - "senderEmail": "mail@appwrite.io", - "replyToEmail": "emails@appwrite.io", - "replyToName": "Support Team", - "subject": "Please verify your email address" - } - }, - "consoleVariables": { - "description": "Console Variables", - "type": "object", - "properties": { - "_APP_DOMAIN_TARGET_CNAME": { - "type": "string", - "description": "CNAME target for your Appwrite custom domains.", - "x-example": "appwrite.io" - }, - "_APP_DOMAIN_TARGET_A": { - "type": "string", - "description": "A target for your Appwrite custom domains.", - "x-example": "127.0.0.1" - }, - "_APP_COMPUTE_BUILD_TIMEOUT": { - "type": "integer", - "description": "Maximum build timeout in seconds.", - "x-example": 900, - "format": "int32" - }, - "_APP_DOMAIN_TARGET_AAAA": { - "type": "string", - "description": "AAAA target for your Appwrite custom domains.", - "x-example": "::1" - }, - "_APP_DOMAIN_TARGET_CAA": { - "type": "string", - "description": "CAA target for your Appwrite custom domains.", - "x-example": "digicert.com" - }, - "_APP_STORAGE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for file upload in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_COMPUTE_SIZE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for deployment in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_USAGE_STATS": { - "type": "string", - "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", - "x-example": "enabled" - }, - "_APP_VCS_ENABLED": { - "type": "boolean", - "description": "Defines if VCS (Version Control System) is enabled.", - "x-example": true - }, - "_APP_DOMAIN_ENABLED": { - "type": "boolean", - "description": "Defines if main domain is configured. If so, custom domains can be created.", - "x-example": true - }, - "_APP_ASSISTANT_ENABLED": { - "type": "boolean", - "description": "Defines if AI assistant is enabled.", - "x-example": true - }, - "_APP_DOMAIN_SITES": { - "type": "string", - "description": "A comma separated list of domains to use for site URLs.", - "x-example": "sites.localhost,sites.example.com" - }, - "_APP_DOMAIN_FUNCTIONS": { - "type": "string", - "description": "A domain to use for function URLs.", - "x-example": "functions.localhost" - }, - "_APP_OPTIONS_FORCE_HTTPS": { - "type": "string", - "description": "Defines if HTTPS is enforced for all requests.", - "x-example": "enabled" - }, - "_APP_DOMAINS_NAMESERVERS": { - "type": "string", - "description": "Comma-separated list of nameservers.", - "x-example": "ns1.example.com,ns2.example.com" - }, - "_APP_DB_ADAPTER": { - "type": "string", - "description": "Database adapter in use.", - "x-example": "mysql" - }, - "supportForRelationships": { - "type": "boolean", - "description": "Whether the database adapter supports relationships.", - "x-example": true - }, - "supportForOperators": { - "type": "boolean", - "description": "Whether the database adapter supports operators.", - "x-example": true - }, - "supportForSpatials": { - "type": "boolean", - "description": "Whether the database adapter supports spatial attributes.", - "x-example": true - }, - "supportForSpatialIndexNull": { - "type": "boolean", - "description": "Whether the database adapter supports spatial indexes on nullable columns.", - "x-example": false - }, - "supportForFulltextWildcard": { - "type": "boolean", - "description": "Whether the database adapter supports fulltext wildcard search.", - "x-example": true - }, - "supportForMultipleFulltextIndexes": { - "type": "boolean", - "description": "Whether the database adapter supports multiple fulltext indexes per collection.", - "x-example": true - }, - "supportForAttributeResizing": { - "type": "boolean", - "description": "Whether the database adapter supports resizing attributes.", - "x-example": true - }, - "supportForSchemas": { - "type": "boolean", - "description": "Whether the database adapter supports fixed schemas with row width limits.", - "x-example": true - }, - "maxIndexLength": { - "type": "integer", - "description": "Maximum index length supported by the database adapter.", - "x-example": 768, - "format": "int32" - }, - "supportForIntegerIds": { - "type": "boolean", - "description": "Whether the database adapter uses integer sequence IDs.", - "x-example": true - } - }, - "required": [ - "_APP_DOMAIN_TARGET_CNAME", - "_APP_DOMAIN_TARGET_A", - "_APP_COMPUTE_BUILD_TIMEOUT", - "_APP_DOMAIN_TARGET_AAAA", - "_APP_DOMAIN_TARGET_CAA", - "_APP_STORAGE_LIMIT", - "_APP_COMPUTE_SIZE_LIMIT", - "_APP_USAGE_STATS", - "_APP_VCS_ENABLED", - "_APP_DOMAIN_ENABLED", - "_APP_ASSISTANT_ENABLED", - "_APP_DOMAIN_SITES", - "_APP_DOMAIN_FUNCTIONS", - "_APP_OPTIONS_FORCE_HTTPS", - "_APP_DOMAINS_NAMESERVERS", - "_APP_DB_ADAPTER", - "supportForRelationships", - "supportForOperators", - "supportForSpatials", - "supportForSpatialIndexNull", - "supportForFulltextWildcard", - "supportForMultipleFulltextIndexes", - "supportForAttributeResizing", - "supportForSchemas", - "maxIndexLength", - "supportForIntegerIds" - ], - "example": { - "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", - "_APP_DOMAIN_TARGET_A": "127.0.0.1", - "_APP_COMPUTE_BUILD_TIMEOUT": 900, - "_APP_DOMAIN_TARGET_AAAA": "::1", - "_APP_DOMAIN_TARGET_CAA": "digicert.com", - "_APP_STORAGE_LIMIT": "30000000", - "_APP_COMPUTE_SIZE_LIMIT": "30000000", - "_APP_USAGE_STATS": "enabled", - "_APP_VCS_ENABLED": true, - "_APP_DOMAIN_ENABLED": true, - "_APP_ASSISTANT_ENABLED": true, - "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", - "_APP_DOMAIN_FUNCTIONS": "functions.localhost", - "_APP_OPTIONS_FORCE_HTTPS": "enabled", - "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", - "_APP_DB_ADAPTER": "mysql", - "supportForRelationships": true, - "supportForOperators": true, - "supportForSpatials": true, - "supportForSpatialIndexNull": false, - "supportForFulltextWildcard": true, - "supportForMultipleFulltextIndexes": true, - "supportForAttributeResizing": true, - "supportForSchemas": true, - "maxIndexLength": 768, - "supportForIntegerIds": true - } - }, - "consoleOAuth2ProviderParameter": { - "description": "Console OAuth2 Provider Parameter", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", - "x-example": "clientId" - }, - "name": { - "type": "string", - "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", - "x-example": "Client ID or App ID" - }, - "example": { - "type": "string", - "description": "Example value for this parameter.", - "x-example": "e4d87900000000540733" - }, - "hint": { - "type": "string", - "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", - "x-example": "Example of wrong value: 370006" - } - }, - "required": [ - "$id", - "name", - "example", - "hint" - ], - "example": { - "$id": "clientId", - "name": "Client ID or App ID", - "example": "e4d87900000000540733", - "hint": "Example of wrong value: 370006" - } - }, - "consoleOAuth2Provider": { - "description": "Console OAuth2 Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "parameters": { - "type": "array", - "description": "List of parameters required to configure this OAuth2 provider.", - "items": { - "$ref": "#\/components\/schemas\/consoleOAuth2ProviderParameter" - }, - "x-example": "" - } - }, - "required": [ - "$id", - "parameters" - ], - "example": { - "$id": "github", - "parameters": "" - } - }, - "consoleOAuth2ProviderList": { - "description": "Console OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers exposed by the server.", - "x-example": 5, - "format": "int32" - }, - "oAuth2Providers": { - "type": "array", - "description": "List of OAuth2 providers, each with the parameters required to configure it.", - "items": { - "$ref": "#\/components\/schemas\/consoleOAuth2Provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "oAuth2Providers" - ], - "example": { - "total": 5, - "oAuth2Providers": "" - } - }, - "consoleKeyScope": { - "description": "Console Key Scope", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Scope ID.", - "x-example": "users.read" - }, - "description": { - "type": "string", - "description": "Scope description.", - "x-example": "Access to read your project's users" - }, - "category": { - "type": "string", - "description": "Scope category.", - "x-example": "Auth" - }, - "deprecated": { - "type": "boolean", - "description": "Scope is deprecated.", - "x-example": true - } - }, - "required": [ - "$id", - "description", - "category", - "deprecated" - ], - "example": { - "$id": "users.read", - "description": "Access to read your project's users", - "category": "Auth", - "deprecated": true - } - }, - "consoleKeyScopeList": { - "description": "Console Key Scopes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of key scopes exposed by the server.", - "x-example": 5, - "format": "int32" - }, - "scopes": { - "type": "array", - "description": "List of key scopes, each with its ID and description.", - "items": { - "$ref": "#\/components\/schemas\/consoleKeyScope" - }, - "x-example": "" - } - }, - "required": [ - "total", - "scopes" - ], - "example": { - "total": 5, - "scopes": "" - } - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": [ - "totp", - "phone", - "email", - "recoveryCode" - ], - "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true - } - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - }, - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Mailgun", - "provider": "mailgun", - "enabled": true, - "type": "sms", - "credentials": { - "key": "123456789" - }, - "options": { - "from": "sender-email@mydomain" - } - } - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "processing", - "enum": [ - "draft", - "processing", - "scheduled", - "sent", - "failed" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "topics": [ - "5e5ea5c16897e" - ], - "users": [ - "5e5ea5c16897e" - ], - "targets": [ - "5e5ea5c16897e" - ], - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "deliveredAt": "2020-10-15T06:38:00.000+00:00", - "deliveryErrors": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "deliveredTotal": 1, - "data": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - }, - "status": "processing" - } - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "events", - "emailTotal": 100, - "smsTotal": 100, - "pushTotal": 100, - "subscribe": "users" - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" - }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "$ref": "#\/components\/schemas\/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" - } - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false - } - }, - "migration": { - "description": "Migration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Migration ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Migration creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Migration status ( pending, processing, failed, completed ) ", - "x-example": "pending" - }, - "stage": { - "type": "string", - "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", - "x-example": "init" - }, - "source": { - "type": "string", - "description": "A string containing the type of source of the migration.", - "x-example": "Appwrite" - }, - "destination": { - "type": "string", - "description": "A string containing the type of destination of the migration.", - "x-example": "Appwrite" - }, - "resources": { - "type": "array", - "description": "Resources to migrate.", - "items": { - "type": "string" - }, - "x-example": [ - "user" - ] - }, - "resourceId": { - "type": "string", - "description": "Id of the resource to migrate.", - "x-example": "databaseId:collectionId" - }, - "statusCounters": { - "type": "object", - "description": "A group of counters that represent the total progress of the migration.", - "x-example": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}" - }, - "resourceData": { - "type": "object", - "description": "An array of objects containing the report data of the resources that were migrated.", - "x-example": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]" - }, - "errors": { - "type": "array", - "description": "All errors that occurred during the migration process.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "options": { - "type": "object", - "description": "Migration options used during the migration process.", - "x-example": "{\"bucketId\": \"exports\", \"notify\": false}" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "stage", - "source", - "destination", - "resources", - "resourceId", - "statusCounters", - "resourceData", - "errors", - "options" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "stage": "init", - "source": "Appwrite", - "destination": "Appwrite", - "resources": [ - "user" - ], - "resourceId": "databaseId:collectionId", - "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", - "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", - "errors": [], - "options": "{\"bucketId\": \"exports\", \"notify\": false}" - } - }, - "migrationReport": { - "description": "Migration Report", - "type": "object", - "properties": { - "user": { - "type": "integer", - "description": "Number of users to be migrated.", - "x-example": 20, - "format": "int32" - }, - "team": { - "type": "integer", - "description": "Number of teams to be migrated.", - "x-example": 20, - "format": "int32" - }, - "database": { - "type": "integer", - "description": "Number of databases to be migrated.", - "x-example": 20, - "format": "int32" - }, - "row": { - "type": "integer", - "description": "Number of rows to be migrated.", - "x-example": 20, - "format": "int32" - }, - "file": { - "type": "integer", - "description": "Number of files to be migrated.", - "x-example": 20, - "format": "int32" - }, - "bucket": { - "type": "integer", - "description": "Number of buckets to be migrated.", - "x-example": 20, - "format": "int32" - }, - "function": { - "type": "integer", - "description": "Number of functions to be migrated.", - "x-example": 20, - "format": "int32" - }, - "site": { - "type": "integer", - "description": "Number of sites to be migrated.", - "x-example": 5, - "format": "int32" - }, - "provider": { - "type": "integer", - "description": "Number of providers to be migrated.", - "x-example": 5, - "format": "int32" - }, - "topic": { - "type": "integer", - "description": "Number of topics to be migrated.", - "x-example": 10, - "format": "int32" - }, - "subscriber": { - "type": "integer", - "description": "Number of subscribers to be migrated.", - "x-example": 100, - "format": "int32" - }, - "message": { - "type": "integer", - "description": "Number of messages to be migrated.", - "x-example": 50, - "format": "int32" - }, - "size": { - "type": "integer", - "description": "Size of files to be migrated in mb.", - "x-example": 30000, - "format": "int32" - }, - "version": { - "type": "string", - "description": "Version of the Appwrite instance to be migrated.", - "x-example": "1.4.0" - } - }, - "required": [ - "user", - "team", - "database", - "row", - "file", - "bucket", - "function", - "site", - "provider", - "topic", - "subscriber", - "message", - "size", - "version" - ], - "example": { - "user": 20, - "team": 20, - "database": 20, - "row": 20, - "file": 20, - "bucket": 20, - "function": 20, - "site": 5, - "provider": 5, - "topic": 10, - "subscriber": 100, - "message": 50, - "size": 30000, - "version": "1.4.0" - } - } - }, - "securitySchemes": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Mode": { - "type": "apiKey", - "name": "X-Appwrite-Mode", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "" - } - }, - "Cookie": { - "type": "apiKey", - "name": "Cookie", - "description": "The user cookie to authenticate with", - "in": "header" - }, - "ImpersonateUserId": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Id", - "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserEmail": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Email", - "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserPhone": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Phone", - "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - } - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https:\/\/appwrite.io\/docs" - } -} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json deleted file mode 100644 index 24e8d94371..0000000000 --- a/app/config/specs/open-api3-latest-server.json +++ /dev/null @@ -1,68884 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "1.9.3", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", - "termsOfService": "https:\/\/appwrite.io\/policy\/terms", - "contact": { - "name": "Appwrite Team", - "url": "https:\/\/appwrite.io\/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" - } - }, - "servers": [ - { - "url": "https:\/\/cloud.appwrite.io\/v1" - }, - { - "url": "https:\/\/<REGION>.cloud.appwrite.io\/v1" - } - ], - "paths": { - "\/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "tags": [ - "account" - ], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "account", - "weight": 9, - "cookies": false, - "type": "", - "demo": "account\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create account", - "operationId": "accountCreate", - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "account", - "weight": 8, - "cookies": false, - "type": "", - "demo": "account\/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", - "tags": [ - "account" - ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "account", - "weight": 34, - "cookies": false, - "type": "", - "demo": "account\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "tags": [ - "account" - ], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/identityList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/account\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "tags": [ - "account" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<IDENTITY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/jwt" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "tokens", - "weight": 29, - "cookies": false, - "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "x-example": 0, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/account\/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "tags": [ - "account" - ], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 31, - "cookies": false, - "type": "", - "demo": "account\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "tags": [ - "account" - ], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMFA", - "group": "mfa", - "weight": 166, - "cookies": false, - "type": "", - "demo": "account\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - } - } - } - }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaType" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", - "weight": 168, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", - "weight": 169, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "tags": [ - "account" - ], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 170, - "cookies": false, - "type": "", - "demo": "account\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/account\/mfa\/challenges": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "tags": [ - "account" - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaChallenge" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", - "weight": 174, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": [ - "factor" - ] - } - } - } - } - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "tags": [ - "account" - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", - "weight": 175, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } - }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "x-example": "<CHALLENGE_ID>" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<OTP>" - } - }, - "required": [ - "challengeId", - "otp" - ] - } - } - } - } - } - }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "tags": [ - "account" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 167, - "cookies": false, - "type": "", - "demo": "account\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 173, - "cookies": false, - "type": "", - "demo": "account\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 171, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", - "tags": [ - "account" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 172, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "weight": 32, - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", - "tags": [ - "account" - ], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "account", - "weight": 33, - "cookies": false, - "type": "", - "demo": "account\/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - } - } - } - }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "tags": [ - "account" - ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "account", - "weight": 35, - "cookies": false, - "type": "", - "demo": "account\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - } - } - } - }, - "\/account\/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "tags": [ - "account" - ], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "account", - "weight": 30, - "cookies": false, - "type": "", - "demo": "account\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", - "tags": [ - "account" - ], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "account", - "weight": 36, - "cookies": false, - "type": "", - "demo": "account\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", - "tags": [ - "account" - ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRecovery", - "group": "recovery", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", - "weight": 39, - "cookies": false, - "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "x-example": "<SECRET>" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null - } - }, - "required": [ - "userId", - "secret", - "password" - ] - } - } - } - } - } - }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "tags": [ - "account" - ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/sessionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 11, - "cookies": false, - "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", - "tags": [ - "account" - ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 12, - "cookies": false, - "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", - "weight": 17, - "cookies": false, - "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "tags": [ - "account" - ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", - "weight": 16, - "cookies": false, - "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - } - } - } - }, - "\/account\/sessions\/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", - "weight": 26, - "cookies": false, - "type": "", - "demo": "account\/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "weight": 27, - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 18, - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/{sessionId}": { - "get": { - "summary": "Get session", - "operationId": "accountGetSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSession", - "group": "sessions", - "weight": 13, - "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSession", - "group": "sessions", - "weight": 15, - "cookies": false, - "type": "", - "demo": "account\/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "tags": [ - "account" - ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 14, - "cookies": false, - "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", - "tags": [ - "account" - ], - "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "account", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/tokens\/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailToken", - "group": "tokens", - "weight": 25, - "cookies": false, - "type": "", - "demo": "account\/create-email-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - } - } - } - }, - "\/account\/tokens\/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMagicURLToken", - "group": "tokens", - "weight": 24, - "cookies": false, - "type": "", - "demo": "account\/create-magic-url-token.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - } - } - } - }, - "\/account\/tokens\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "301": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Token", - "group": "tokens", - "weight": 23, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-token.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/account\/tokens\/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "tags": [ - "account" - ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneToken", - "group": "tokens", - "weight": 28, - "cookies": false, - "type": "", - "demo": "account\/create-phone-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},phone:{param-phone}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "userId", - "phone" - ] - } - } - } - } - } - }, - "\/account\/verifications\/email": { - "post": { - "summary": "Create email verification", - "operationId": "accountCreateEmailVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailVerification", - "group": "verification", - "weight": 40, - "cookies": false, - "type": "", - "demo": "account\/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", - "methods": [ - { - "name": "createEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-email-verification.md", - "public": true - }, - { - "name": "createVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createEmailVerification" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update email verification (confirmation)", - "operationId": "accountUpdateEmailVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "verification", - "weight": 41, - "cookies": false, - "type": "", - "demo": "account\/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", - "methods": [ - { - "name": "updateEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-email-verification.md", - "public": true - }, - { - "name": "updateVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateEmailVerification" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/verifications\/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneVerification", - "group": "verification", - "weight": 42, - "cookies": false, - "type": "", - "demo": "account\/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},userId:{userId}", - "url:{url},ip:{ip}" - ], - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "verification", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account\/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBrowser", - "group": null, - "weight": 177, - "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "schema": { - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", - "tags": [ - "avatars" - ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCreditCard", - "group": null, - "weight": 176, - "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", - "required": true, - "schema": { - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFavicon", - "group": null, - "weight": 180, - "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - } - ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFlag", - "group": null, - "weight": 178, - "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "schema": { - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ] - }, - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getImage", - "group": null, - "weight": 179, - "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400 - }, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400 - }, - "in": "query" - } - ] - } - }, - "\/avatars\/initials": { - "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInitials", - "group": null, - "weight": 182, - "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<NAME>", - "default": "" - }, - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 - }, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 - }, - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/avatars\/qr": { - "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", - "tags": [ - "avatars" - ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQR", - "group": null, - "weight": 181, - "cookies": false, - "type": "location", - "demo": "avatars\/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEXT>" - }, - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400 - }, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": false - }, - "in": "query" - } - ] - } - }, - "\/avatars\/screenshots": { - "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", - "tags": [ - "avatars" - ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getScreenshot", - "group": null, - "weight": 183, - "cookies": false, - "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to capture.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "schema": { - "type": "object", - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", - "default": {} - }, - "in": "query" - }, - { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "1920", - "default": 1280 - }, - "in": "query" - }, - { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "1080", - "default": 720 - }, - "in": "query" - }, - { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "2", - "default": 1 - }, - "in": "query" - }, - { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "schema": { - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "light" - }, - "in": "query" - }, - { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "" - }, - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false - }, - "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "en-US", - "default": "" - }, - "in": "query" - }, - { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "america\/new_york", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "" - }, - "in": "query" - }, - { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0 - }, - "in": "query" - }, - { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0 - }, - "in": "query" - }, - { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": "100", - "default": 0 - }, - "in": "query" - }, - { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false - }, - "in": "query" - }, - { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [] - }, - "in": "query" - }, - { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0 - }, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0 - }, - "in": "query" - }, - { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0 - }, - "in": "query" - }, - { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1 - }, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "tags": [ - "databases" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "list", - "group": "databases", - "weight": 191, - "cookies": false, - "type": "", - "demo": "databases\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - }, - "methods": [ - { - "name": "list", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search", - "total" - ], - "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.", - "demo": "databases\/list.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "tags": [ - "databases" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "create", - "group": "databases", - "weight": 187, - "cookies": false, - "type": "", - "demo": "databases\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - }, - "methods": [ - { - "name": "create", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n", - "demo": "databases\/create.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", - "tags": [ - "databases" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 259, - "cookies": false, - "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 255, - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", - "tags": [ - "databases" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 256, - "cookies": false, - "type": "", - "demo": "databases\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 257, - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "tags": [ - "databases" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 258, - "cookies": false, - "type": "", - "demo": "databases\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", - "tags": [ - "databases" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 260, - "cookies": false, - "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "tags": [ - "databases" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "get", - "group": "databases", - "weight": 188, - "cookies": false, - "type": "", - "demo": "databases\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - }, - "methods": [ - { - "name": "get", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/get.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "tags": [ - "databases" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "update", - "group": "databases", - "weight": 189, - "cookies": false, - "type": "", - "demo": "databases\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - }, - "methods": [ - { - "name": "update", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID.", - "demo": "databases\/update.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "tags": [ - "databases" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "delete", - "group": "databases", - "weight": 190, - "cookies": false, - "type": "", - "demo": "databases\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - }, - "methods": [ - { - "name": "delete", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/delete.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "tags": [ - "databases" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collectionList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 199, - "cookies": false, - "type": "", - "demo": "databases\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTables" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collections", - "operationId": "databasesCreateCollection", - "tags": [ - "databases" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 195, - "cookies": false, - "type": "", - "demo": "databases\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "tags": [ - "databases" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 196, - "cookies": false, - "type": "", - "demo": "databases\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "tags": [ - "databases" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 197, - "cookies": false, - "type": "", - "demo": "databases\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "tags": [ - "databases" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 198, - "cookies": false, - "type": "", - "demo": "databases\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "tags": [ - "databases" - ], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listAttributes", - "group": "attributes", - "weight": 216, - "cookies": false, - "type": "", - "demo": "databases\/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listColumns" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "tags": [ - "databases" - ], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createBooleanAttribute", - "group": "attributes", - "weight": 217, - "cookies": false, - "type": "", - "demo": "databases\/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createBooleanColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "tags": [ - "databases" - ], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateBooleanAttribute", - "group": "attributes", - "weight": 218, - "cookies": false, - "type": "", - "demo": "databases\/update-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateBooleanColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "tags": [ - "databases" - ], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDatetimeAttribute", - "group": "attributes", - "weight": 219, - "cookies": false, - "type": "", - "demo": "databases\/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createDatetimeColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { - "patch": { - "summary": "Update datetime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "tags": [ - "databases" - ], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "group": "attributes", - "weight": 220, - "cookies": false, - "type": "", - "demo": "databases\/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateDatetimeColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "tags": [ - "databases" - ], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEmailAttribute", - "group": "attributes", - "weight": 221, - "cookies": false, - "type": "", - "demo": "databases\/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEmailColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "tags": [ - "databases" - ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEmailAttribute", - "group": "attributes", - "weight": 222, - "cookies": false, - "type": "", - "demo": "databases\/update-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEmailColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "tags": [ - "databases" - ], - "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEnumAttribute", - "group": "attributes", - "weight": 223, - "cookies": false, - "type": "", - "demo": "databases\/create-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEnumColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "tags": [ - "databases" - ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEnumAttribute", - "group": "attributes", - "weight": 224, - "cookies": false, - "type": "", - "demo": "databases\/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEnumColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "tags": [ - "databases" - ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFloatAttribute", - "group": "attributes", - "weight": 225, - "cookies": false, - "type": "", - "demo": "databases\/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createFloatColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "tags": [ - "databases" - ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFloatAttribute", - "group": "attributes", - "weight": 226, - "cookies": false, - "type": "", - "demo": "databases\/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateFloatColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "tags": [ - "databases" - ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIntegerAttribute", - "group": "attributes", - "weight": 227, - "cookies": false, - "type": "", - "demo": "databases\/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIntegerColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "tags": [ - "databases" - ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIntegerAttribute", - "group": "attributes", - "weight": 228, - "cookies": false, - "type": "", - "demo": "databases\/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIntegerColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "tags": [ - "databases" - ], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeIp" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIpAttribute", - "group": "attributes", - "weight": 229, - "cookies": false, - "type": "", - "demo": "databases\/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIpColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "tags": [ - "databases" - ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeIp" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIpAttribute", - "group": "attributes", - "weight": 230, - "cookies": false, - "type": "", - "demo": "databases\/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIpColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { - "post": { - "summary": "Create line attribute", - "operationId": "databasesCreateLineAttribute", - "tags": [ - "databases" - ], - "description": "Create a geometric line attribute.", - "responses": { - "202": { - "description": "AttributeLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLine" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createLineAttribute", - "group": "attributes", - "weight": 231, - "cookies": false, - "type": "", - "demo": "databases\/create-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createLineColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { - "patch": { - "summary": "Update line attribute", - "operationId": "databasesUpdateLineAttribute", - "tags": [ - "databases" - ], - "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLine" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateLineAttribute", - "group": "attributes", - "weight": 232, - "cookies": false, - "type": "", - "demo": "databases\/update-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateLineColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { - "post": { - "summary": "Create longtext attribute", - "operationId": "databasesCreateLongtextAttribute", - "tags": [ - "databases" - ], - "description": "Create a longtext attribute.\n", - "responses": { - "202": { - "description": "AttributeLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextAttribute", - "group": "attributes", - "weight": 249, - "cookies": false, - "type": "", - "demo": "databases\/create-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { - "patch": { - "summary": "Update longtext attribute", - "operationId": "databasesUpdateLongtextAttribute", - "tags": [ - "databases" - ], - "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextAttribute", - "group": "attributes", - "weight": 250, - "cookies": false, - "type": "", - "demo": "databases\/update-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { - "post": { - "summary": "Create mediumtext attribute", - "operationId": "databasesCreateMediumtextAttribute", - "tags": [ - "databases" - ], - "description": "Create a mediumtext attribute.\n", - "responses": { - "202": { - "description": "AttributeMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextAttribute", - "group": "attributes", - "weight": 247, - "cookies": false, - "type": "", - "demo": "databases\/create-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext attribute", - "operationId": "databasesUpdateMediumtextAttribute", - "tags": [ - "databases" - ], - "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextAttribute", - "group": "attributes", - "weight": 248, - "cookies": false, - "type": "", - "demo": "databases\/update-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { - "post": { - "summary": "Create point attribute", - "operationId": "databasesCreatePointAttribute", - "tags": [ - "databases" - ], - "description": "Create a geometric point attribute.", - "responses": { - "202": { - "description": "AttributePoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePoint" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPointAttribute", - "group": "attributes", - "weight": 233, - "cookies": false, - "type": "", - "demo": "databases\/create-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPointColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { - "patch": { - "summary": "Update point attribute", - "operationId": "databasesUpdatePointAttribute", - "tags": [ - "databases" - ], - "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePoint" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePointAttribute", - "group": "attributes", - "weight": 234, - "cookies": false, - "type": "", - "demo": "databases\/update-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePointColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { - "post": { - "summary": "Create polygon attribute", - "operationId": "databasesCreatePolygonAttribute", - "tags": [ - "databases" - ], - "description": "Create a geometric polygon attribute.", - "responses": { - "202": { - "description": "AttributePolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPolygonAttribute", - "group": "attributes", - "weight": 235, - "cookies": false, - "type": "", - "demo": "databases\/create-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPolygonColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { - "patch": { - "summary": "Update polygon attribute", - "operationId": "databasesUpdatePolygonAttribute", - "tags": [ - "databases" - ], - "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePolygonAttribute", - "group": "attributes", - "weight": 236, - "cookies": false, - "type": "", - "demo": "databases\/update-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePolygonColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "tags": [ - "databases" - ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createRelationshipAttribute", - "group": "attributes", - "weight": 237, - "cookies": false, - "type": "", - "demo": "databases\/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRelationshipColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID.", - "x-example": "<RELATED_COLLECTION_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedCollectionId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "tags": [ - "databases" - ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "group": "attributes", - "weight": 238, - "cookies": false, - "type": "", - "demo": "databases\/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRelationshipColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "tags": [ - "databases" - ], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringAttribute", - "group": "attributes", - "weight": 239, - "cookies": false, - "type": "", - "demo": "databases\/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createStringColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "tags": [ - "databases" - ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringAttribute", - "group": "attributes", - "weight": 240, - "cookies": false, - "type": "", - "demo": "databases\/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateStringColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { - "post": { - "summary": "Create text attribute", - "operationId": "databasesCreateTextAttribute", - "tags": [ - "databases" - ], - "description": "Create a text attribute.\n", - "responses": { - "202": { - "description": "AttributeText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextAttribute", - "group": "attributes", - "weight": 245, - "cookies": false, - "type": "", - "demo": "databases\/create-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { - "patch": { - "summary": "Update text attribute", - "operationId": "databasesUpdateTextAttribute", - "tags": [ - "databases" - ], - "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextAttribute", - "group": "attributes", - "weight": 246, - "cookies": false, - "type": "", - "demo": "databases\/update-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "tags": [ - "databases" - ], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createUrlAttribute", - "group": "attributes", - "weight": 241, - "cookies": false, - "type": "", - "demo": "databases\/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createUrlColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "tags": [ - "databases" - ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateUrlAttribute", - "group": "attributes", - "weight": 242, - "cookies": false, - "type": "", - "demo": "databases\/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateUrlColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { - "post": { - "summary": "Create varchar attribute", - "operationId": "databasesCreateVarcharAttribute", - "tags": [ - "databases" - ], - "description": "Create a varchar attribute.\n", - "responses": { - "202": { - "description": "AttributeVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharAttribute", - "group": "attributes", - "weight": 243, - "cookies": false, - "type": "", - "demo": "databases\/create-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { - "patch": { - "summary": "Update varchar attribute", - "operationId": "databasesUpdateVarcharAttribute", - "tags": [ - "databases" - ], - "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharAttribute", - "group": "attributes", - "weight": 244, - "cookies": false, - "type": "", - "demo": "databases\/update-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar attribute.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "tags": [ - "databases" - ], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeInteger" - }, - { - "$ref": "#\/components\/schemas\/attributeFloat" - }, - { - "$ref": "#\/components\/schemas\/attributeEmail" - }, - { - "$ref": "#\/components\/schemas\/attributeEnum" - }, - { - "$ref": "#\/components\/schemas\/attributeUrl" - }, - { - "$ref": "#\/components\/schemas\/attributeIp" - }, - { - "$ref": "#\/components\/schemas\/attributeDatetime" - }, - { - "$ref": "#\/components\/schemas\/attributeRelationship" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getAttribute", - "group": "attributes", - "weight": 214, - "cookies": false, - "type": "", - "demo": "databases\/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "tags": [ - "databases" - ], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteAttribute", - "group": "attributes", - "weight": 215, - "cookies": false, - "type": "", - "demo": "databases\/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "tags": [ - "databases" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 210, - "cookies": false, - "type": "", - "demo": "databases\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "tags": [ - "databases" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 202, - "cookies": false, - "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - }, - { - "name": "createDocuments", - "namespace": "databases", - "desc": "Create documents", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRows" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "databasesUpsertDocuments", - "tags": [ - "databases" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 207, - "cookies": false, - "type": "", - "demo": "databases\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - }, - "methods": [ - { - "name": "upsertDocuments", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "demo": "databases\/upsert-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "documents" - ] - } - } - } - } - }, - "patch": { - "summary": "Update documents", - "operationId": "databasesUpdateDocuments", - "tags": [ - "databases" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 205, - "cookies": false, - "type": "", - "demo": "databases\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRows" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "databasesDeleteDocuments", - "tags": [ - "databases" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 209, - "cookies": false, - "type": "", - "demo": "databases\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRows" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "tags": [ - "databases" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 203, - "cookies": false, - "type": "", - "demo": "databases\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 206, - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "tags": [ - "databases" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 204, - "cookies": false, - "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 208, - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "tags": [ - "databases" - ], - "description": "Decrement a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 213, - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "tags": [ - "databases" - ], - "description": "Increment a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 212, - "cookies": false, - "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "tags": [ - "databases" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 254, - "cookies": false, - "type": "", - "demo": "databases\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listIndexes" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "tags": [ - "databases" - ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 251, - "cookies": false, - "type": "", - "demo": "databases\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIndex" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "DatabasesIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "tags": [ - "databases" - ], - "description": "Get an index by its unique ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 252, - "cookies": false, - "type": "", - "demo": "databases\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getIndex" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "tags": [ - "databases" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 253, - "cookies": false, - "type": "", - "demo": "databases\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteIndex" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb": { - "get": { - "summary": "List databases", - "operationId": "documentsDBList", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "documentsdb", - "weight": 338, - "cookies": false, - "type": "", - "demo": "documentsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "documentsDBCreate", - "tags": [ - "documentsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "documentsdb", - "weight": 334, - "cookies": false, - "type": "", - "demo": "documentsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 366, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 362, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 363, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 364, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 365, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", - "tags": [ - "documentsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 367, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "documentsDBGet", - "tags": [ - "documentsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "documentsdb", - "weight": 335, - "cookies": false, - "type": "", - "demo": "documentsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "documentsDBUpdate", - "tags": [ - "documentsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "documentsdb", - "weight": 336, - "cookies": false, - "type": "", - "demo": "documentsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "documentsDBDelete", - "tags": [ - "documentsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "documentsdb", - "weight": 337, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "documentsDBListCollections", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collectionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 345, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "documentsDBCreateCollection", - "tags": [ - "documentsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 341, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "documentsDBGetCollection", - "tags": [ - "documentsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 342, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "documentsDBUpdateCollection", - "tags": [ - "documentsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 343, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "documentsDBDeleteCollection", - "tags": [ - "documentsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 344, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "tags": [ - "documentsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 359, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 351, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "documentsDBUpsertDocuments", - "tags": [ - "documentsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 356, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "documentsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - } - } - }, - "patch": { - "summary": "Update documents", - "operationId": "documentsDBUpdateDocuments", - "tags": [ - "documentsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 354, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "documentsDBDeleteDocuments", - "tags": [ - "documentsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 358, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", - "tags": [ - "documentsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 352, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", - "tags": [ - "documentsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 355, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "tags": [ - "documentsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 353, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 357, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", - "tags": [ - "documentsDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 361, - "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "tags": [ - "documentsDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 360, - "cookies": false, - "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "documentsDBListIndexes", - "tags": [ - "documentsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 350, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "documentsDBCreateIndex", - "tags": [ - "documentsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 347, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "DocumentsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } - } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "documentsDBGetIndex", - "tags": [ - "documentsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 348, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "documentsDBDeleteIndex", - "tags": [ - "documentsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 349, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/functions": { - "get": { - "summary": "List functions", - "operationId": "functionsList", - "tags": [ - "functions" - ], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/functionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "functions", - "weight": 422, - "cookies": false, - "type": "", - "demo": "functions\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create function", - "operationId": "functionsCreate", - "tags": [ - "functions" - ], - "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", - "responses": { - "201": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "functions", - "weight": 419, - "cookies": false, - "type": "", - "demo": "functions\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "functionId": { - "type": "string", - "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<FUNCTION_ID>" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "functionId", - "name", - "runtime" - ] - } - } - } - } - } - }, - "\/functions\/runtimes": { - "get": { - "summary": "List runtimes", - "operationId": "functionsListRuntimes", - "tags": [ - "functions" - ], - "description": "Get a list of all runtimes that are currently active on your instance.", - "responses": { - "200": { - "description": "Runtimes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/runtimeList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRuntimes", - "group": "runtimes", - "weight": 424, - "cookies": false, - "type": "", - "demo": "functions\/list-runtimes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "functionsListSpecifications", - "tags": [ - "functions" - ], - "description": "List allowed function specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/specificationList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "runtimes", - "weight": 425, - "cookies": false, - "type": "", - "demo": "functions\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/{functionId}": { - "get": { - "summary": "Get function", - "operationId": "functionsGet", - "tags": [ - "functions" - ], - "description": "Get a function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "functions", - "weight": 420, - "cookies": false, - "type": "", - "demo": "functions\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update function", - "operationId": "functionsUpdate", - "tags": [ - "functions" - ], - "description": "Update function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "functions", - "weight": 421, - "cookies": false, - "type": "", - "demo": "functions\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete function", - "operationId": "functionsDelete", - "tags": [ - "functions" - ], - "description": "Delete a function by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "functions", - "weight": 423, - "cookies": false, - "type": "", - "demo": "functions\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployment": { - "patch": { - "summary": "Update function's deployment", - "operationId": "functionsUpdateFunctionDeployment", - "tags": [ - "functions" - ], - "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", - "responses": { - "200": { - "description": "Function", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/function" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFunctionDeployment", - "group": "functions", - "weight": 428, - "cookies": false, - "type": "", - "demo": "functions\/update-function-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "functionsListDeployments", - "tags": [ - "functions" - ], - "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deploymentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 429, - "cookies": false, - "type": "", - "demo": "functions\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "functionsCreateDeployment", - "tags": [ - "functions" - ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 426, - "cookies": false, - "type": "upload", - "demo": "functions\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "entrypoint": { - "type": "string", - "description": "Entrypoint File.", - "x-example": "<ENTRYPOINT>", - "x-nullable": true - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>", - "x-nullable": true - }, - "code": { - "type": "string", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "x-example": null, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "code", - "activate" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "functionsCreateDuplicateDeployment", - "tags": [ - "functions" - ], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 434, - "cookies": false, - "type": "", - "demo": "functions\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - }, - "buildId": { - "type": "string", - "description": "Build unique ID.", - "x-example": "<BUILD_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "functionsCreateTemplateDeployment", - "tags": [ - "functions" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 431, - "cookies": false, - "type": "", - "demo": "functions\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "commit", - "enum": [ - "commit", - "branch", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "functionsCreateVcsDeployment", - "tags": [ - "functions" - ], - "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 432, - "cookies": false, - "type": "", - "demo": "functions\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "functionsGetDeployment", - "tags": [ - "functions" - ], - "description": "Get a function deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 427, - "cookies": false, - "type": "", - "demo": "functions\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "functionsDeleteDeployment", - "tags": [ - "functions" - ], - "description": "Delete a code deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 430, - "cookies": false, - "type": "", - "demo": "functions\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "functionsGetDeploymentDownload", - "tags": [ - "functions" - ], - "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 433, - "cookies": false, - "type": "location", - "demo": "functions\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source" - }, - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "functionsUpdateDeploymentStatus", - "tags": [ - "functions" - ], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 435, - "cookies": false, - "type": "", - "demo": "functions\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/executions": { - "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", - "tags": [ - "functions" - ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/executionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listExecutions", - "group": "executions", - "weight": 438, - "cookies": false, - "type": "", - "demo": "functions\/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "tags": [ - "functions" - ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "content": { - "multipart\/form-data": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createExecution", - "group": "executions", - "weight": 436, - "cookies": false, - "type": "", - "demo": "functions\/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": "<SCHEDULED_AT>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", - "tags": [ - "functions" - ], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getExecution", - "group": "executions", - "weight": 437, - "cookies": false, - "type": "", - "demo": "functions\/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<EXECUTION_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "tags": [ - "functions" - ], - "description": "Delete a function execution by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteExecution", - "group": "executions", - "weight": 439, - "cookies": false, - "type": "", - "demo": "functions\/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<EXECUTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "tags": [ - "functions" - ], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 444, - "cookies": false, - "type": "", - "demo": "functions\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "tags": [ - "functions" - ], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 442, - "cookies": false, - "type": "", - "demo": "functions\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "tags": [ - "functions" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 443, - "cookies": false, - "type": "", - "demo": "functions\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "tags": [ - "functions" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 445, - "cookies": false, - "type": "", - "demo": "functions\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "tags": [ - "functions" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 446, - "cookies": false, - "type": "", - "demo": "functions\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "query", - "group": "graphql", - "weight": 117, - "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "mutation", - "group": "graphql", - "weight": 116, - "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", - "tags": [ - "health" - ], - "description": "Check the Appwrite HTTP server is up and responsive.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "health", - "weight": 449, - "cookies": false, - "type": "", - "demo": "health\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/anti-virus": { - "get": { - "summary": "Get antivirus", - "operationId": "healthGetAntivirus", - "tags": [ - "health" - ], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Antivirus", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthAntivirus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAntivirus", - "group": "health", - "weight": 458, - "cookies": false, - "type": "", - "demo": "health\/get-antivirus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/cache": { - "get": { - "summary": "Get cache", - "operationId": "healthGetCache", - "tags": [ - "health" - ], - "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCache", - "group": "health", - "weight": 452, - "cookies": false, - "type": "", - "demo": "health\/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "tags": [ - "health" - ], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthCertificate" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCertificate", - "group": "health", - "weight": 455, - "cookies": false, - "type": "", - "demo": "health\/get-certificate.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "schema": { - "type": "string" - }, - "in": "query" - } - ] - } - }, - "\/health\/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "tags": [ - "health" - ], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDB", - "group": "health", - "weight": 451, - "cookies": false, - "type": "", - "demo": "health\/get-db.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "tags": [ - "health" - ], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPubSub", - "group": "health", - "weight": 453, - "cookies": false, - "type": "", - "demo": "health\/get-pub-sub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/queue\/audits": { - "get": { - "summary": "Get audits queue", - "operationId": "healthGetQueueAudits", - "tags": [ - "health" - ], - "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueAudits", - "group": "queue", - "weight": 459, - "cookies": false, - "type": "", - "demo": "health\/get-queue-audits.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "tags": [ - "health" - ], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueBuilds", - "group": "queue", - "weight": 463, - "cookies": false, - "type": "", - "demo": "health\/get-queue-builds.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/certificates": { - "get": { - "summary": "Get certificates queue", - "operationId": "healthGetQueueCertificates", - "tags": [ - "health" - ], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueCertificates", - "group": "queue", - "weight": 462, - "cookies": false, - "type": "", - "demo": "health\/get-queue-certificates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "tags": [ - "health" - ], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDatabases", - "group": "queue", - "weight": 464, - "cookies": false, - "type": "", - "demo": "health\/get-queue-databases.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "schema": { - "type": "string", - "x-example": "<NAME>", - "default": "database_db_main" - }, - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "tags": [ - "health" - ], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDeletes", - "group": "queue", - "weight": 465, - "cookies": false, - "type": "", - "demo": "health\/get-queue-deletes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/failed\/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "tags": [ - "health" - ], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFailedJobs", - "group": "queue", - "weight": 472, - "cookies": false, - "type": "", - "demo": "health\/get-failed-jobs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "schema": { - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "tags": [ - "health" - ], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueFunctions", - "group": "queue", - "weight": 469, - "cookies": false, - "type": "", - "demo": "health\/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/logs": { - "get": { - "summary": "Get logs queue", - "operationId": "healthGetQueueLogs", - "tags": [ - "health" - ], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueLogs", - "group": "queue", - "weight": 461, - "cookies": false, - "type": "", - "demo": "health\/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "tags": [ - "health" - ], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMails", - "group": "queue", - "weight": 466, - "cookies": false, - "type": "", - "demo": "health\/get-queue-mails.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "tags": [ - "health" - ], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMessaging", - "group": "queue", - "weight": 467, - "cookies": false, - "type": "", - "demo": "health\/get-queue-messaging.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "tags": [ - "health" - ], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMigrations", - "group": "queue", - "weight": 468, - "cookies": false, - "type": "", - "demo": "health\/get-queue-migrations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-resources": { - "get": { - "summary": "Get stats resources queue", - "operationId": "healthGetQueueStatsResources", - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueStatsResources", - "group": "queue", - "weight": 470, - "cookies": false, - "type": "", - "demo": "health\/get-queue-stats-resources.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-usage": { - "get": { - "summary": "Get stats usage queue", - "operationId": "healthGetQueueUsage", - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueUsage", - "group": "queue", - "weight": 471, - "cookies": false, - "type": "", - "demo": "health\/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/queue\/webhooks": { - "get": { - "summary": "Get webhooks queue", - "operationId": "healthGetQueueWebhooks", - "tags": [ - "health" - ], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueWebhooks", - "group": "queue", - "weight": 460, - "cookies": false, - "type": "", - "demo": "health\/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, - "\/health\/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "tags": [ - "health" - ], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorage", - "group": "storage", - "weight": 457, - "cookies": false, - "type": "", - "demo": "health\/get-storage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/storage\/local": { - "get": { - "summary": "Get local storage", - "operationId": "healthGetStorageLocal", - "tags": [ - "health" - ], - "description": "Check the Appwrite local storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorageLocal", - "group": "storage", - "weight": 456, - "cookies": false, - "type": "", - "demo": "health\/get-storage-local.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/time": { - "get": { - "summary": "Get time", - "operationId": "healthGetTime", - "tags": [ - "health" - ], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", - "responses": { - "200": { - "description": "Health Time", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthTime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTime", - "group": "health", - "weight": 454, - "cookies": false, - "type": "", - "demo": "health\/get-time.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", - "tags": [ - "locale" - ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/locale" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 49, - "cookies": false, - "type": "", - "demo": "locale\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "tags": [ - "locale" - ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCodes", - "group": null, - "weight": 50, - "cookies": false, - "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "tags": [ - "locale" - ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/continentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listContinents", - "group": null, - "weight": 54, - "cookies": false, - "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "tags": [ - "locale" - ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountries", - "group": null, - "weight": 51, - "cookies": false, - "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "tags": [ - "locale" - ], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesEU", - "group": null, - "weight": 52, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "tags": [ - "locale" - ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/phoneList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesPhones", - "group": null, - "weight": 53, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "tags": [ - "locale" - ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/currencyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCurrencies", - "group": null, - "weight": 55, - "cookies": false, - "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "tags": [ - "locale" - ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/languageList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, - "weight": 56, - "cookies": false, - "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/messaging\/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "tags": [ - "messaging" - ], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/messageList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessages", - "group": "messages", - "weight": 158, - "cookies": false, - "type": "", - "demo": "messaging\/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "tags": [ - "messaging" - ], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmail", - "group": "messages", - "weight": 155, - "cookies": false, - "type": "", - "demo": "messaging\/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "subject", - "content" - ] - } - } - } - } - } - }, - "\/messaging\/messages\/email\/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "tags": [ - "messaging" - ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "messages", - "weight": 162, - "cookies": false, - "type": "", - "demo": "messaging\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false, - "x-nullable": true - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "tags": [ - "messaging" - ], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPush", - "group": "messages", - "weight": 157, - "cookies": false, - "type": "", - "demo": "messaging\/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "<ID1:ID2>" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "x-example": null, - "format": "int32" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - }, - "required": [ - "messageId" - ] - } - } - } - } - } - }, - "\/messaging\/messages\/push\/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "tags": [ - "messaging" - ], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePush", - "group": "messages", - "weight": 164, - "cookies": false, - "type": "", - "demo": "messaging\/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>", - "x-nullable": true - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>", - "x-nullable": true - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>", - "x-nullable": true - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "<ID1:ID2>", - "x-nullable": true - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "x-example": "<ICON>", - "x-nullable": true - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "x-example": "<SOUND>", - "x-nullable": true - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "x-example": "<COLOR>", - "x-nullable": true - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "x-example": "<TAG>", - "x-nullable": true - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [], - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "tags": [ - "messaging" - ], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSms", - "group": "messages", - "weight": 156, - "cookies": false, - "type": "", - "demo": "messaging\/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - }, - "methods": [ - { - "name": "createSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - } - }, - { - "name": "createSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "content" - ] - } - } - } - } - } - }, - "\/messaging\/messages\/sms\/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "tags": [ - "messaging" - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSms", - "group": "messages", - "weight": 163, - "cookies": false, - "type": "", - "demo": "messaging\/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - }, - "methods": [ - { - "name": "updateSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - } - }, - { - "name": "updateSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "tags": [ - "messaging" - ], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/message" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMessage", - "group": "messages", - "weight": 161, - "cookies": false, - "type": "", - "demo": "messaging\/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "tags": [ - "messaging" - ], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "messages", - "weight": 165, - "cookies": false, - "type": "", - "demo": "messaging\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "tags": [ - "messaging" - ], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessageLogs", - "group": "logs", - "weight": 159, - "cookies": false, - "type": "", - "demo": "messaging\/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "tags": [ - "messaging" - ], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/targetList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "messages", - "weight": 160, - "cookies": false, - "type": "", - "demo": "messaging\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "tags": [ - "messaging" - ], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/providerList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviders", - "group": "providers", - "weight": 129, - "cookies": false, - "type": "", - "demo": "messaging\/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/providers\/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createApnsProvider", - "group": "providers", - "weight": 128, - "cookies": false, - "type": "", - "demo": "messaging\/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - }, - "methods": [ - { - "name": "createApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - } - }, - { - "name": "createAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/apns\/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "tags": [ - "messaging" - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateApnsProvider", - "group": "providers", - "weight": 142, - "cookies": false, - "type": "", - "demo": "messaging\/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - }, - "methods": [ - { - "name": "updateApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - } - }, - { - "name": "updateAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFcmProvider", - "group": "providers", - "weight": 127, - "cookies": false, - "type": "", - "demo": "messaging\/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - }, - "methods": [ - { - "name": "createFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - } - }, - { - "name": "createFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "x-example": "{}", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/fcm\/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "tags": [ - "messaging" - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFcmProvider", - "group": "providers", - "weight": 141, - "cookies": false, - "type": "", - "demo": "messaging\/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - }, - "methods": [ - { - "name": "updateFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - } - }, - { - "name": "updateFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "x-example": "{}", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMailgunProvider", - "group": "providers", - "weight": 118, - "cookies": false, - "type": "", - "demo": "messaging\/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/mailgun\/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "tags": [ - "messaging" - ], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMailgunProvider", - "group": "providers", - "weight": 132, - "cookies": false, - "type": "", - "demo": "messaging\/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "tags": [ - "messaging" - ], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", - "weight": 122, - "cookies": false, - "type": "", - "demo": "messaging\/create-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/msg91\/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "tags": [ - "messaging" - ], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", - "weight": 136, - "cookies": false, - "type": "", - "demo": "messaging\/update-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "x-example": "<AUTH_KEY>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/resend": { - "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Resend provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createResendProvider", - "group": "providers", - "weight": 120, - "cookies": false, - "type": "", - "demo": "messaging\/create-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/resend\/{providerId}": { - "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", - "tags": [ - "messaging" - ], - "description": "Update a Resend provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateResendProvider", - "group": "providers", - "weight": 134, - "cookies": false, - "type": "", - "demo": "messaging\/update-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSendgridProvider", - "group": "providers", - "weight": 119, - "cookies": false, - "type": "", - "demo": "messaging\/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/sendgrid\/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "tags": [ - "messaging" - ], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSendgridProvider", - "group": "providers", - "weight": 133, - "cookies": false, - "type": "", - "demo": "messaging\/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "tags": [ - "messaging" - ], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSmtpProvider", - "group": "providers", - "weight": 121, - "cookies": false, - "type": "", - "demo": "messaging\/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - }, - "methods": [ - { - "name": "createSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - } - }, - { - "name": "createSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "x-example": 1, - "format": "int32" - }, - "username": { - "type": "string", - "description": "Authentication username.", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name", - "host" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/smtp\/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "tags": [ - "messaging" - ], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSmtpProvider", - "group": "providers", - "weight": 135, - "cookies": false, - "type": "", - "demo": "messaging\/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - }, - "methods": [ - { - "name": "updateSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - } - }, - { - "name": "updateSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Authentication username.", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false, - "x-nullable": true - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTelesignProvider", - "group": "providers", - "weight": 123, - "cookies": false, - "type": "", - "demo": "messaging\/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/telesign\/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "tags": [ - "messaging" - ], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTelesignProvider", - "group": "providers", - "weight": 137, - "cookies": false, - "type": "", - "demo": "messaging\/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextmagicProvider", - "group": "providers", - "weight": 124, - "cookies": false, - "type": "", - "demo": "messaging\/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/textmagic\/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "tags": [ - "messaging" - ], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextmagicProvider", - "group": "providers", - "weight": 138, - "cookies": false, - "type": "", - "demo": "messaging\/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTwilioProvider", - "group": "providers", - "weight": 125, - "cookies": false, - "type": "", - "demo": "messaging\/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/twilio\/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "tags": [ - "messaging" - ], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTwilioProvider", - "group": "providers", - "weight": 139, - "cookies": false, - "type": "", - "demo": "messaging\/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "tags": [ - "messaging" - ], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVonageProvider", - "group": "providers", - "weight": 126, - "cookies": false, - "type": "", - "demo": "messaging\/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/providers\/vonage\/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "tags": [ - "messaging" - ], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVonageProvider", - "group": "providers", - "weight": 140, - "cookies": false, - "type": "", - "demo": "messaging\/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "tags": [ - "messaging" - ], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getProvider", - "group": "providers", - "weight": 131, - "cookies": false, - "type": "", - "demo": "messaging\/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "tags": [ - "messaging" - ], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteProvider", - "group": "providers", - "weight": 143, - "cookies": false, - "type": "", - "demo": "messaging\/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/providers\/{providerId}\/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "tags": [ - "messaging" - ], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviderLogs", - "group": "providers", - "weight": 130, - "cookies": false, - "type": "", - "demo": "messaging\/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/subscribers\/{subscriberId}\/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "tags": [ - "messaging" - ], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscriberLogs", - "group": "subscribers", - "weight": 152, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "tags": [ - "messaging" - ], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topicList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopics", - "group": "topics", - "weight": 145, - "cookies": false, - "type": "", - "demo": "messaging\/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "tags": [ - "messaging" - ], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topic" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTopic", - "group": "topics", - "weight": 144, - "cookies": false, - "type": "", - "demo": "messaging\/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "<TOPIC_ID>" - }, - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": [ - "topicId", - "name" - ] - } - } - } - } - } - }, - "\/messaging\/topics\/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "tags": [ - "messaging" - ], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topic" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTopic", - "group": "topics", - "weight": 147, - "cookies": false, - "type": "", - "demo": "messaging\/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "tags": [ - "messaging" - ], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/topic" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTopic", - "group": "topics", - "weight": 148, - "cookies": false, - "type": "", - "demo": "messaging\/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>", - "x-nullable": true - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "tags": [ - "messaging" - ], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTopic", - "group": "topics", - "weight": 149, - "cookies": false, - "type": "", - "demo": "messaging\/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "tags": [ - "messaging" - ], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", - "weight": 146, - "cookies": false, - "type": "", - "demo": "messaging\/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "tags": [ - "messaging" - ], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriberList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", - "weight": 151, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "tags": [ - "messaging" - ], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", - "weight": 150, - "cookies": false, - "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "<TARGET_ID>" - } - }, - "required": [ - "subscriberId", - "targetId" - ] - } - } - } - } - } - }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "tags": [ - "messaging" - ], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", - "weight": 153, - "cookies": false, - "type": "", - "demo": "messaging\/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "weight": 154, - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesListPresences", - "tags": [ - "presences" - ], - "description": "List presence logs.", - "responses": { - "200": { - "description": "Presences List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presenceList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPresences", - "group": "presences", - "weight": 416, - "cookies": false, - "type": "", - "demo": "presences\/list-presences.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGetPresence", - "tags": [ - "presences" - ], - "description": "Get a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPresence", - "group": "presences", - "weight": 415, - "cookies": false, - "type": "", - "demo": "presences\/get-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsertPresence", - "tags": [ - "presences" - ], - "description": "Create or update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertPresence", - "group": "presences", - "weight": 413, - "cookies": false, - "type": "", - "demo": "presences\/upsert-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "upsertPresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "userId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "", - "demo": "presences\/upsert-presence.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "x-example": "{}" - } - }, - "required": [ - "status" - ] - } - } - } - } - }, - "patch": { - "summary": "Update presence", - "operationId": "presencesUpdatePresence", - "tags": [ - "presences" - ], - "description": "Update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/presence" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePresence", - "group": "presences", - "weight": 417, - "cookies": false, - "type": "", - "demo": "presences\/update-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "updatePresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "expiresAt", - "metadata", - "permissions" - ], - "required": [ - "presenceId", - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "", - "demo": "presences\/update-presence.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>", - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "x-example": "{}", - "x-nullable": true - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDeletePresence", - "tags": [ - "presences" - ], - "description": "Delete a presence log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePresence", - "group": "presences", - "weight": 418, - "cookies": false, - "type": "", - "demo": "presences\/delete-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/project": { - "delete": { - "summary": "Delete project", - "operationId": "projectDelete", - "tags": [ - "project" - ], - "description": "Delete a project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 594, - "cookies": false, - "type": "", - "demo": "project\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/auth-methods\/{methodId}": { - "patch": { - "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", - "operationId": "projectUpdateAuthMethod", - "tags": [ - "project" - ], - "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAuthMethod", - "group": null, - "weight": 643, - "cookies": false, - "type": "", - "demo": "project\/update-auth-method.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "methodId", - "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", - "required": true, - "schema": { - "type": "string", - "x-example": "email-password", - "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Auth method status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/keys": { - "get": { - "summary": "List project keys", - "operationId": "projectListKeys", - "tags": [ - "project" - ], - "description": "Get a list of all API keys from the current project.", - "responses": { - "200": { - "description": "API Keys List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/keyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listKeys", - "group": "keys", - "weight": 610, - "cookies": false, - "type": "", - "demo": "project\/list-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project key", - "operationId": "projectCreateKey", - "tags": [ - "project" - ], - "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", - "responses": { - "201": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createKey", - "group": "keys", - "weight": 608, - "cookies": false, - "type": "", - "demo": "project\/create-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<KEY_ID>" - }, - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "keyId", - "name", - "scopes" - ] - } - } - } - } - } - }, - "\/project\/keys\/ephemeral": { - "post": { - "summary": "Create ephemeral project key", - "operationId": "projectCreateEphemeralKey", - "tags": [ - "project" - ], - "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", - "responses": { - "201": { - "description": "Ephemeral Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/ephemeralKey" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEphemeralKey", - "group": "keys", - "weight": 609, - "cookies": false, - "type": "", - "demo": "project\/create-ephemeral-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "duration": { - "type": "integer", - "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", - "x-example": 1, - "format": "int32" - } - }, - "required": [ - "scopes", - "duration" - ] - } - } - } - } - } - }, - "\/project\/keys\/{keyId}": { - "get": { - "summary": "Get project key", - "operationId": "projectGetKey", - "tags": [ - "project" - ], - "description": "Get a key by its unique ID. ", - "responses": { - "200": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getKey", - "group": "keys", - "weight": 611, - "cookies": false, - "type": "", - "demo": "project\/get-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update project key", - "operationId": "projectUpdateKey", - "tags": [ - "project" - ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", - "responses": { - "200": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateKey", - "group": "keys", - "weight": 613, - "cookies": false, - "type": "", - "demo": "project\/update-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "name", - "scopes" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete project key", - "operationId": "projectDeleteKey", - "tags": [ - "project" - ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteKey", - "group": "keys", - "weight": 612, - "cookies": false, - "type": "", - "demo": "project\/delete-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/project\/labels": { - "put": { - "summary": "Update project labels", - "operationId": "projectUpdateLabels", - "tags": [ - "project" - ], - "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": null, - "weight": 595, - "cookies": false, - "type": "", - "demo": "project\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - } - } - } - }, - "\/project\/mock-phones": { - "get": { - "summary": "List project mock phones", - "operationId": "projectListMockPhones", - "tags": [ - "project" - ], - "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", - "responses": { - "200": { - "description": "Mock Numbers List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumberList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMockPhones", - "group": "mocks", - "weight": 628, - "cookies": false, - "type": "", - "demo": "project\/list-mock-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project mock phone", - "operationId": "projectCreateMockPhone", - "tags": [ - "project" - ], - "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", - "responses": { - "201": { - "description": "Mock Number", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMockPhone", - "group": "mocks", - "weight": 627, - "cookies": false, - "type": "", - "demo": "project\/create-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", - "x-example": "+12065550100", - "format": "phone" - }, - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "x-example": "<OTP>" - } - }, - "required": [ - "number", - "otp" - ] - } - } - } - } - } - }, - "\/project\/mock-phones\/{number}": { - "get": { - "summary": "Get project mock phone", - "operationId": "projectGetMockPhone", - "tags": [ - "project" - ], - "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMockPhone", - "group": "mocks", - "weight": 629, - "cookies": false, - "type": "", - "demo": "project\/get-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", - "tags": [ - "project" - ], - "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mockNumber" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMockPhone", - "group": "mocks", - "weight": 630, - "cookies": false, - "type": "", - "demo": "project\/update-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", - "tags": [ - "project" - ], - "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMockPhone", - "group": "mocks", - "weight": 631, - "cookies": false, - "type": "", - "demo": "project\/delete-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ] - } - }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", - "tags": [ - "project" - ], - "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2 Providers List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2ProviderList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listOAuth2Providers", - "group": "oauth2", - "weight": 644, - "cookies": false, - "type": "", - "demo": "project\/list-o-auth-2-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/oauth2\/amazon": { - "patch": { - "summary": "Update project OAuth2 Amazon", - "operationId": "projectUpdateOAuth2Amazon", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Amazon configuration.", - "responses": { - "200": { - "description": "OAuth2Amazon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Amazon", - "group": "oauth2", - "weight": 671, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-amazon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/apple": { - "patch": { - "summary": "Update project OAuth2 Apple", - "operationId": "projectUpdateOAuth2Apple", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Apple configuration.", - "responses": { - "200": { - "description": "OAuth2Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Apple" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Apple", - "group": "oauth2", - "weight": 686, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-apple.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "serviceId": { - "type": "string", - "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", - "x-example": "<SERVICE_ID>", - "x-nullable": true - }, - "keyId": { - "type": "string", - "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", - "x-example": "<KEY_ID>", - "x-nullable": true - }, - "teamId": { - "type": "string", - "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", - "x-example": "<TEAM_ID>", - "x-nullable": true - }, - "p8File": { - "type": "string", - "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", - "x-example": "<P8_FILE>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/auth0": { - "patch": { - "summary": "Update project OAuth2 Auth0", - "operationId": "projectUpdateOAuth2Auth0", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Auth0 configuration.", - "responses": { - "200": { - "description": "OAuth2Auth0", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Auth0", - "group": "oauth2", - "weight": 680, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-auth-0.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Auth0 instance. For example: example.us.auth0.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/authentik": { - "patch": { - "summary": "Update project OAuth2 Authentik", - "operationId": "projectUpdateOAuth2Authentik", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Authentik configuration.", - "responses": { - "200": { - "description": "OAuth2Authentik", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Authentik", - "group": "oauth2", - "weight": 679, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-authentik.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Authentik instance. For example: example.authentik.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/autodesk": { - "patch": { - "summary": "Update project OAuth2 Autodesk", - "operationId": "projectUpdateOAuth2Autodesk", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Autodesk configuration.", - "responses": { - "200": { - "description": "OAuth2Autodesk", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Autodesk", - "group": "oauth2", - "weight": 654, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-autodesk.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/bitbucket": { - "patch": { - "summary": "Update project OAuth2 Bitbucket", - "operationId": "projectUpdateOAuth2Bitbucket", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitbucket configuration.", - "responses": { - "200": { - "description": "OAuth2Bitbucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitbucket", - "group": "oauth2", - "weight": 651, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitbucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", - "x-example": "<KEY>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", - "x-example": "<SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/bitly": { - "patch": { - "summary": "Update project OAuth2 Bitly", - "operationId": "projectUpdateOAuth2Bitly", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitly configuration.", - "responses": { - "200": { - "description": "OAuth2Bitly", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitly", - "group": "oauth2", - "weight": 652, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitly.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/box": { - "patch": { - "summary": "Update project OAuth2 Box", - "operationId": "projectUpdateOAuth2Box", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Box configuration.", - "responses": { - "200": { - "description": "OAuth2Box", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Box" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Box", - "group": "oauth2", - "weight": 653, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-box.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/dailymotion": { - "patch": { - "summary": "Update project OAuth2 Dailymotion", - "operationId": "projectUpdateOAuth2Dailymotion", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dailymotion configuration.", - "responses": { - "200": { - "description": "OAuth2Dailymotion", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dailymotion", - "group": "oauth2", - "weight": 650, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dailymotion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", - "x-example": "<API_KEY>", - "x-nullable": true - }, - "apiSecret": { - "type": "string", - "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", - "x-example": "<API_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/discord": { - "patch": { - "summary": "Update project OAuth2 Discord", - "operationId": "projectUpdateOAuth2Discord", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Discord configuration.", - "responses": { - "200": { - "description": "OAuth2Discord", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Discord" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Discord", - "group": "oauth2", - "weight": 647, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-discord.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/disqus": { - "patch": { - "summary": "Update project OAuth2 Disqus", - "operationId": "projectUpdateOAuth2Disqus", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Disqus configuration.", - "responses": { - "200": { - "description": "OAuth2Disqus", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Disqus", - "group": "oauth2", - "weight": 670, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-disqus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "publicKey": { - "type": "string", - "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "x-example": "<PUBLIC_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/dropbox": { - "patch": { - "summary": "Update project OAuth2 Dropbox", - "operationId": "projectUpdateOAuth2Dropbox", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dropbox configuration.", - "responses": { - "200": { - "description": "OAuth2Dropbox", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dropbox", - "group": "oauth2", - "weight": 649, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dropbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "appKey": { - "type": "string", - "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", - "x-example": "<APP_KEY>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/etsy": { - "patch": { - "summary": "Update project OAuth2 Etsy", - "operationId": "projectUpdateOAuth2Etsy", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Etsy configuration.", - "responses": { - "200": { - "description": "OAuth2Etsy", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Etsy", - "group": "oauth2", - "weight": 672, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-etsy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyString": { - "type": "string", - "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", - "x-example": "<KEY_STRING>", - "x-nullable": true - }, - "sharedSecret": { - "type": "string", - "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", - "x-example": "<SHARED_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/facebook": { - "patch": { - "summary": "Update project OAuth2 Facebook", - "operationId": "projectUpdateOAuth2Facebook", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Facebook configuration.", - "responses": { - "200": { - "description": "OAuth2Facebook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Facebook", - "group": "oauth2", - "weight": 673, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-facebook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "appId": { - "type": "string", - "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", - "x-example": "<APP_ID>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/figma": { - "patch": { - "summary": "Update project OAuth2 Figma", - "operationId": "projectUpdateOAuth2Figma", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Figma configuration.", - "responses": { - "200": { - "description": "OAuth2Figma", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Figma" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Figma", - "group": "oauth2", - "weight": 648, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-figma.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/fusionauth": { - "patch": { - "summary": "Update project OAuth2 FusionAuth", - "operationId": "projectUpdateOAuth2FusionAuth", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 FusionAuth configuration.", - "responses": { - "200": { - "description": "OAuth2FusionAuth", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2FusionAuth", - "group": "oauth2", - "weight": 681, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-fusion-auth.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/github": { - "patch": { - "summary": "Update project OAuth2 GitHub", - "operationId": "projectUpdateOAuth2GitHub", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 GitHub configuration.", - "responses": { - "200": { - "description": "OAuth2GitHub", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Github" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2GitHub", - "group": "oauth2", - "weight": 646, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-git-hub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/gitlab": { - "patch": { - "summary": "Update project OAuth2 Gitlab", - "operationId": "projectUpdateOAuth2Gitlab", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Gitlab configuration.", - "responses": { - "200": { - "description": "OAuth2Gitlab", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Gitlab", - "group": "oauth2", - "weight": 678, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-gitlab.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "x-example": "<SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/google": { - "patch": { - "summary": "Update project OAuth2 Google", - "operationId": "projectUpdateOAuth2Google", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Google configuration.", - "responses": { - "200": { - "description": "OAuth2Google", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Google" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Google", - "group": "oauth2", - "weight": 655, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-google.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/keycloak": { - "patch": { - "summary": "Update project OAuth2 Keycloak", - "operationId": "projectUpdateOAuth2Keycloak", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Keycloak configuration.", - "responses": { - "200": { - "description": "OAuth2Keycloak", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Keycloak", - "group": "oauth2", - "weight": 682, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-keycloak.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Keycloak instance. For example: keycloak.example.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "realmName": { - "type": "string", - "description": "Keycloak realm name. For example: appwrite-realm", - "x-example": "<REALM_NAME>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/kick": { - "patch": { - "summary": "Update project OAuth2 Kick", - "operationId": "projectUpdateOAuth2Kick", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Kick configuration.", - "responses": { - "200": { - "description": "OAuth2Kick", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Kick" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Kick", - "group": "oauth2", - "weight": 685, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-kick.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/linkedin": { - "patch": { - "summary": "Update project OAuth2 Linkedin", - "operationId": "projectUpdateOAuth2Linkedin", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Linkedin configuration.", - "responses": { - "200": { - "description": "OAuth2Linkedin", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Linkedin", - "group": "oauth2", - "weight": 669, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-linkedin.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "primaryClientSecret": { - "type": "string", - "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", - "x-example": "<PRIMARY_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/microsoft": { - "patch": { - "summary": "Update project OAuth2 Microsoft", - "operationId": "projectUpdateOAuth2Microsoft", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Microsoft configuration.", - "responses": { - "200": { - "description": "OAuth2Microsoft", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Microsoft", - "group": "oauth2", - "weight": 687, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-microsoft.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "applicationSecret": { - "type": "string", - "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "x-example": "<APPLICATION_SECRET>", - "x-nullable": true - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", - "x-example": "<TENANT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/notion": { - "patch": { - "summary": "Update project OAuth2 Notion", - "operationId": "projectUpdateOAuth2Notion", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Notion configuration.", - "responses": { - "200": { - "description": "OAuth2Notion", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Notion" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Notion", - "group": "oauth2", - "weight": 666, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-notion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "oauthClientId": { - "type": "string", - "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", - "x-example": "<OAUTH_CLIENT_ID>", - "x-nullable": true - }, - "oauthClientSecret": { - "type": "string", - "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", - "x-example": "<OAUTH_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/oidc": { - "patch": { - "summary": "Update project OAuth2 Oidc", - "operationId": "projectUpdateOAuth2Oidc", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Oidc configuration.", - "responses": { - "200": { - "description": "OAuth2Oidc", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Oidc", - "group": "oauth2", - "weight": 683, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-oidc.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/okta": { - "patch": { - "summary": "Update project OAuth2 Okta", - "operationId": "projectUpdateOAuth2Okta", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Okta configuration.", - "responses": { - "200": { - "description": "OAuth2Okta", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Okta" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Okta", - "group": "oauth2", - "weight": 684, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-okta.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "domain": { - "type": "string", - "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", - "x-example": null, - "x-nullable": true - }, - "authorizationServerId": { - "type": "string", - "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", - "x-example": "<AUTHORIZATION_SERVER_ID>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/paypal": { - "patch": { - "summary": "Update project OAuth2 Paypal", - "operationId": "projectUpdateOAuth2Paypal", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Paypal configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Paypal", - "group": "oauth2", - "weight": 676, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/paypalSandbox": { - "patch": { - "summary": "Update project OAuth2 PaypalSandbox", - "operationId": "projectUpdateOAuth2PaypalSandbox", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 PaypalSandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2PaypalSandbox", - "group": "oauth2", - "weight": 677, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/podio": { - "patch": { - "summary": "Update project OAuth2 Podio", - "operationId": "projectUpdateOAuth2Podio", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Podio configuration.", - "responses": { - "200": { - "description": "OAuth2Podio", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Podio" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Podio", - "group": "oauth2", - "weight": 665, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-podio.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/salesforce": { - "patch": { - "summary": "Update project OAuth2 Salesforce", - "operationId": "projectUpdateOAuth2Salesforce", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Salesforce configuration.", - "responses": { - "200": { - "description": "OAuth2Salesforce", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Salesforce", - "group": "oauth2", - "weight": 667, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-salesforce.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "customerSecret": { - "type": "string", - "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", - "x-example": "<CUSTOMER_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/slack": { - "patch": { - "summary": "Update project OAuth2 Slack", - "operationId": "projectUpdateOAuth2Slack", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Slack configuration.", - "responses": { - "200": { - "description": "OAuth2Slack", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Slack" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Slack", - "group": "oauth2", - "weight": 664, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-slack.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/spotify": { - "patch": { - "summary": "Update project OAuth2 Spotify", - "operationId": "projectUpdateOAuth2Spotify", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Spotify configuration.", - "responses": { - "200": { - "description": "OAuth2Spotify", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Spotify", - "group": "oauth2", - "weight": 663, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-spotify.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/stripe": { - "patch": { - "summary": "Update project OAuth2 Stripe", - "operationId": "projectUpdateOAuth2Stripe", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Stripe configuration.", - "responses": { - "200": { - "description": "OAuth2Stripe", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Stripe", - "group": "oauth2", - "weight": 662, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-stripe.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "apiSecretKey": { - "type": "string", - "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", - "x-example": "<API_SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/tradeshift": { - "patch": { - "summary": "Update project OAuth2 Tradeshift", - "operationId": "projectUpdateOAuth2Tradeshift", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Tradeshift", - "group": "oauth2", - "weight": 674, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/tradeshiftBox": { - "patch": { - "summary": "Update project OAuth2 Tradeshift Sandbox", - "operationId": "projectUpdateOAuth2TradeshiftSandbox", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2TradeshiftSandbox", - "group": "oauth2", - "weight": 675, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/twitch": { - "patch": { - "summary": "Update project OAuth2 Twitch", - "operationId": "projectUpdateOAuth2Twitch", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Twitch configuration.", - "responses": { - "200": { - "description": "OAuth2Twitch", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Twitch", - "group": "oauth2", - "weight": 661, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-twitch.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/wordpress": { - "patch": { - "summary": "Update project OAuth2 WordPress", - "operationId": "projectUpdateOAuth2WordPress", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 WordPress configuration.", - "responses": { - "200": { - "description": "OAuth2WordPress", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2WordPress", - "group": "oauth2", - "weight": 660, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-word-press.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/x": { - "patch": { - "summary": "Update project OAuth2 X", - "operationId": "projectUpdateOAuth2X", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 X configuration.", - "responses": { - "200": { - "description": "OAuth2X", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2X" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2X", - "group": "oauth2", - "weight": 659, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2x.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/yahoo": { - "patch": { - "summary": "Update project OAuth2 Yahoo", - "operationId": "projectUpdateOAuth2Yahoo", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yahoo configuration.", - "responses": { - "200": { - "description": "OAuth2Yahoo", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yahoo", - "group": "oauth2", - "weight": 668, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yahoo.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/yandex": { - "patch": { - "summary": "Update project OAuth2 Yandex", - "operationId": "projectUpdateOAuth2Yandex", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yandex configuration.", - "responses": { - "200": { - "description": "OAuth2Yandex", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yandex", - "group": "oauth2", - "weight": 658, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yandex.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/zoho": { - "patch": { - "summary": "Update project OAuth2 Zoho", - "operationId": "projectUpdateOAuth2Zoho", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoho configuration.", - "responses": { - "200": { - "description": "OAuth2Zoho", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoho", - "group": "oauth2", - "weight": 657, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoho.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/zoom": { - "patch": { - "summary": "Update project OAuth2 Zoom", - "operationId": "projectUpdateOAuth2Zoom", - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoom configuration.", - "responses": { - "200": { - "description": "OAuth2Zoom", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoom", - "group": "oauth2", - "weight": 656, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoom.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/oauth2\/{provider}": { - "get": { - "summary": "Get project OAuth2 provider", - "operationId": "projectGetOAuth2Provider", - "tags": [ - "project" - ], - "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/oAuth2Github" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Discord" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Figma" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Box" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Google" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - }, - { - "$ref": "#\/components\/schemas\/oAuth2X" - }, - { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Slack" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Podio" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Notion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - }, - { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Apple" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Okta" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Kick" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/components\/schemas\/oAuth2Github", - "discord": "#\/components\/schemas\/oAuth2Discord", - "figma": "#\/components\/schemas\/oAuth2Figma", - "dropbox": "#\/components\/schemas\/oAuth2Dropbox", - "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", - "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", - "bitly": "#\/components\/schemas\/oAuth2Bitly", - "box": "#\/components\/schemas\/oAuth2Box", - "autodesk": "#\/components\/schemas\/oAuth2Autodesk", - "google": "#\/components\/schemas\/oAuth2Google", - "zoom": "#\/components\/schemas\/oAuth2Zoom", - "zoho": "#\/components\/schemas\/oAuth2Zoho", - "yandex": "#\/components\/schemas\/oAuth2Yandex", - "x": "#\/components\/schemas\/oAuth2X", - "wordpress": "#\/components\/schemas\/oAuth2WordPress", - "twitch": "#\/components\/schemas\/oAuth2Twitch", - "stripe": "#\/components\/schemas\/oAuth2Stripe", - "spotify": "#\/components\/schemas\/oAuth2Spotify", - "slack": "#\/components\/schemas\/oAuth2Slack", - "podio": "#\/components\/schemas\/oAuth2Podio", - "notion": "#\/components\/schemas\/oAuth2Notion", - "salesforce": "#\/components\/schemas\/oAuth2Salesforce", - "yahoo": "#\/components\/schemas\/oAuth2Yahoo", - "linkedin": "#\/components\/schemas\/oAuth2Linkedin", - "disqus": "#\/components\/schemas\/oAuth2Disqus", - "amazon": "#\/components\/schemas\/oAuth2Amazon", - "etsy": "#\/components\/schemas\/oAuth2Etsy", - "facebook": "#\/components\/schemas\/oAuth2Facebook", - "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", - "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", - "paypal": "#\/components\/schemas\/oAuth2Paypal", - "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", - "gitlab": "#\/components\/schemas\/oAuth2Gitlab", - "authentik": "#\/components\/schemas\/oAuth2Authentik", - "auth0": "#\/components\/schemas\/oAuth2Auth0", - "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", - "keycloak": "#\/components\/schemas\/oAuth2Keycloak", - "oidc": "#\/components\/schemas\/oAuth2Oidc", - "apple": "#\/components\/schemas\/oAuth2Apple", - "okta": "#\/components\/schemas\/oAuth2Okta", - "kick": "#\/components\/schemas\/oAuth2Kick", - "microsoft": "#\/components\/schemas\/oAuth2Microsoft" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getOAuth2Provider", - "group": "oauth2", - "weight": 645, - "cookies": false, - "type": "", - "demo": "project\/get-o-auth-2-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 provider key. For example: github, google, apple.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER>" - }, - "in": "path" - } - ] - } - }, - "\/project\/platforms": { - "get": { - "summary": "List project platforms", - "operationId": "projectListPlatforms", - "tags": [ - "project" - ], - "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", - "responses": { - "200": { - "description": "Platforms List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPlatforms", - "group": "platforms", - "weight": 626, - "cookies": false, - "type": "", - "demo": "project\/list-platforms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/project\/platforms\/android": { - "post": { - "summary": "Create project Android platform", - "operationId": "projectCreateAndroidPlatform", - "tags": [ - "project" - ], - "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Android", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformAndroid" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAndroidPlatform", - "group": "platforms", - "weight": 622, - "cookies": false, - "type": "", - "demo": "project\/create-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "platformId", - "name", - "applicationId" - ] - } - } - } - } - } - }, - "\/project\/platforms\/android\/{platformId}": { - "put": { - "summary": "Update project Android platform", - "operationId": "projectUpdateAndroidPlatform", - "tags": [ - "project" - ], - "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", - "responses": { - "200": { - "description": "Platform Android", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformAndroid" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAndroidPlatform", - "group": "platforms", - "weight": 617, - "cookies": false, - "type": "", - "demo": "project\/update-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "name", - "applicationId" - ] - } - } - } - } - } - }, - "\/project\/platforms\/apple": { - "post": { - "summary": "Create project Apple platform", - "operationId": "projectCreateApplePlatform", - "tags": [ - "project" - ], - "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformApple" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createApplePlatform", - "group": "platforms", - "weight": 621, - "cookies": false, - "type": "", - "demo": "project\/create-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "platformId", - "name", - "bundleIdentifier" - ] - } - } - } - } - } - }, - "\/project\/platforms\/apple\/{platformId}": { - "put": { - "summary": "Update project Apple platform", - "operationId": "projectUpdateApplePlatform", - "tags": [ - "project" - ], - "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", - "responses": { - "200": { - "description": "Platform Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformApple" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateApplePlatform", - "group": "platforms", - "weight": 616, - "cookies": false, - "type": "", - "demo": "project\/update-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "name", - "bundleIdentifier" - ] - } - } - } - } - } - }, - "\/project\/platforms\/linux": { - "post": { - "summary": "Create project Linux platform", - "operationId": "projectCreateLinuxPlatform", - "tags": [ - "project" - ], - "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Linux", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformLinux" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLinuxPlatform", - "group": "platforms", - "weight": 624, - "cookies": false, - "type": "", - "demo": "project\/create-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/linux\/{platformId}": { - "put": { - "summary": "Update project Linux platform", - "operationId": "projectUpdateLinuxPlatform", - "tags": [ - "project" - ], - "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", - "responses": { - "200": { - "description": "Platform Linux", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformLinux" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLinuxPlatform", - "group": "platforms", - "weight": 619, - "cookies": false, - "type": "", - "demo": "project\/update-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "name", - "packageName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/web": { - "post": { - "summary": "Create project web platform", - "operationId": "projectCreateWebPlatform", - "tags": [ - "project" - ], - "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Web", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWeb" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWebPlatform", - "group": "platforms", - "weight": 620, - "cookies": false, - "type": "", - "demo": "project\/create-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "x-example": "app.example.com" - } - }, - "required": [ - "platformId", - "name", - "hostname" - ] - } - } - } - } - } - }, - "\/project\/platforms\/web\/{platformId}": { - "put": { - "summary": "Update project web platform", - "operationId": "projectUpdateWebPlatform", - "tags": [ - "project" - ], - "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", - "responses": { - "200": { - "description": "Platform Web", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWeb" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWebPlatform", - "group": "platforms", - "weight": 615, - "cookies": false, - "type": "", - "demo": "project\/update-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "x-example": "app.example.com" - } - }, - "required": [ - "name", - "hostname" - ] - } - } - } - } - } - }, - "\/project\/platforms\/windows": { - "post": { - "summary": "Create project Windows platform", - "operationId": "projectCreateWindowsPlatform", - "tags": [ - "project" - ], - "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Windows", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWindows" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWindowsPlatform", - "group": "platforms", - "weight": 623, - "cookies": false, - "type": "", - "demo": "project\/create-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageIdentifierName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/windows\/{platformId}": { - "put": { - "summary": "Update project Windows platform", - "operationId": "projectUpdateWindowsPlatform", - "tags": [ - "project" - ], - "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", - "responses": { - "200": { - "description": "Platform Windows", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWindows" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWindowsPlatform", - "group": "platforms", - "weight": 618, - "cookies": false, - "type": "", - "demo": "project\/update-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "name", - "packageIdentifierName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/{platformId}": { - "get": { - "summary": "Get project platform", - "operationId": "projectGetPlatform", - "tags": [ - "project" - ], - "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", - "responses": { - "200": { - "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPlatform", - "group": "platforms", - "weight": 625, - "cookies": false, - "type": "", - "demo": "project\/get-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete project platform", - "operationId": "projectDeletePlatform", - "tags": [ - "project" - ], - "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePlatform", - "group": "platforms", - "weight": 614, - "cookies": false, - "type": "", - "demo": "project\/delete-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ] - } - }, - "\/project\/policies": { - "get": { - "summary": "List project policies", - "operationId": "projectListPolicies", - "tags": [ - "project" - ], - "description": "Get a list of all project policies and their current configuration.", - "responses": { - "200": { - "description": "Policies List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/policyList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPolicies", - "group": "policies", - "weight": 632, - "cookies": false, - "type": "", - "demo": "project\/list-policies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/project\/policies\/membership-privacy": { - "patch": { - "summary": "Update membership privacy policy", - "operationId": "projectUpdateMembershipPrivacyPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipPrivacyPolicy", - "group": "policies", - "weight": 634, - "cookies": false, - "type": "", - "demo": "project\/update-membership-privacy-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "boolean", - "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", - "x-example": false - }, - "userEmail": { - "type": "boolean", - "description": "Set to true if you want make user email visible to all team members, or false to hide it.", - "x-example": false - }, - "userPhone": { - "type": "boolean", - "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", - "x-example": false - }, - "userName": { - "type": "boolean", - "description": "Set to true if you want make user name visible to all team members, or false to hide it.", - "x-example": false - }, - "userMFA": { - "type": "boolean", - "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", - "x-example": false - } - } - } - } - } - } - } - }, - "\/project\/policies\/password-dictionary": { - "patch": { - "summary": "Update password dictionary policy", - "operationId": "projectUpdatePasswordDictionaryPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordDictionaryPolicy", - "group": "policies", - "weight": 635, - "cookies": false, - "type": "", - "demo": "project\/update-password-dictionary-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/password-history": { - "patch": { - "summary": "Update password history policy", - "operationId": "projectUpdatePasswordHistoryPolicy", - "tags": [ - "project" - ], - "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordHistoryPolicy", - "group": "policies", - "weight": 636, - "cookies": false, - "type": "", - "demo": "project\/update-password-history-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/password-personal-data": { - "patch": { - "summary": "Update password personal data policy", - "operationId": "projectUpdatePasswordPersonalDataPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordPersonalDataPolicy", - "group": "policies", - "weight": 637, - "cookies": false, - "type": "", - "demo": "project\/update-password-personal-data-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-alert": { - "patch": { - "summary": "Update session alert policy", - "operationId": "projectUpdateSessionAlertPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionAlertPolicy", - "group": "policies", - "weight": 638, - "cookies": false, - "type": "", - "demo": "project\/update-session-alert-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-duration": { - "patch": { - "summary": "Update session duration policy", - "operationId": "projectUpdateSessionDurationPolicy", - "tags": [ - "project" - ], - "description": "Update maximum duration how long sessions created within a project should stay active for.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionDurationPolicy", - "group": "policies", - "weight": 639, - "cookies": false, - "type": "", - "demo": "project\/update-session-duration-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "duration" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-invalidation": { - "patch": { - "summary": "Update session invalidation policy", - "operationId": "projectUpdateSessionInvalidationPolicy", - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionInvalidationPolicy", - "group": "policies", - "weight": 640, - "cookies": false, - "type": "", - "demo": "project\/update-session-invalidation-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-limit": { - "patch": { - "summary": "Update session limit policy", - "operationId": "projectUpdateSessionLimitPolicy", - "tags": [ - "project" - ], - "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionLimitPolicy", - "group": "policies", - "weight": 641, - "cookies": false, - "type": "", - "demo": "project\/update-session-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/user-limit": { - "patch": { - "summary": "Update user limit policy", - "operationId": "projectUpdateUserLimitPolicy", - "tags": [ - "project" - ], - "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUserLimitPolicy", - "group": "policies", - "weight": 642, - "cookies": false, - "type": "", - "demo": "project\/update-user-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/{policyId}": { - "get": { - "summary": "Get project policy", - "operationId": "projectGetPolicy", - "tags": [ - "project" - ], - "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", - "responses": { - "200": { - "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/policyPasswordDictionary" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordHistory" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordPersonalData" - }, - { - "$ref": "#\/components\/schemas\/policySessionAlert" - }, - { - "$ref": "#\/components\/schemas\/policySessionDuration" - }, - { - "$ref": "#\/components\/schemas\/policySessionInvalidation" - }, - { - "$ref": "#\/components\/schemas\/policySessionLimit" - }, - { - "$ref": "#\/components\/schemas\/policyUserLimit" - }, - { - "$ref": "#\/components\/schemas\/policyMembershipPrivacy" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", - "password-history": "#\/components\/schemas\/policyPasswordHistory", - "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", - "session-alert": "#\/components\/schemas\/policySessionAlert", - "session-duration": "#\/components\/schemas\/policySessionDuration", - "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", - "session-limit": "#\/components\/schemas\/policySessionLimit", - "user-limit": "#\/components\/schemas\/policyUserLimit", - "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPolicy", - "group": "policies", - "weight": 633, - "cookies": false, - "type": "", - "demo": "project\/get-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", - "required": true, - "schema": { - "type": "string", - "x-example": "password-dictionary", - "enum": [ - "password-dictionary", - "password-history", - "password-personal-data", - "session-alert", - "session-duration", - "session-invalidation", - "session-limit", - "user-limit", - "membership-privacy" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/project\/protocols\/{protocolId}": { - "patch": { - "summary": "Update project protocol", - "operationId": "projectUpdateProtocol", - "tags": [ - "project" - ], - "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateProtocol", - "group": null, - "weight": 596, - "cookies": false, - "type": "", - "demo": "project\/update-protocol.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "protocolId", - "description": "Protocol name. Can be one of: rest, graphql, websocket", - "required": true, - "schema": { - "type": "string", - "x-example": "rest", - "enum": [ - "rest", - "graphql", - "websocket" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Protocol status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/services\/{serviceId}": { - "patch": { - "summary": "Update project service", - "operationId": "projectUpdateService", - "tags": [ - "project" - ], - "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateService", - "group": null, - "weight": 597, - "cookies": false, - "type": "", - "demo": "project\/update-service.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "serviceId", - "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", - "required": true, - "schema": { - "type": "string", - "x-example": "account", - "enum": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Service status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/smtp": { - "patch": { - "summary": "Update project SMTP configuration", - "operationId": "projectUpdateSMTP", - "tags": [ - "project" - ], - "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSMTP", - "group": "smtp", - "weight": 598, - "cookies": false, - "type": "", - "demo": "project\/update-smtp.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "SMTP server hostname (domain)", - "x-example": null, - "x-nullable": true - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "SMTP server username. Leave empty for no authorization.", - "x-example": "<USERNAME>", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", - "x-example": "<PASSWORD>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email address shown in inbox as the sender of the email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name shown in inbox as the sender of the email.", - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Email used when user replies to the email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Name used when user replies to the email.", - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - }, - "secure": { - "type": "string", - "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", - "x-example": "tls", - "enum": [ - "tls", - "ssl" - ], - "x-enum-name": null, - "x-enum-keys": [], - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/smtp\/tests": { - "post": { - "summary": "Create project SMTP test", - "operationId": "projectCreateSMTPTest", - "tags": [ - "project" - ], - "description": "Send a test email to verify SMTP configuration. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSMTPTest", - "group": "smtp", - "weight": 599, - "cookies": false, - "type": "", - "demo": "project\/create-smtp-test.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "emails" - ] - } - } - } - } - } - }, - "\/project\/templates\/email": { - "get": { - "summary": "List project email templates", - "operationId": "projectListEmailTemplates", - "tags": [ - "project" - ], - "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", - "responses": { - "200": { - "description": "Email Templates List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplateList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listEmailTemplates", - "group": "templates", - "weight": 600, - "cookies": false, - "type": "", - "demo": "project\/list-email-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "patch": { - "summary": "Update project email template", - "operationId": "projectUpdateEmailTemplate", - "tags": [ - "project" - ], - "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", - "responses": { - "200": { - "description": "EmailTemplate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailTemplate", - "group": "templates", - "weight": 602, - "cookies": false, - "type": "", - "demo": "project\/update-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [] - }, - "locale": { - "type": "string", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [] - }, - "subject": { - "type": "string", - "description": "Subject of the email template. Can be up to 255 characters.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "message": { - "type": "string", - "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", - "x-example": "<MESSAGE>", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name of the email sender.", - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Reply to name.", - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - } - }, - "required": [ - "templateId" - ] - } - } - } - } - } - }, - "\/project\/templates\/email\/{templateId}": { - "get": { - "summary": "Get project email template", - "operationId": "projectGetEmailTemplate", - "tags": [ - "project" - ], - "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", - "responses": { - "200": { - "description": "EmailTemplate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getEmailTemplate", - "group": "templates", - "weight": 601, - "cookies": false, - "type": "", - "demo": "project\/get-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "required": true, - "schema": { - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [] - }, - "in": "path" - }, - { - "name": "locale", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "required": false, - "schema": { - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/project\/variables": { - "get": { - "summary": "List project variables", - "operationId": "projectListVariables", - "tags": [ - "project" - ], - "description": "Get a list of all project environment variables.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 604, - "cookies": false, - "type": "", - "demo": "project\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project variable", - "operationId": "projectCreateVariable", - "tags": [ - "project" - ], - "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 603, - "cookies": false, - "type": "", - "demo": "project\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<VARIABLE_ID>" - }, - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "x-example": false - } - }, - "required": [ - "variableId", - "key", - "value" - ] - } - } - } - } - } - }, - "\/project\/variables\/{variableId}": { - "get": { - "summary": "Get project variable", - "operationId": "projectGetVariable", - "tags": [ - "project" - ], - "description": "Get a variable by its unique ID. ", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 605, - "cookies": false, - "type": "", - "demo": "project\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update project variable", - "operationId": "projectUpdateVariable", - "tags": [ - "project" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 607, - "cookies": false, - "type": "", - "demo": "project\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>", - "x-nullable": true - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete project variable", - "operationId": "projectDeleteVariable", - "tags": [ - "project" - ], - "description": "Delete a variable by its unique ID. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 606, - "cookies": false, - "type": "", - "demo": "project\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites": { - "get": { - "summary": "List sites", - "operationId": "sitesList", - "tags": [ - "sites" - ], - "description": "Get a list of all the project's sites. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Sites List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/siteList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "sites", - "weight": 476, - "cookies": false, - "type": "", - "demo": "sites\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create site", - "operationId": "sitesCreate", - "tags": [ - "sites" - ], - "description": "Create a new site.", - "responses": { - "201": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "sites", - "weight": 474, - "cookies": false, - "type": "", - "demo": "sites\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "siteId": { - "type": "string", - "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<SITE_ID>" - }, - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "x-example": "<FALLBACK_FILE>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "siteId", - "name", - "framework", - "buildRuntime" - ] - } - } - } - } - } - }, - "\/sites\/frameworks": { - "get": { - "summary": "List frameworks", - "operationId": "sitesListFrameworks", - "tags": [ - "sites" - ], - "description": "Get a list of all frameworks that are currently available on the server instance.", - "responses": { - "200": { - "description": "Frameworks List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/frameworkList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFrameworks", - "group": "frameworks", - "weight": 479, - "cookies": false, - "type": "", - "demo": "sites\/list-frameworks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "sitesListSpecifications", - "tags": [ - "sites" - ], - "description": "List allowed site specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/specificationList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "frameworks", - "weight": 502, - "cookies": false, - "type": "", - "demo": "sites\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/{siteId}": { - "get": { - "summary": "Get site", - "operationId": "sitesGet", - "tags": [ - "sites" - ], - "description": "Get a site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "sites", - "weight": 475, - "cookies": false, - "type": "", - "demo": "sites\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update site", - "operationId": "sitesUpdate", - "tags": [ - "sites" - ], - "description": "Update site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "sites", - "weight": 477, - "cookies": false, - "type": "", - "demo": "sites\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "x-example": "<FALLBACK_FILE>" - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name", - "framework" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete site", - "operationId": "sitesDelete", - "tags": [ - "sites" - ], - "description": "Delete a site by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "sites", - "weight": 478, - "cookies": false, - "type": "", - "demo": "sites\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployment": { - "patch": { - "summary": "Update site's deployment", - "operationId": "sitesUpdateSiteDeployment", - "tags": [ - "sites" - ], - "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", - "responses": { - "200": { - "description": "Site", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/site" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSiteDeployment", - "group": "sites", - "weight": 485, - "cookies": false, - "type": "", - "demo": "sites\/update-site-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "sitesListDeployments", - "tags": [ - "sites" - ], - "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deploymentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 484, - "cookies": false, - "type": "", - "demo": "sites\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "sitesCreateDeployment", - "tags": [ - "sites" - ], - "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 480, - "cookies": false, - "type": "upload", - "demo": "sites\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "installCommand": { - "type": "string", - "description": "Install Commands.", - "x-example": "<INSTALL_COMMAND>", - "x-nullable": true - }, - "buildCommand": { - "type": "string", - "description": "Build Commands.", - "x-example": "<BUILD_COMMAND>", - "x-nullable": true - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory.", - "x-example": "<OUTPUT_DIRECTORY>", - "x-nullable": true - }, - "code": { - "type": "string", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "x-example": null, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "code" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "sitesCreateDuplicateDeployment", - "tags": [ - "sites" - ], - "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 488, - "cookies": false, - "type": "", - "demo": "sites\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "sitesCreateTemplateDeployment", - "tags": [ - "sites" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 481, - "cookies": false, - "type": "", - "demo": "sites\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to site code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "sitesCreateVcsDeployment", - "tags": [ - "sites" - ], - "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 482, - "cookies": false, - "type": "", - "demo": "sites\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "sitesGetDeployment", - "tags": [ - "sites" - ], - "description": "Get a site deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 483, - "cookies": false, - "type": "", - "demo": "sites\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "sitesDeleteDeployment", - "tags": [ - "sites" - ], - "description": "Delete a site deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 486, - "cookies": false, - "type": "", - "demo": "sites\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "sitesGetDeploymentDownload", - "tags": [ - "sites" - ], - "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 487, - "cookies": false, - "type": "location", - "demo": "sites\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source" - }, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "sitesUpdateDeploymentStatus", - "tags": [ - "sites" - ], - "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 489, - "cookies": false, - "type": "", - "demo": "sites\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/logs": { - "get": { - "summary": "List logs", - "operationId": "sitesListLogs", - "tags": [ - "sites" - ], - "description": "Get a list of all site logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/executionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 491, - "cookies": false, - "type": "", - "demo": "sites\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/logs\/{logId}": { - "get": { - "summary": "Get log", - "operationId": "sitesGetLog", - "tags": [ - "sites" - ], - "description": "Get a site request log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getLog", - "group": "logs", - "weight": 490, - "cookies": false, - "type": "", - "demo": "sites\/get-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<LOG_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete log", - "operationId": "sitesDeleteLog", - "tags": [ - "sites" - ], - "description": "Delete a site log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteLog", - "group": "logs", - "weight": 492, - "cookies": false, - "type": "", - "demo": "sites\/delete-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<LOG_ID>" - }, - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "sitesListVariables", - "tags": [ - "sites" - ], - "description": "Get a list of all variables of a specific site.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 495, - "cookies": false, - "type": "", - "demo": "sites\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "sitesCreateVariable", - "tags": [ - "sites" - ], - "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", - "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 493, - "cookies": false, - "type": "", - "demo": "sites\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "sitesGetVariable", - "tags": [ - "sites" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 494, - "cookies": false, - "type": "", - "demo": "sites\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "sitesUpdateVariable", - "tags": [ - "sites" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 496, - "cookies": false, - "type": "", - "demo": "sites\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete variable", - "operationId": "sitesDeleteVariable", - "tags": [ - "sites" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 497, - "cookies": false, - "type": "", - "demo": "sites\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<VARIABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", - "tags": [ - "storage" - ], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Buckets List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucketList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listBuckets", - "group": "buckets", - "weight": 545, - "cookies": false, - "type": "", - "demo": "storage\/list-buckets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create bucket", - "operationId": "storageCreateBucket", - "tags": [ - "storage" - ], - "description": "Create a new storage bucket.", - "responses": { - "201": { - "description": "Bucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBucket", - "group": "buckets", - "weight": 543, - "cookies": false, - "type": "", - "demo": "storage\/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<BUCKET_ID>" - }, - "name": { - "type": "string", - "description": "Bucket name", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "x-example": false - } - }, - "required": [ - "bucketId", - "name" - ] - } - } - } - } - } - }, - "\/storage\/buckets\/{bucketId}": { - "get": { - "summary": "Get bucket", - "operationId": "storageGetBucket", - "tags": [ - "storage" - ], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucket", - "group": "buckets", - "weight": 544, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update bucket", - "operationId": "storageUpdateBucket", - "tags": [ - "storage" - ], - "description": "Update a storage bucket by its unique ID.", - "responses": { - "200": { - "description": "Bucket", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/bucket" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBucket", - "group": "buckets", - "weight": 546, - "cookies": false, - "type": "", - "demo": "storage\/update-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete bucket", - "operationId": "storageDeleteBucket", - "tags": [ - "storage" - ], - "description": "Delete a storage bucket by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteBucket", - "group": "buckets", - "weight": 547, - "cookies": false, - "type": "", - "demo": "storage\/delete-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", - "tags": [ - "storage" - ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Files List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/fileList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFiles", - "group": "files", - "weight": 550, - "cookies": false, - "type": "", - "demo": "storage\/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", - "tags": [ - "storage" - ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFile", - "group": "files", - "weight": 548, - "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "fileId": { - "type": "string", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<FILE_ID>", - "x-upload-id": true - }, - "file": { - "type": "string", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "x-example": null, - "format": "binary" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - }, - "required": [ - "fileId", - "file" - ] - } - } - } - } - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "Get file", - "operationId": "storageGetFile", - "tags": [ - "storage" - ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFile", - "group": "files", - "weight": 549, - "cookies": false, - "type": "", - "demo": "storage\/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", - "tags": [ - "storage" - ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/file" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFile", - "group": "files", - "weight": 551, - "cookies": false, - "type": "", - "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", - "tags": [ - "storage" - ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "weight": 552, - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { - "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileDownload", - "group": "files", - "weight": 554, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", - "tags": [ - "storage" - ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { - "description": "Image" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFilePreview", - "group": "files", - "weight": 553, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "schema": { - "type": "string", - "x-example": "center", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "default": "center" - }, - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "schema": { - "type": "number", - "format": "float", - "x-example": 0, - "default": 1 - }, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0 - }, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "schema": { - "type": "string", - "default": "" - }, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "" - }, - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileView", - "group": "files", - "weight": 555, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" - } - ] - } - }, - "\/tablesdb": { - "get": { - "summary": "List databases", - "operationId": "tablesDBList", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "tablesdb", - "weight": 265, - "cookies": false, - "type": "", - "demo": "tablesdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "tablesDBCreate", - "tags": [ - "tablesDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "tablesdb", - "weight": 261, - "cookies": false, - "type": "", - "demo": "tablesdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", - "tags": [ - "tablesDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 332, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", - "tags": [ - "tablesDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 328, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", - "tags": [ - "tablesDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 329, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", - "tags": [ - "tablesDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 330, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 331, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", - "tags": [ - "tablesDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 333, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "tablesDBGet", - "tags": [ - "tablesDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tablesdb", - "weight": 262, - "cookies": false, - "type": "", - "demo": "tablesdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "tablesDBUpdate", - "tags": [ - "tablesDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tablesdb", - "weight": 263, - "cookies": false, - "type": "", - "demo": "tablesdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "tablesDBDelete", - "tags": [ - "tablesDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tablesdb", - "weight": 264, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables": { - "get": { - "summary": "List tables", - "operationId": "tablesDBListTables", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": "tables", - "weight": 272, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "tablesDBCreateTable", - "tags": [ - "tablesDB" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": "tables", - "weight": 268, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TABLE_ID>" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - }, - "columns": { - "type": "array", - "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "tableId", - "name" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "tablesDBGetTable", - "tags": [ - "tablesDB" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": "tables", - "weight": 269, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "tablesDBUpdateTable", - "tags": [ - "tablesDB" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": "tables", - "weight": 270, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete table", - "operationId": "tablesDBDeleteTable", - "tags": [ - "tablesDB" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": "tables", - "weight": 271, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "tablesDBListColumns", - "tags": [ - "tablesDB" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 277, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "tablesDBCreateBooleanColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 278, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "tablesDBUpdateBooleanColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 279, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "tablesDBCreateDatetimeColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 280, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "tablesDBUpdateDatetimeColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 281, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "tablesDBCreateEmailColumn", - "tags": [ - "tablesDB" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 282, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "tablesDBUpdateEmailColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 283, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "tablesDBCreateEnumColumn", - "tags": [ - "tablesDB" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 284, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "tablesDBUpdateEnumColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 285, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "tablesDBCreateFloatColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 286, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "tablesDBUpdateFloatColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 287, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "tablesDBCreateIntegerColumn", - "tags": [ - "tablesDB" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 288, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "tablesDBUpdateIntegerColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 289, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "tablesDBCreateIpColumn", - "tags": [ - "tablesDB" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 290, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "tablesDBUpdateIpColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 291, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { - "post": { - "summary": "Create line column", - "operationId": "tablesDBCreateLineColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a geometric line column.", - "responses": { - "202": { - "description": "ColumnLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLine" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLineColumn", - "group": "columns", - "weight": 292, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { - "patch": { - "summary": "Update line column", - "operationId": "tablesDBUpdateLineColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a line column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnLine", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLine" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLineColumn", - "group": "columns", - "weight": 293, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { - "post": { - "summary": "Create longtext column", - "operationId": "tablesDBCreateLongtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a longtext column.\n", - "responses": { - "202": { - "description": "ColumnLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextColumn", - "group": "columns", - "weight": 310, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { - "patch": { - "summary": "Update longtext column", - "operationId": "tablesDBUpdateLongtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnLongtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextColumn", - "group": "columns", - "weight": 311, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { - "post": { - "summary": "Create mediumtext column", - "operationId": "tablesDBCreateMediumtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a mediumtext column.\n", - "responses": { - "202": { - "description": "ColumnMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextColumn", - "group": "columns", - "weight": 308, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext column", - "operationId": "tablesDBUpdateMediumtextColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnMediumtext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextColumn", - "group": "columns", - "weight": 309, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { - "post": { - "summary": "Create point column", - "operationId": "tablesDBCreatePointColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a geometric point column.", - "responses": { - "202": { - "description": "ColumnPoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPoint" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPointColumn", - "group": "columns", - "weight": 294, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { - "patch": { - "summary": "Update point column", - "operationId": "tablesDBUpdatePointColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a point column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPoint", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPoint" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePointColumn", - "group": "columns", - "weight": 295, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[1, 2]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { - "post": { - "summary": "Create polygon column", - "operationId": "tablesDBCreatePolygonColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a geometric polygon column.", - "responses": { - "202": { - "description": "ColumnPolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPolygon" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPolygonColumn", - "group": "columns", - "weight": 296, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { - "patch": { - "summary": "Update polygon column", - "operationId": "tablesDBUpdatePolygonColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnPolygon" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePolygonColumn", - "group": "columns", - "weight": 297, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "oneOf": [ - { - "type": "array" - } - ] - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "tablesDBCreateRelationshipColumn", - "tags": [ - "tablesDB" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 298, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "<RELATED_TABLE_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "tablesDBCreateStringColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 300, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", - "deprecated": { - "since": "1.9.0", - "replaceWith": "tablesDB.createTextColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for text columns, in number of characters.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "tablesDBUpdateStringColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 301, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { - "post": { - "summary": "Create text column", - "operationId": "tablesDBCreateTextColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a text column.\n", - "responses": { - "202": { - "description": "ColumnText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextColumn", - "group": "columns", - "weight": 306, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { - "patch": { - "summary": "Update text column", - "operationId": "tablesDBUpdateTextColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnText" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextColumn", - "group": "columns", - "weight": 307, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "tablesDBCreateUrlColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 302, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "tablesDBUpdateUrlColumn", - "tags": [ - "tablesDB" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 303, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { - "post": { - "summary": "Create varchar column", - "operationId": "tablesDBCreateVarcharColumn", - "tags": [ - "tablesDB" - ], - "description": "Create a varchar column.\n", - "responses": { - "202": { - "description": "ColumnVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharColumn", - "group": "columns", - "weight": 304, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { - "patch": { - "summary": "Update varchar column", - "operationId": "tablesDBUpdateVarcharColumn", - "tags": [ - "tablesDB" - ], - "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnVarchar", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnVarchar" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharColumn", - "group": "columns", - "weight": 305, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar column.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "tablesDBGetColumn", - "tags": [ - "tablesDB" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 275, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "tablesDBDeleteColumn", - "tags": [ - "tablesDB" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 276, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "tablesDBUpdateRelationshipColumn", - "tags": [ - "tablesDB" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 299, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [], - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "tablesDBListIndexes", - "tags": [ - "tablesDB" - ], - "description": "List indexes on the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 315, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "tablesDBCreateIndex", - "tags": [ - "tablesDB" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 312, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "TablesDBIndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "tablesDBGetIndex", - "tags": [ - "tablesDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 313, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "tablesDBDeleteIndex", - "tags": [ - "tablesDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 314, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", - "tags": [ - "tablesDB" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 324, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", - "tags": [ - "tablesDB" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 316, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - }, - { - "name": "createRows", - "namespace": "tablesDB", - "desc": "Create rows", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-rows.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<ROW_ID>" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert rows", - "operationId": "tablesDBUpsertRows", - "tags": [ - "tablesDB" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 321, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", - "methods": [ - { - "name": "upsertRows", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "demo": "tablesdb\/upsert-rows.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "rows" - ] - } - } - } - } - }, - "patch": { - "summary": "Update rows", - "operationId": "tablesDBUpdateRows", - "tags": [ - "tablesDB" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 319, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete rows", - "operationId": "tablesDBDeleteRows", - "tags": [ - "tablesDB" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 323, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", - "tags": [ - "tablesDB" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 317, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", - "tags": [ - "tablesDB" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 320, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", - "tags": [ - "tablesDB" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 318, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", - "tags": [ - "tablesDB" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 322, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 327, - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 326, - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/teams": { - "get": { - "summary": "List teams", - "operationId": "teamsList", - "tags": [ - "teams" - ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", - "responses": { - "200": { - "description": "Teams List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/teamList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "teams", - "weight": 526, - "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", - "tags": [ - "teams" - ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "teams", - "weight": 524, - "cookies": false, - "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TEAM_ID>" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", - "tags": [ - "teams" - ], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "teams", - "weight": 525, - "cookies": false, - "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "tags": [ - "teams" - ], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "teams", - "weight": 528, - "cookies": false, - "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", - "tags": [ - "teams" - ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "teams", - "weight": 527, - "cookies": false, - "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "tags": [ - "teams" - ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membershipList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 533, - "cookies": false, - "type": "", - "demo": "teams\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "tags": [ - "teams" - ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMembership", - "group": "memberships", - "weight": 531, - "cookies": false, - "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "x-example": "email@example.com", - "format": "email" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "roles" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { - "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", - "tags": [ - "teams" - ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMembership", - "group": "memberships", - "weight": 532, - "cookies": false, - "type": "", - "demo": "teams\/get-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", - "tags": [ - "teams" - ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembership", - "group": "memberships", - "weight": 534, - "cookies": false, - "type": "", - "demo": "teams\/update-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", - "tags": [ - "teams" - ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", - "weight": 535, - "cookies": false, - "type": "", - "demo": "teams\/delete-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { - "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", - "tags": [ - "teams" - ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", - "weight": 536, - "cookies": false, - "type": "", - "demo": "teams\/update-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MEMBERSHIP_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "tags": [ - "teams" - ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "teams", - "weight": 529, - "cookies": false, - "type": "", - "demo": "teams\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", - "tags": [ - "teams" - ], - "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "teams", - "weight": 530, - "cookies": false, - "type": "", - "demo": "teams\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "List tokens", - "operationId": "tokensList", - "tags": [ - "tokens" - ], - "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Resource Tokens List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceTokenList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "files", - "weight": 540, - "cookies": false, - "type": "", - "demo": "tokens\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file token", - "operationId": "tokensCreateFileToken", - "tags": [ - "tokens" - ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", - "responses": { - "201": { - "description": "ResourceToken", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceToken" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFileToken", - "group": "files", - "weight": 538, - "cookies": false, - "type": "", - "demo": "tokens\/create-file-token.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "<BUCKET_ID>" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FILE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "Token expiry date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tokens\/{tokenId}": { - "get": { - "summary": "Get token", - "operationId": "tokensGet", - "tags": [ - "tokens" - ], - "description": "Get a token by its unique ID.", - "responses": { - "200": { - "description": "ResourceToken", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceToken" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tokens", - "weight": 539, - "cookies": false, - "type": "", - "demo": "tokens\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update token", - "operationId": "tokensUpdate", - "tags": [ - "tokens" - ], - "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", - "responses": { - "200": { - "description": "ResourceToken", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/resourceToken" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tokens", - "weight": 541, - "cookies": false, - "type": "", - "demo": "tokens\/update.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "File token expiry date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete token", - "operationId": "tokensDelete", - "tags": [ - "tokens" - ], - "description": "Delete a token by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tokens", - "weight": 542, - "cookies": false, - "type": "", - "demo": "tokens\/delete.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users": { - "get": { - "summary": "List users", - "operationId": "usersList", - "tags": [ - "users" - ], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Users List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/userList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "users", - "weight": 71, - "cookies": false, - "type": "", - "demo": "users\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user", - "operationId": "usersCreate", - "tags": [ - "users" - ], - "description": "Create a new user.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "users", - "weight": 62, - "cookies": false, - "type": "", - "demo": "users\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId" - ] - } - } - } - } - } - }, - "\/users\/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createArgon2User", - "group": "users", - "weight": 65, - "cookies": false, - "type": "", - "demo": "users\/create-argon-2-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Argon2.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBcryptUser", - "group": "users", - "weight": 63, - "cookies": false, - "type": "", - "demo": "users\/create-bcrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Bcrypt.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "tags": [ - "users" - ], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/identityList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 79, - "cookies": false, - "type": "", - "demo": "users\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/users\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "tags": [ - "users" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 103, - "cookies": false, - "type": "", - "demo": "users\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<IDENTITY_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMD5User", - "group": "users", - "weight": 64, - "cookies": false, - "type": "", - "demo": "users\/create-md-5-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using MD5.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPHPassUser", - "group": "users", - "weight": 67, - "cookies": false, - "type": "", - "demo": "users\/create-ph-pass-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using PHPass.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptUser", - "group": "users", - "weight": 68, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt.", - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "x-example": null, - "format": "int32" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" - ] - } - } - } - } - } - }, - "\/users\/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptModifiedUser", - "group": "users", - "weight": 69, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-modified-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "x-example": "<PASSWORD_SIGNER_KEY>" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } - } - } - } - }, - "\/users\/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSHAUser", - "group": "users", - "weight": 66, - "cookies": false, - "type": "", - "demo": "users\/create-sha-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using SHA.", - "x-example": "password", - "format": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - } - } - } - }, - "\/users\/{userId}": { - "get": { - "summary": "Get user", - "operationId": "usersGet", - "tags": [ - "users" - ], - "description": "Get a user by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "users", - "weight": 72, - "cookies": false, - "type": "", - "demo": "users\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user", - "operationId": "usersDelete", - "tags": [ - "users" - ], - "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "users", - "weight": 101, - "cookies": false, - "type": "", - "demo": "users\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/email": { - "patch": { - "summary": "Update email", - "operationId": "usersUpdateEmail", - "tags": [ - "users" - ], - "description": "Update the user email by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "users", - "weight": 86, - "cookies": false, - "type": "", - "demo": "users\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - } - }, - "required": [ - "email" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/impersonator": { - "patch": { - "summary": "Update user impersonator capability", - "operationId": "usersUpdateImpersonator", - "tags": [ - "users" - ], - "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateImpersonator", - "group": "users", - "weight": 82, - "cookies": false, - "type": "", - "demo": "users\/update-impersonator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", - "x-example": false - } - }, - "required": [ - "impersonator" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "tags": [ - "users" - ], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/jwt" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "sessions", - "weight": 104, - "cookies": false, - "type": "", - "demo": "users\/create-jwt.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "x-example": 0, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/users\/{userId}\/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "tags": [ - "users" - ], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": "users", - "weight": 81, - "cookies": false, - "type": "", - "demo": "users\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "tags": [ - "users" - ], - "description": "Get the user 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": 77, - "cookies": false, - "type": "", - "demo": "users\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "tags": [ - "users" - ], - "description": "Get the user membership list by its unique ID.", - "responses": { - "200": { - "description": "Memberships List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membershipList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 76, - "cookies": false, - "type": "", - "demo": "users\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "tags": [ - "users" - ], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfa", - "group": "users", - "weight": 91, - "cookies": false, - "type": "", - "demo": "users\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - }, - "methods": [ - { - "name": "updateMfa", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - } - }, - { - "name": "updateMFA", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/mfa\/authenticators\/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "tags": [ - "users" - ], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 96, - "cookies": false, - "type": "", - "demo": "users\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [] - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "tags": [ - "users" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 92, - "cookies": false, - "type": "", - "demo": "users\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "tags": [ - "users" - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 93, - "cookies": false, - "type": "", - "demo": "users\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "usersUpdateMfaRecoveryCodes", - "tags": [ - "users" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 95, - "cookies": false, - "type": "", - "demo": "users\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "tags": [ - "users" - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 94, - "cookies": false, - "type": "", - "demo": "users\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/name": { - "patch": { - "summary": "Update name", - "operationId": "usersUpdateName", - "tags": [ - "users" - ], - "description": "Update the user name by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "users", - "weight": 84, - "cookies": false, - "type": "", - "demo": "users\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/password": { - "patch": { - "summary": "Update password", - "operationId": "usersUpdatePassword", - "tags": [ - "users" - ], - "description": "Update the user password by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "users", - "weight": 85, - "cookies": false, - "type": "", - "demo": "users\/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": null - } - }, - "required": [ - "password" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "tags": [ - "users" - ], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "users", - "weight": 87, - "cookies": false, - "type": "", - "demo": "users\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "number" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "tags": [ - "users" - ], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "users", - "weight": 73, - "cookies": false, - "type": "", - "demo": "users\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user preferences", - "operationId": "usersUpdatePrefs", - "tags": [ - "users" - ], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/preferences" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "users", - "weight": 89, - "cookies": false, - "type": "", - "demo": "users\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/sessions": { - "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", - "tags": [ - "users" - ], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { - "description": "Sessions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/sessionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 75, - "cookies": false, - "type": "", - "demo": "users\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.read", - "sessions.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "tags": [ - "users" - ], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 97, - "cookies": false, - "type": "", - "demo": "users\/create-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user sessions", - "operationId": "usersDeleteSessions", - "tags": [ - "users" - ], - "description": "Delete all user's sessions by using the user's unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 100, - "cookies": false, - "type": "", - "demo": "users\/delete-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/sessions\/{sessionId}": { - "delete": { - "summary": "Delete user session", - "operationId": "usersDeleteSession", - "tags": [ - "users" - ], - "description": "Delete a user sessions by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 99, - "cookies": false, - "type": "", - "demo": "users\/delete-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/status": { - "patch": { - "summary": "Update user status", - "operationId": "usersUpdateStatus", - "tags": [ - "users" - ], - "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "users", - "weight": 80, - "cookies": false, - "type": "", - "demo": "users\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", - "x-example": false - } - }, - "required": [ - "status" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "tags": [ - "users" - ], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/targetList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "targets", - "weight": 78, - "cookies": false, - "type": "", - "demo": "users\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "tags": [ - "users" - ], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTarget", - "group": "targets", - "weight": 70, - "cookies": false, - "type": "", - "demo": "users\/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TARGET_ID>" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email", - "enum": [ - "email", - "sms", - "push" - ], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "x-example": "<NAME>" - } - }, - "required": [ - "targetId", - "providerType", - "identifier" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/targets\/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "tags": [ - "users" - ], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTarget", - "group": "targets", - "weight": 74, - "cookies": false, - "type": "", - "demo": "users\/get-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "tags": [ - "users" - ], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/target" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTarget", - "group": "targets", - "weight": 90, - "cookies": false, - "type": "", - "demo": "users\/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "x-example": "<NAME>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "tags": [ - "users" - ], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTarget", - "group": "targets", - "weight": 102, - "cookies": false, - "type": "", - "demo": "users\/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TARGET_ID>" - }, - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "tags": [ - "users" - ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createToken", - "group": "sessions", - "weight": 98, - "cookies": false, - "type": "", - "demo": "users\/create-token.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "x-example": 4, - "format": "int32" - }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/users\/{userId}\/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "tags": [ - "users" - ], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "users", - "weight": 88, - "cookies": false, - "type": "", - "demo": "users\/update-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "x-example": false - } - }, - "required": [ - "emailVerification" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/verification\/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "tags": [ - "users" - ], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "users", - "weight": 83, - "cookies": false, - "type": "", - "demo": "users\/update-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "x-example": false - } - }, - "required": [ - "phoneVerification" - ] - } - } - } - } - } - }, - "\/vectorsdb": { - "get": { - "summary": "List databases", - "operationId": "vectorsDBList", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "vectorsdb", - "weight": 372, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "vectorsDBCreate", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "vectorsdb", - "weight": 368, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - } - } - } - }, - "\/vectorsdb\/embeddings\/text": { - "post": { - "summary": "Create Text Embeddings", - "operationId": "vectorsDBCreateTextEmbeddings", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "200": { - "description": "Embedding list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/embeddingList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextEmbeddings", - "group": "documents", - "weight": 394, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-text-embeddings.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createTextEmbeddings", - "namespace": "vectorsDB", - "desc": "Create Text Embedding", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "texts", - "model" - ], - "required": [ - "texts" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/embeddingList" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-text-embeddings.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "texts": { - "type": "array", - "description": "Array of text to generate embeddings.", - "x-example": null, - "items": { - "type": "string" - } - }, - "model": { - "type": "string", - "description": "The embedding model to use for generating vector embeddings.", - "x-example": "embeddinggemma", - "enum": [ - "embeddinggemma" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "required": [ - "texts" - ] - } - } - } - } - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", - "tags": [ - "vectorsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 399, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 395, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 396, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 397, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", - "tags": [ - "vectorsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 398, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", - "tags": [ - "vectorsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 400, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "vectorsDBGet", - "tags": [ - "vectorsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "vectorsdb", - "weight": 369, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "vectorsDBUpdate", - "tags": [ - "vectorsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/database" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "vectorsdb", - "weight": 370, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete database", - "operationId": "vectorsDBDelete", - "tags": [ - "vectorsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "vectorsdb", - "weight": 371, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "vectorsDBListCollections", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "VectorsDB Collections List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollectionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 379, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "vectorsDBCreateCollection", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "VectorsDB Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 375, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "collectionId", - "name", - "dimension" - ] - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "vectorsDBGetCollection", - "tags": [ - "vectorsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 376, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "vectorsDBUpdateCollection", - "tags": [ - "vectorsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 377, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimensions.", - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete collection", - "operationId": "vectorsDBDeleteCollection", - "tags": [ - "vectorsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 378, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 389, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 385, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "vectorsDB", - "desc": "Create documents", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "vectorsDBUpsertDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 392, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "vectorsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - } - } - }, - "patch": { - "summary": "Update documents", - "operationId": "vectorsDBUpdateDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 391, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "vectorsDBDeleteDocuments", - "tags": [ - "vectorsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 393, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", - "tags": [ - "vectorsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 388, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", - "tags": [ - "vectorsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 387, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", - "tags": [ - "vectorsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 386, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 390, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "vectorsDBListIndexes", - "tags": [ - "vectorsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 384, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "vectorsDBCreateIndex", - "tags": [ - "vectorsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 381, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "hnsw_euclidean", - "enum": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ], - "x-enum-name": "VectorsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } - } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "vectorsDBGetIndex", - "tags": [ - "vectorsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 382, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "vectorsDBDeleteIndex", - "tags": [ - "vectorsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 383, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/webhooks": { - "get": { - "summary": "List webhooks", - "operationId": "webhooksList", - "tags": [ - "webhooks" - ], - "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Webhooks List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhookList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "weight": 573, - "cookies": false, - "type": "", - "demo": "webhooks\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create webhook", - "operationId": "webhooksCreate", - "tags": [ - "webhooks" - ], - "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", - "responses": { - "201": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": null, - "weight": 572, - "cookies": false, - "type": "", - "demo": "webhooks\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "webhookId": { - "type": "string", - "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<WEBHOOK_ID>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "x-example": null - }, - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "x-example": "<AUTH_PASSWORD>" - }, - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "x-example": "<SECRET>", - "x-nullable": true - } - }, - "required": [ - "webhookId", - "url", - "name", - "events" - ] - } - } - } - } - } - }, - "\/webhooks\/{webhookId}": { - "get": { - "summary": "Get webhook", - "operationId": "webhooksGet", - "tags": [ - "webhooks" - ], - "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 574, - "cookies": false, - "type": "", - "demo": "webhooks\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update webhook", - "operationId": "webhooksUpdate", - "tags": [ - "webhooks" - ], - "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": null, - "weight": 576, - "cookies": false, - "type": "", - "demo": "webhooks\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "x-example": null - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "x-example": "<AUTH_PASSWORD>" - } - }, - "required": [ - "name", - "url", - "events" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete webhook", - "operationId": "webhooksDelete", - "tags": [ - "webhooks" - ], - "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 575, - "cookies": false, - "type": "", - "demo": "webhooks\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ] - } - }, - "\/webhooks\/{webhookId}\/secret": { - "patch": { - "summary": "Update webhook secret key", - "operationId": "webhooksUpdateSecret", - "tags": [ - "webhooks" - ], - "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSecret", - "group": null, - "weight": 577, - "cookies": false, - "type": "", - "demo": "webhooks\/update-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "x-example": "<SECRET>", - "x-nullable": true - } - } - } - } - } - } - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - } - ], - "components": { - "schemas": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] - }, - "error": { - "description": "Error", - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Error message.", - "x-example": "Not found" - }, - "code": { - "type": "string", - "description": "Error code.", - "x-example": "404" - }, - "type": { - "type": "string", - "description": "Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes", - "x-example": "not_found" - }, - "version": { - "type": "string", - "description": "Server version number.", - "x-example": "1.0" - } - }, - "required": [ - "message", - "code", - "type", - "version" - ], - "example": { - "message": "Not found", - "code": "404", - "type": "not_found", - "version": "1.0" - } - }, - "rowList": { - "description": "Rows List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rows that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "List of rows.", - "items": { - "$ref": "#\/components\/schemas\/row" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rows" - ], - "example": { - "total": 5, - "rows": "" - } - }, - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { - "$ref": "#\/components\/schemas\/document" - }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "$ref": "#\/components\/schemas\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "tableList": { - "description": "Tables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tables": { - "type": "array", - "description": "List of tables.", - "items": { - "$ref": "#\/components\/schemas\/table" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tables" - ], - "example": { - "total": 5, - "tables": "" - } - }, - "collectionList": { - "description": "Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "$ref": "#\/components\/schemas\/collection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "$ref": "#\/components\/schemas\/database" - }, - "x-example": "" - } - }, - "required": [ - "total", - "databases" - ], - "example": { - "total": 5, - "databases": "" - } - }, - "indexList": { - "description": "Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "columnIndexList": { - "description": "Column Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "$ref": "#\/components\/schemas\/columnIndex" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "userList": { - "description": "Users List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of users that matched your query.", - "x-example": 5, - "format": "int32" - }, - "users": { - "type": "array", - "description": "List of users.", - "items": { - "$ref": "#\/components\/schemas\/user" - }, - "x-example": "" - } - }, - "required": [ - "total", - "users" - ], - "example": { - "total": 5, - "users": "" - } - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "$ref": "#\/components\/schemas\/session" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sessions" - ], - "example": { - "total": 5, - "sessions": "" - } - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "$ref": "#\/components\/schemas\/identity" - }, - "x-example": "" - } - }, - "required": [ - "total", - "identities" - ], - "example": { - "total": 5, - "identities": "" - } - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { - "$ref": "#\/components\/schemas\/log" - }, - "x-example": "" - } - }, - "required": [ - "total", - "logs" - ], - "example": { - "total": 5, - "logs": "" - } - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "$ref": "#\/components\/schemas\/file" - }, - "x-example": "" - } - }, - "required": [ - "total", - "files" - ], - "example": { - "total": 5, - "files": "" - } - }, - "bucketList": { - "description": "Buckets List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { - "$ref": "#\/components\/schemas\/bucket" - }, - "x-example": "" - } - }, - "required": [ - "total", - "buckets" - ], - "example": { - "total": 5, - "buckets": "" - } - }, - "resourceTokenList": { - "description": "Resource Tokens List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tokens that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tokens": { - "type": "array", - "description": "List of tokens.", - "items": { - "$ref": "#\/components\/schemas\/resourceToken" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tokens" - ], - "example": { - "total": 5, - "tokens": "" - } - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "$ref": "#\/components\/schemas\/team" - }, - "x-example": "" - } - }, - "required": [ - "total", - "teams" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { - "$ref": "#\/components\/schemas\/membership" - }, - "x-example": "" - } - }, - "required": [ - "total", - "memberships" - ], - "example": { - "total": 5, - "memberships": "" - } - }, - "siteList": { - "description": "Sites List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sites that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "List of sites.", - "items": { - "$ref": "#\/components\/schemas\/site" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sites" - ], - "example": { - "total": 5, - "sites": "" - } - }, - "functionList": { - "description": "Functions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of functions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "List of functions.", - "items": { - "$ref": "#\/components\/schemas\/function" - }, - "x-example": "" - } - }, - "required": [ - "total", - "functions" - ], - "example": { - "total": 5, - "functions": "" - } - }, - "frameworkList": { - "description": "Frameworks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of frameworks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "frameworks": { - "type": "array", - "description": "List of frameworks.", - "items": { - "$ref": "#\/components\/schemas\/framework" - }, - "x-example": "" - } - }, - "required": [ - "total", - "frameworks" - ], - "example": { - "total": 5, - "frameworks": "" - } - }, - "runtimeList": { - "description": "Runtimes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { - "$ref": "#\/components\/schemas\/runtime" - }, - "x-example": "" - } - }, - "required": [ - "total", - "runtimes" - ], - "example": { - "total": 5, - "runtimes": "" - } - }, - "deploymentList": { - "description": "Deployments List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments that matched your query.", - "x-example": 5, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { - "$ref": "#\/components\/schemas\/deployment" - }, - "x-example": "" - } - }, - "required": [ - "total", - "deployments" - ], - "example": { - "total": 5, - "deployments": "" - } - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "$ref": "#\/components\/schemas\/execution" - }, - "x-example": "" - } - }, - "required": [ - "total", - "executions" - ], - "example": { - "total": 5, - "executions": "" - } - }, - "webhookList": { - "description": "Webhooks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of webhooks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "webhooks": { - "type": "array", - "description": "List of webhooks.", - "items": { - "$ref": "#\/components\/schemas\/webhook" - }, - "x-example": "" - } - }, - "required": [ - "total", - "webhooks" - ], - "example": { - "total": 5, - "webhooks": "" - } - }, - "keyList": { - "description": "API Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of keys that matched your query.", - "x-example": 5, - "format": "int32" - }, - "keys": { - "type": "array", - "description": "List of keys.", - "items": { - "$ref": "#\/components\/schemas\/key" - }, - "x-example": "" - } - }, - "required": [ - "total", - "keys" - ], - "example": { - "total": 5, - "keys": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "$ref": "#\/components\/schemas\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "$ref": "#\/components\/schemas\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "$ref": "#\/components\/schemas\/language" - }, - "x-example": "" - } - }, - "required": [ - "total", - "languages" - ], - "example": { - "total": 5, - "languages": "" - } - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "$ref": "#\/components\/schemas\/currency" - }, - "x-example": "" - } - }, - "required": [ - "total", - "currencies" - ], - "example": { - "total": 5, - "currencies": "" - } - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "$ref": "#\/components\/schemas\/phone" - }, - "x-example": "" - } - }, - "required": [ - "total", - "phones" - ], - "example": { - "total": 5, - "phones": "" - } - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": "" - } - }, - "required": [ - "total", - "variables" - ], - "example": { - "total": 5, - "variables": "" - } - }, - "mockNumberList": { - "description": "Mock Numbers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of mockNumbers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "mockNumbers": { - "type": "array", - "description": "List of mockNumbers.", - "items": { - "$ref": "#\/components\/schemas\/mockNumber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "mockNumbers" - ], - "example": { - "total": 5, - "mockNumbers": "" - } - }, - "policyList": { - "description": "Policies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of policies in the given project.", - "x-example": 9, - "format": "int32" - }, - "policies": { - "type": "array", - "description": "List of policies.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/policyPasswordDictionary" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordHistory" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordPersonalData" - }, - { - "$ref": "#\/components\/schemas\/policySessionAlert" - }, - { - "$ref": "#\/components\/schemas\/policySessionDuration" - }, - { - "$ref": "#\/components\/schemas\/policySessionInvalidation" - }, - { - "$ref": "#\/components\/schemas\/policySessionLimit" - }, - { - "$ref": "#\/components\/schemas\/policyUserLimit" - }, - { - "$ref": "#\/components\/schemas\/policyMembershipPrivacy" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", - "password-history": "#\/components\/schemas\/policyPasswordHistory", - "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", - "session-alert": "#\/components\/schemas\/policySessionAlert", - "session-duration": "#\/components\/schemas\/policySessionDuration", - "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", - "session-limit": "#\/components\/schemas\/policySessionLimit", - "user-limit": "#\/components\/schemas\/policyUserLimit", - "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "policies" - ], - "example": { - "total": 9, - "policies": "" - } - }, - "emailTemplateList": { - "description": "Email Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "$ref": "#\/components\/schemas\/emailTemplate" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "healthStatusList": { - "description": "Status List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of statuses that matched your query.", - "x-example": 5, - "format": "int32" - }, - "statuses": { - "type": "array", - "description": "List of statuses.", - "items": { - "$ref": "#\/components\/schemas\/healthStatus" - }, - "x-example": "" - } - }, - "required": [ - "total", - "statuses" - ], - "example": { - "total": 5, - "statuses": "" - } - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "$ref": "#\/components\/schemas\/localeCode" - }, - "x-example": "" - } - }, - "required": [ - "total", - "localeCodes" - ], - "example": { - "total": 5, - "localeCodes": "" - } - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "$ref": "#\/components\/schemas\/provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "$ref": "#\/components\/schemas\/message" - }, - "x-example": "" - } - }, - "required": [ - "total", - "messages" - ], - "example": { - "total": 5, - "messages": "" - } - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "$ref": "#\/components\/schemas\/topic" - }, - "x-example": "" - } - }, - "required": [ - "total", - "topics" - ], - "example": { - "total": 5, - "topics": "" - } - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "$ref": "#\/components\/schemas\/subscriber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "subscribers" - ], - "example": { - "total": 5, - "subscribers": "" - } - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": "" - } - }, - "required": [ - "total", - "targets" - ], - "example": { - "total": 5, - "targets": "" - } - }, - "transactionList": { - "description": "Transaction List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "$ref": "#\/components\/schemas\/transaction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "transactions" - ], - "example": { - "total": 5, - "transactions": "" - } - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "$ref": "#\/components\/schemas\/specification" - }, - "x-example": "" - } - }, - "required": [ - "total", - "specifications" - ], - "example": { - "total": 5, - "specifications": "" - } - }, - "vectorsdbCollectionList": { - "description": "VectorsDB Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "embeddingList": { - "description": "Embedding list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of embeddings that matched your query.", - "x-example": 5, - "format": "int32" - }, - "embeddings": { - "type": "array", - "description": "List of embeddings.", - "items": { - "$ref": "#\/components\/schemas\/embedding" - }, - "x-example": "" - } - }, - "required": [ - "total", - "embeddings" - ], - "example": { - "total": 5, - "embeddings": "" - } - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "type": { - "type": "string", - "description": "Database type.", - "x-example": "legacy", - "enum": [ - "legacy", - "tablesdb", - "documentsdb", - "vectorsdb" - ] - } - }, - "required": [ - "$id", - "name", - "$createdAt", - "$updatedAt", - "enabled", - "type" - ], - "example": { - "$id": "5e5ea5c16897e", - "name": "My Database", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "enabled": false, - "type": "legacy" - } - }, - "embedding": { - "description": "Embedding", - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" - }, - "dimension": { - "type": "integer", - "description": "Number of dimensions for each embedding vector.", - "x-example": 768, - "format": "int32" - }, - "embedding": { - "type": "array", - "description": "Embedding vector values. If an error occurs, this will be an empty array.", - "items": { - "type": "number", - "format": "double" - }, - "x-example": [ - 0.01, - 0.02, - 0.03 - ] - }, - "error": { - "type": "string", - "description": "Error message if embedding generation fails. Empty string if no error.", - "x-example": "Error message" - } - }, - "required": [ - "model", - "dimension", - "embedding", - "error" - ], - "example": { - "model": "embeddinggemma", - "dimension": 768, - "embedding": [ - 0.01, - 0.02, - 0.03 - ], - "error": "Error message" - } - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeInteger" - }, - { - "$ref": "#\/components\/schemas\/attributeFloat" - }, - { - "$ref": "#\/components\/schemas\/attributeEmail" - }, - { - "$ref": "#\/components\/schemas\/attributeEnum" - }, - { - "$ref": "#\/components\/schemas\/attributeUrl" - }, - { - "$ref": "#\/components\/schemas\/attributeIp" - }, - { - "$ref": "#\/components\/schemas\/attributeDatetime" - }, - { - "$ref": "#\/components\/schemas\/attributeRelationship" - }, - { - "$ref": "#\/components\/schemas\/attributePoint" - }, - { - "$ref": "#\/components\/schemas\/attributeLine" - }, - { - "$ref": "#\/components\/schemas\/attributePolygon" - }, - { - "$ref": "#\/components\/schemas\/attributeVarchar" - }, - { - "$ref": "#\/components\/schemas\/attributeText" - }, - { - "$ref": "#\/components\/schemas\/attributeMediumtext" - }, - { - "$ref": "#\/components\/schemas\/attributeLongtext" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship", - "point": "#\/components\/schemas\/attributePoint", - "linestring": "#\/components\/schemas\/attributeLine", - "polygon": "#\/components\/schemas\/attributePolygon", - "varchar": "#\/components\/schemas\/attributeVarchar", - "text": "#\/components\/schemas\/attributeText", - "mediumtext": "#\/components\/schemas\/attributeMediumtext", - "longtext": "#\/components\/schemas\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributePoint": { - "type": "point" - }, - "#\/components\/schemas\/attributeLine": { - "type": "linestring" - }, - "#\/components\/schemas\/attributePolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/attributeVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/attributeText": { - "type": "text" - }, - "#\/components\/schemas\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/attributeLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "attributeList": { - "description": "Attributes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" - }, - "attributes": { - "type": "array", - "description": "List of attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeInteger" - }, - { - "$ref": "#\/components\/schemas\/attributeFloat" - }, - { - "$ref": "#\/components\/schemas\/attributeEmail" - }, - { - "$ref": "#\/components\/schemas\/attributeEnum" - }, - { - "$ref": "#\/components\/schemas\/attributeUrl" - }, - { - "$ref": "#\/components\/schemas\/attributeIp" - }, - { - "$ref": "#\/components\/schemas\/attributeDatetime" - }, - { - "$ref": "#\/components\/schemas\/attributeRelationship" - }, - { - "$ref": "#\/components\/schemas\/attributePoint" - }, - { - "$ref": "#\/components\/schemas\/attributeLine" - }, - { - "$ref": "#\/components\/schemas\/attributePolygon" - }, - { - "$ref": "#\/components\/schemas\/attributeVarchar" - }, - { - "$ref": "#\/components\/schemas\/attributeText" - }, - { - "$ref": "#\/components\/schemas\/attributeMediumtext" - }, - { - "$ref": "#\/components\/schemas\/attributeLongtext" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship", - "point": "#\/components\/schemas\/attributePoint", - "linestring": "#\/components\/schemas\/attributeLine", - "polygon": "#\/components\/schemas\/attributePolygon", - "varchar": "#\/components\/schemas\/attributeVarchar", - "text": "#\/components\/schemas\/attributeText", - "mediumtext": "#\/components\/schemas\/attributeMediumtext", - "longtext": "#\/components\/schemas\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributePoint": { - "type": "point" - }, - "#\/components\/schemas\/attributeLine": { - "type": "linestring" - }, - "#\/components\/schemas\/attributePolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/attributeVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/attributeText": { - "type": "text" - }, - "#\/components\/schemas\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/attributeLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "attributes" - ], - "example": { - "total": 5, - "attributes": "" - } - }, - "attributeString": { - "description": "AttributeString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeInteger": { - "description": "AttributeInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int32", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "attributeFloat": { - "description": "AttributeFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "nullable": true - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "attributeBoolean": { - "description": "AttributeBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "attributeEmail": { - "description": "AttributeEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "attributeEnum": { - "description": "AttributeEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "attributeIp": { - "description": "AttributeIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "192.0.2.0", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "attributeUrl": { - "description": "AttributeURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http:\/\/example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "http:\/\/example.com" - } - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedCollection": "collection", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "attributePoint": { - "description": "AttributePoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - 0, - 0 - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "attributeLine": { - "description": "AttributeLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "attributePolygon": { - "description": "AttributePolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "attributeVarchar": { - "description": "AttributeVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeText": { - "description": "AttributeText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeMediumtext": { - "description": "AttributeMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeLongtext": { - "description": "AttributeLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "vectorsdbCollection": { - "description": "VectorsDB Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeObject" - }, - { - "$ref": "#\/components\/schemas\/attributeVector" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "object": "#\/components\/schemas\/attributeObject", - "vector": "#\/components\/schemas\/attributeVector" - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed", - "dimension" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500, - "dimension": 1536 - } - }, - "attributeObject": { - "description": "AttributeObject", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeVector": { - "description": "AttributeVector", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Vector dimensions.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 1536 - } - }, - "table": { - "description": "Table", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Table creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Table update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Table name.", - "x-example": "My Table" - }, - "enabled": { - "type": "boolean", - "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "rowSecurity": { - "type": "boolean", - "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "columns": { - "type": "array", - "description": "Table columns.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnPoint" - }, - { - "$ref": "#\/components\/schemas\/columnLine" - }, - { - "$ref": "#\/components\/schemas\/columnPolygon" - }, - { - "$ref": "#\/components\/schemas\/columnVarchar" - }, - { - "$ref": "#\/components\/schemas\/columnText" - }, - { - "$ref": "#\/components\/schemas\/columnMediumtext" - }, - { - "$ref": "#\/components\/schemas\/columnLongtext" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship", - "point": "#\/components\/schemas\/columnPoint", - "linestring": "#\/components\/schemas\/columnLine", - "polygon": "#\/components\/schemas\/columnPolygon", - "varchar": "#\/components\/schemas\/columnVarchar", - "text": "#\/components\/schemas\/columnText", - "mediumtext": "#\/components\/schemas\/columnMediumtext", - "longtext": "#\/components\/schemas\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnPoint": { - "type": "point" - }, - "#\/components\/schemas\/columnLine": { - "type": "linestring" - }, - "#\/components\/schemas\/columnPolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/columnVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/columnText": { - "type": "text" - }, - "#\/components\/schemas\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/columnLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Table indexes.", - "items": { - "$ref": "#\/components\/schemas\/columnIndex" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum row size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used row size in bytes based on defined columns.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "rowSecurity", - "columns", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Table", - "enabled": false, - "rowSecurity": true, - "columns": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "columnList": { - "description": "Columns List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of columns in the given table.", - "x-example": 5, - "format": "int32" - }, - "columns": { - "type": "array", - "description": "List of columns.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnPoint" - }, - { - "$ref": "#\/components\/schemas\/columnLine" - }, - { - "$ref": "#\/components\/schemas\/columnPolygon" - }, - { - "$ref": "#\/components\/schemas\/columnVarchar" - }, - { - "$ref": "#\/components\/schemas\/columnText" - }, - { - "$ref": "#\/components\/schemas\/columnMediumtext" - }, - { - "$ref": "#\/components\/schemas\/columnLongtext" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship", - "point": "#\/components\/schemas\/columnPoint", - "linestring": "#\/components\/schemas\/columnLine", - "polygon": "#\/components\/schemas\/columnPolygon", - "varchar": "#\/components\/schemas\/columnVarchar", - "text": "#\/components\/schemas\/columnText", - "mediumtext": "#\/components\/schemas\/columnMediumtext", - "longtext": "#\/components\/schemas\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnPoint": { - "type": "point" - }, - "#\/components\/schemas\/columnLine": { - "type": "linestring" - }, - "#\/components\/schemas\/columnPolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/columnVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/columnText": { - "type": "text" - }, - "#\/components\/schemas\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/columnLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "columns" - ], - "example": { - "total": 5, - "columns": "" - } - }, - "columnString": { - "description": "ColumnString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnInteger": { - "description": "ColumnInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 10, - "format": "int32", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "columnFloat": { - "description": "ColumnFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "nullable": true - }, - "default": { - "type": "number", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 2.5, - "format": "double", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "columnBoolean": { - "description": "ColumnBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "columnEmail": { - "description": "ColumnEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default@example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "columnEnum": { - "description": "ColumnEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "element", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "columnIp": { - "description": "ColumnIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "192.0.2.0", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "columnUrl": { - "description": "ColumnURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "https:\/\/example.com" - } - }, - "columnDatetime": { - "description": "ColumnDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "columnRelationship": { - "description": "ColumnRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedTable": { - "type": "string", - "description": "The ID of the related table.", - "x-example": "table" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedTable", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedTable": "table", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "columnPoint": { - "description": "ColumnPoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - 0, - 0 - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "columnLine": { - "description": "ColumnLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "columnPolygon": { - "description": "ColumnPolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "columnVarchar": { - "description": "ColumnVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnText": { - "description": "ColumnText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnMediumtext": { - "description": "ColumnMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnLongtext": { - "description": "ColumnLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "index": { - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ] - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index attributes length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "attributes", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "attributes": [], - "lengths": [], - "orders": [] - } - }, - "columnIndex": { - "description": "Index", - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "columns": { - "type": "array", - "description": "Index columns.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index columns length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "columns", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "columns": [], - "lengths": [], - "orders": [] - } - }, - "row": { - "description": "Row", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] - } - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false - } - }, - "presence": { - "description": "Presence", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Presence sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Presence creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Presence update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userInternalId": { - "type": "string", - "description": "User internal ID.", - "x-example": "1" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", - "required": [ - "$id", - "$sequence", - "$createdAt", - "$updatedAt", - "$permissions", - "userInternalId", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userInternalId": "1", - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ], - "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" - } - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/algoArgon2" - }, - { - "$ref": "#\/components\/schemas\/algoScrypt" - }, - { - "$ref": "#\/components\/schemas\/algoScryptModified" - }, - { - "$ref": "#\/components\/schemas\/algoBcrypt" - }, - { - "$ref": "#\/components\/schemas\/algoPhpass" - }, - { - "$ref": "#\/components\/schemas\/algoSha" - }, - { - "$ref": "#\/components\/schemas\/algoMd5" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/components\/schemas\/algoArgon2", - "scrypt": "#\/components\/schemas\/algoScrypt", - "scryptMod": "#\/components\/schemas\/algoScryptModified", - "bcrypt": "#\/components\/schemas\/algoBcrypt", - "phpass": "#\/components\/schemas\/algoPhpass", - "sha": "#\/components\/schemas\/algoSha", - "md5": "#\/components\/schemas\/algoMd5" - } - } - }, - "nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#\/components\/schemas\/preferences" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "nullable": true - }, - "impersonatorUserId": { - "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" - } - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" - } - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": [ - "jwt" - ], - "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the European Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ], - "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" - } - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": [ - "code", - "name" - ], - "example": { - "code": "en-us", - "name": "US" - } - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true - }, - "compression": { - "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" - ], - "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" - } - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { - "type": "string" - }, - "x-example": [ - "jpg", - "png" - ] - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Image transformations are enabled.", - "x-example": false - }, - "totalSize": { - "type": "integer", - "description": "Total size of this bucket in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus", - "transformations", - "totalSize" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "fileSecurity": true, - "name": "Documents", - "enabled": false, - "maximumFileSize": 100, - "allowedFileExtensions": [ - "jpg", - "png" - ], - "compression": "gzip", - "encryption": false, - "antivirus": false, - "transformations": false, - "totalSize": 128 - } - }, - "resourceToken": { - "description": "ResourceToken", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "files" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "resourceId", - "resourceType", - "expire", - "secret", - "accessedAt" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", - "resourceType": "files", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "accessedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "$ref": "#\/components\/schemas\/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } - } - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": [ - "owner" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "roles": [ - "owner" - ] - } - }, - "site": { - "description": "Site", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Site ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Site creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Site update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Site name.", - "x-example": "My Site" - }, - "enabled": { - "type": "boolean", - "description": "Site enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "framework": { - "type": "string", - "description": "Site framework.", - "x-example": "react" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Site's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "deploymentScreenshotLight": { - "type": "string", - "description": "Screenshot of active deployment with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentScreenshotDark": { - "type": "string", - "description": "Screenshot of active deployment with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentId": { - "type": "string", - "description": "Site's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "vars": { - "type": "array", - "description": "Site variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": [] - }, - "timeout": { - "type": "integer", - "description": "Site request timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "The install command used to install the site dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "The build command used to build the site.", - "x-example": "npm run build" - }, - "startCommand": { - "type": "string", - "description": "Custom command to use when starting site runtime.", - "x-example": "node custom-server.mjs" - }, - "outputDirectory": { - "type": "string", - "description": "The directory where the site build output is located.", - "x-example": "build" - }, - "installationId": { - "type": "string", - "description": "Site VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": "sites\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for SSR executions.", - "x-example": "s-1vcpu-512mb" - }, - "buildRuntime": { - "type": "string", - "description": "Site build runtime.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework adapter.", - "x-example": "static" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "enabled", - "live", - "logging", - "framework", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "deploymentScreenshotLight", - "deploymentScreenshotDark", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "vars", - "timeout", - "installCommand", - "buildCommand", - "startCommand", - "outputDirectory", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification", - "buildRuntime", - "adapter", - "fallbackFile" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Site", - "enabled": false, - "live": false, - "logging": false, - "framework": "react", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "deploymentScreenshotLight": "5e5ea5c16897e", - "deploymentScreenshotDark": "5e5ea5c16897e", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "vars": [], - "timeout": 300, - "installCommand": "npm install", - "buildCommand": "npm run build", - "startCommand": "node custom-server.mjs", - "outputDirectory": "build", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "sites\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb", - "buildRuntime": "node-22", - "adapter": "static", - "fallbackFile": "index.html" - } - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "runtime": { - "type": "string", - "description": "Function execution and build runtime.", - "x-example": "python-3.8" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentId": { - "type": "string", - "description": "Function's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "execute": "users", - "name": "My Function", - "enabled": false, - "live": false, - "logging": false, - "runtime": "python-3.8", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "scopes": "users.read", - "vars": [], - "events": "account.create", - "schedule": "5 4 * * *", - "timeout": 300, - "entrypoint": "index.js", - "commands": "npm install", - "version": "v2", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "functions\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb" - } - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { - "type": "string" - }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ], - "example": { - "$id": "python-3.8", - "key": "python", - "name": "Python", - "version": "3.8", - "base": "python:3.8-alpine", - "image": "appwrite\\\/runtime-for-python:3.8", - "logo": "python.png", - "supports": "amd64" - } - }, - "framework": { - "description": "Framework", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "buildRuntime": { - "type": "string", - "description": "Default runtime version.", - "x-example": "node-22" - }, - "runtimes": { - "type": "array", - "description": "List of supported runtime versions.", - "items": { - "type": "string" - }, - "x-example": [ - "static-1", - "node-22" - ] - }, - "adapters": { - "type": "array", - "description": "List of supported adapters.", - "items": { - "$ref": "#\/components\/schemas\/frameworkAdapter" - }, - "x-example": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "required": [ - "key", - "name", - "buildRuntime", - "runtimes", - "adapters" - ], - "example": { - "key": "sveltekit", - "name": "SvelteKit", - "buildRuntime": "node-22", - "runtimes": [ - "static-1", - "node-22" - ], - "adapters": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "frameworkAdapter": { - "description": "Framework Adapter", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Adapter key.", - "x-example": "static" - }, - "installCommand": { - "type": "string", - "description": "Default command to download dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Default command to build site into output directory.", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "Default output directory of build.", - "x-example": ".\/dist" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "key", - "installCommand", - "buildCommand", - "outputDirectory", - "fallbackFile" - ], - "example": { - "key": "static", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/dist", - "fallbackFile": "index.html" - } - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "sourceSize": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output size in bytes.", - "x-example": 128, - "format": "int32" - }, - "totalSize": { - "type": "integer", - "description": "The total size in bytes (source and build output).", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "screenshotLight": { - "type": "string", - "description": "Screenshot with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "screenshotDark": { - "type": "string", - "description": "Screenshot with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", - "x-example": "ready", - "enum": [ - "waiting", - "processing", - "building", - "ready", - "canceled", - "failed" - ] - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildDuration": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https:\/\/github.com\/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "sourceSize", - "buildSize", - "totalSize", - "buildId", - "activate", - "screenshotLight", - "screenshotDark", - "status", - "buildLogs", - "buildDuration", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranch", - "providerBranchUrl" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "type": "vcs", - "resourceId": "5e5ea6g16897e", - "resourceType": "functions", - "entrypoint": "index.js", - "sourceSize": 128, - "buildSize": 128, - "totalSize": 128, - "buildId": "5e5ea5c16897e", - "activate": true, - "screenshotLight": "5e5ea5c16897e", - "screenshotDark": "5e5ea5c16897e", - "status": "ready", - "buildLogs": "Compiling source files...", - "buildDuration": 128, - "providerRepositoryName": "database", - "providerRepositoryOwner": "utopia", - "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerCommitHash": "7c3f25d", - "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", - "providerCommitAuthor": "Khushboo Verma", - "providerCommitMessage": "Update index.js", - "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", - "providerBranch": "0.7.x", - "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": [ - "any" - ] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Project creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Project update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Project name.", - "x-example": "New Project" - }, - "description": { - "type": "string", - "description": "Project description.", - "x-example": "This is a new project." - }, - "teamId": { - "type": "string", - "description": "Project team ID.", - "x-example": "1592981250" - }, - "logo": { - "type": "string", - "description": "Project logo file ID.", - "x-example": "5f5c451b403cb" - }, - "url": { - "type": "string", - "description": "Project website URL.", - "x-example": "5f5c451b403cb" - }, - "legalName": { - "type": "string", - "description": "Company legal name.", - "x-example": "Company LTD." - }, - "legalCountry": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", - "x-example": "US" - }, - "legalState": { - "type": "string", - "description": "State name.", - "x-example": "New York" - }, - "legalCity": { - "type": "string", - "description": "City name.", - "x-example": "New York City." - }, - "legalAddress": { - "type": "string", - "description": "Company Address.", - "x-example": "620 Eighth Avenue, New York, NY 10018" - }, - "legalTaxId": { - "type": "string", - "description": "Company Tax ID.", - "x-example": "131102020" - }, - "authDuration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 60, - "format": "int32" - }, - "authLimit": { - "type": "integer", - "description": "Max users allowed. 0 is unlimited.", - "x-example": 100, - "format": "int32" - }, - "authSessionsLimit": { - "type": "integer", - "description": "Max sessions allowed per user. 100 maximum.", - "x-example": 10, - "format": "int32" - }, - "authPasswordHistory": { - "type": "integer", - "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", - "x-example": 5, - "format": "int32" - }, - "authPasswordDictionary": { - "type": "boolean", - "description": "Whether or not to check user's password against most commonly used passwords.", - "x-example": true - }, - "authPersonalDataCheck": { - "type": "boolean", - "description": "Whether or not to check the user password for similarity with their personal data.", - "x-example": true - }, - "authDisposableEmails": { - "type": "boolean", - "description": "Whether or not to disallow disposable email addresses during signup and email updates.", - "x-example": true - }, - "authCanonicalEmails": { - "type": "boolean", - "description": "Whether or not to require canonical email addresses during signup and email updates.", - "x-example": true - }, - "authFreeEmails": { - "type": "boolean", - "description": "Whether or not to disallow free email addresses during signup and email updates.", - "x-example": true - }, - "authMockNumbers": { - "type": "array", - "description": "An array of mock numbers and their corresponding verification codes (OTPs).", - "items": { - "$ref": "#\/components\/schemas\/mockNumber" - }, - "x-example": [ - {} - ] - }, - "authSessionAlerts": { - "type": "boolean", - "description": "Whether or not to send session alert emails to users.", - "x-example": true - }, - "authMembershipsUserName": { - "type": "boolean", - "description": "Whether or not to show user names in the teams membership response.", - "x-example": true - }, - "authMembershipsUserEmail": { - "type": "boolean", - "description": "Whether or not to show user emails in the teams membership response.", - "x-example": true - }, - "authMembershipsMfa": { - "type": "boolean", - "description": "Whether or not to show user MFA status in the teams membership response.", - "x-example": true - }, - "authMembershipsUserId": { - "type": "boolean", - "description": "Whether or not to show user IDs in the teams membership response.", - "x-example": true - }, - "authMembershipsUserPhone": { - "type": "boolean", - "description": "Whether or not to show user phone numbers in the teams membership response.", - "x-example": true - }, - "authInvalidateSessions": { - "type": "boolean", - "description": "Whether or not all existing sessions should be invalidated on password change", - "x-example": true - }, - "oAuthProviders": { - "type": "array", - "description": "List of Auth Providers.", - "items": { - "$ref": "#\/components\/schemas\/authProvider" - }, - "x-example": [ - {} - ] - }, - "platforms": { - "type": "array", - "description": "List of Platforms.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } - }, - "x-example": {} - }, - "webhooks": { - "type": "array", - "description": "List of Webhooks.", - "items": { - "$ref": "#\/components\/schemas\/webhook" - }, - "x-example": {} - }, - "keys": { - "type": "array", - "description": "List of API Keys.", - "items": { - "$ref": "#\/components\/schemas\/key" - }, - "x-example": {} - }, - "devKeys": { - "type": "array", - "description": "List of dev keys.", - "items": { - "$ref": "#\/components\/schemas\/devKey" - }, - "x-example": {} - }, - "smtpEnabled": { - "type": "boolean", - "description": "Status for custom SMTP", - "x-example": false - }, - "smtpSenderName": { - "type": "string", - "description": "SMTP sender name", - "x-example": "John Appwrite" - }, - "smtpSenderEmail": { - "type": "string", - "description": "SMTP sender email", - "x-example": "john@appwrite.io" - }, - "smtpReplyToName": { - "type": "string", - "description": "SMTP reply to name", - "x-example": "Support Team" - }, - "smtpReplyToEmail": { - "type": "string", - "description": "SMTP reply to email", - "x-example": "support@appwrite.io" - }, - "smtpHost": { - "type": "string", - "description": "SMTP server host name", - "x-example": "mail.appwrite.io" - }, - "smtpPort": { - "type": "integer", - "description": "SMTP server port", - "x-example": 25, - "format": "int32" - }, - "smtpUsername": { - "type": "string", - "description": "SMTP server username", - "x-example": "emailuser" - }, - "smtpPassword": { - "type": "string", - "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" - }, - "smtpSecure": { - "type": "string", - "description": "SMTP server secure protocol", - "x-example": "tls" - }, - "pingCount": { - "type": "integer", - "description": "Number of times the ping was received for this project.", - "x-example": 1, - "format": "int32" - }, - "pingedAt": { - "type": "string", - "description": "Last ping datetime in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "labels": { - "type": "array", - "description": "Labels for the project.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "status": { - "type": "string", - "description": "Project status.", - "x-example": "active" - }, - "authEmailPassword": { - "type": "boolean", - "description": "Email\/Password auth method status", - "x-example": true - }, - "authUsersAuthMagicURL": { - "type": "boolean", - "description": "Magic URL auth method status", - "x-example": true - }, - "authEmailOtp": { - "type": "boolean", - "description": "Email (OTP) auth method status", - "x-example": true - }, - "authAnonymous": { - "type": "boolean", - "description": "Anonymous auth method status", - "x-example": true - }, - "authInvites": { - "type": "boolean", - "description": "Invites auth method status", - "x-example": true - }, - "authJWT": { - "type": "boolean", - "description": "JWT auth method status", - "x-example": true - }, - "authPhone": { - "type": "boolean", - "description": "Phone auth method status", - "x-example": true - }, - "serviceStatusForAccount": { - "type": "boolean", - "description": "Account service status", - "x-example": true - }, - "serviceStatusForAvatars": { - "type": "boolean", - "description": "Avatars service status", - "x-example": true - }, - "serviceStatusForDatabases": { - "type": "boolean", - "description": "Databases (legacy) service status", - "x-example": true - }, - "serviceStatusForTablesdb": { - "type": "boolean", - "description": "TablesDB service status", - "x-example": true - }, - "serviceStatusForLocale": { - "type": "boolean", - "description": "Locale service status", - "x-example": true - }, - "serviceStatusForHealth": { - "type": "boolean", - "description": "Health service status", - "x-example": true - }, - "serviceStatusForProject": { - "type": "boolean", - "description": "Project service status", - "x-example": true - }, - "serviceStatusForStorage": { - "type": "boolean", - "description": "Storage service status", - "x-example": true - }, - "serviceStatusForTeams": { - "type": "boolean", - "description": "Teams service status", - "x-example": true - }, - "serviceStatusForUsers": { - "type": "boolean", - "description": "Users service status", - "x-example": true - }, - "serviceStatusForVcs": { - "type": "boolean", - "description": "VCS service status", - "x-example": true - }, - "serviceStatusForSites": { - "type": "boolean", - "description": "Sites service status", - "x-example": true - }, - "serviceStatusForFunctions": { - "type": "boolean", - "description": "Functions service status", - "x-example": true - }, - "serviceStatusForProxy": { - "type": "boolean", - "description": "Proxy service status", - "x-example": true - }, - "serviceStatusForGraphql": { - "type": "boolean", - "description": "GraphQL service status", - "x-example": true - }, - "serviceStatusForMigrations": { - "type": "boolean", - "description": "Migrations service status", - "x-example": true - }, - "serviceStatusForMessaging": { - "type": "boolean", - "description": "Messaging service status", - "x-example": true - }, - "protocolStatusForRest": { - "type": "boolean", - "description": "REST protocol status", - "x-example": true - }, - "protocolStatusForGraphql": { - "type": "boolean", - "description": "GraphQL protocol status", - "x-example": true - }, - "protocolStatusForWebsocket": { - "type": "boolean", - "description": "Websocket protocol status", - "x-example": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authDuration", - "authLimit", - "authSessionsLimit", - "authPasswordHistory", - "authPasswordDictionary", - "authPersonalDataCheck", - "authDisposableEmails", - "authCanonicalEmails", - "authFreeEmails", - "authMockNumbers", - "authSessionAlerts", - "authMembershipsUserName", - "authMembershipsUserEmail", - "authMembershipsMfa", - "authMembershipsUserId", - "authMembershipsUserPhone", - "authInvalidateSessions", - "oAuthProviders", - "platforms", - "webhooks", - "keys", - "devKeys", - "smtpEnabled", - "smtpSenderName", - "smtpSenderEmail", - "smtpReplyToName", - "smtpReplyToEmail", - "smtpHost", - "smtpPort", - "smtpUsername", - "smtpPassword", - "smtpSecure", - "pingCount", - "pingedAt", - "labels", - "status", - "authEmailPassword", - "authUsersAuthMagicURL", - "authEmailOtp", - "authAnonymous", - "authInvites", - "authJWT", - "authPhone", - "serviceStatusForAccount", - "serviceStatusForAvatars", - "serviceStatusForDatabases", - "serviceStatusForTablesdb", - "serviceStatusForLocale", - "serviceStatusForHealth", - "serviceStatusForProject", - "serviceStatusForStorage", - "serviceStatusForTeams", - "serviceStatusForUsers", - "serviceStatusForVcs", - "serviceStatusForSites", - "serviceStatusForFunctions", - "serviceStatusForProxy", - "serviceStatusForGraphql", - "serviceStatusForMigrations", - "serviceStatusForMessaging", - "protocolStatusForRest", - "protocolStatusForGraphql", - "protocolStatusForWebsocket" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "New Project", - "description": "This is a new project.", - "teamId": "1592981250", - "logo": "5f5c451b403cb", - "url": "5f5c451b403cb", - "legalName": "Company LTD.", - "legalCountry": "US", - "legalState": "New York", - "legalCity": "New York City.", - "legalAddress": "620 Eighth Avenue, New York, NY 10018", - "legalTaxId": "131102020", - "authDuration": 60, - "authLimit": 100, - "authSessionsLimit": 10, - "authPasswordHistory": 5, - "authPasswordDictionary": true, - "authPersonalDataCheck": true, - "authDisposableEmails": true, - "authCanonicalEmails": true, - "authFreeEmails": true, - "authMockNumbers": [ - {} - ], - "authSessionAlerts": true, - "authMembershipsUserName": true, - "authMembershipsUserEmail": true, - "authMembershipsMfa": true, - "authMembershipsUserId": true, - "authMembershipsUserPhone": true, - "authInvalidateSessions": true, - "oAuthProviders": [ - {} - ], - "platforms": {}, - "webhooks": {}, - "keys": {}, - "devKeys": {}, - "smtpEnabled": false, - "smtpSenderName": "John Appwrite", - "smtpSenderEmail": "john@appwrite.io", - "smtpReplyToName": "Support Team", - "smtpReplyToEmail": "support@appwrite.io", - "smtpHost": "mail.appwrite.io", - "smtpPort": 25, - "smtpUsername": "emailuser", - "smtpPassword": "", - "smtpSecure": "tls", - "pingCount": 1, - "pingedAt": "2020-10-15T06:38:00.000+00:00", - "labels": [ - "vip" - ], - "status": "active", - "authEmailPassword": true, - "authUsersAuthMagicURL": true, - "authEmailOtp": true, - "authAnonymous": true, - "authInvites": true, - "authJWT": true, - "authPhone": true, - "serviceStatusForAccount": true, - "serviceStatusForAvatars": true, - "serviceStatusForDatabases": true, - "serviceStatusForTablesdb": true, - "serviceStatusForLocale": true, - "serviceStatusForHealth": true, - "serviceStatusForProject": true, - "serviceStatusForStorage": true, - "serviceStatusForTeams": true, - "serviceStatusForUsers": true, - "serviceStatusForVcs": true, - "serviceStatusForSites": true, - "serviceStatusForFunctions": true, - "serviceStatusForProxy": true, - "serviceStatusForGraphql": true, - "serviceStatusForMigrations": true, - "serviceStatusForMessaging": true, - "protocolStatusForRest": true, - "protocolStatusForGraphql": true, - "protocolStatusForWebsocket": true - } - }, - "webhook": { - "description": "Webhook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Webhook ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Webhook creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Webhook update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Webhook name.", - "x-example": "My Webhook" - }, - "url": { - "type": "string", - "description": "Webhook URL endpoint.", - "x-example": "https:\/\/example.com\/webhook" - }, - "events": { - "type": "array", - "description": "Webhook trigger events.", - "items": { - "type": "string" - }, - "x-example": [ - "databases.tables.update", - "databases.collections.update" - ] - }, - "tls": { - "type": "boolean", - "description": "Indicates if SSL \/ TLS certificate verification is enabled.", - "x-example": true - }, - "authUsername": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "authPassword": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - }, - "secret": { - "type": "string", - "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", - "x-example": "ad3d581ca230e2b7059c545e5a" - }, - "enabled": { - "type": "boolean", - "description": "Indicates if this webhook is enabled.", - "x-example": true - }, - "logs": { - "type": "string", - "description": "Webhook error logs from the most recent failure.", - "x-example": "Failed to connect to remote server." - }, - "attempts": { - "type": "integer", - "description": "Number of consecutive failed webhook attempts.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "url", - "events", - "tls", - "authUsername", - "authPassword", - "secret", - "enabled", - "logs", - "attempts" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Webhook", - "url": "https:\/\/example.com\/webhook", - "events": [ - "databases.tables.update", - "databases.collections.update" - ], - "tls": true, - "authUsername": "username", - "authPassword": "password", - "secret": "ad3d581ca230e2b7059c545e5a", - "enabled": true, - "logs": "Failed to connect to remote server.", - "attempts": 10 - } - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "ephemeralKey": { - "description": "Ephemeral Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "devKey": { - "description": "DevKey", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "Dev API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Dev API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "mockNumber": { - "description": "Mock Number", - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", - "x-example": "+1612842323" - }, - "otp": { - "type": "string", - "description": "Mock OTP for the number. ", - "x-example": "123456" - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "number", - "otp", - "$createdAt", - "$updatedAt" - ], - "example": { - "number": "+1612842323", - "otp": "123456", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "oAuth2Github": { - "description": "OAuth2GitHub", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", - "x-example": "e4d87900000000540733" - }, - "clientSecret": { - "type": "string", - "description": "GitHub OAuth2 client secret.", - "x-example": "5e07c00000000000000000000000000000198bcc" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "e4d87900000000540733", - "clientSecret": "5e07c00000000000000000000000000000198bcc" - } - }, - "oAuth2Discord": { - "description": "OAuth2Discord", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Discord OAuth2 client ID.", - "x-example": "950722000000343754" - }, - "clientSecret": { - "type": "string", - "description": "Discord OAuth2 client secret.", - "x-example": "YmPXnM000000000000000000002zFg5D" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "950722000000343754", - "clientSecret": "YmPXnM000000000000000000002zFg5D" - } - }, - "oAuth2Figma": { - "description": "OAuth2Figma", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Figma OAuth2 client ID.", - "x-example": "byay5H0000000000VtiI40" - }, - "clientSecret": { - "type": "string", - "description": "Figma OAuth2 client secret.", - "x-example": "yEpOYn0000000000000000004iIsU5" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "byay5H0000000000VtiI40", - "clientSecret": "yEpOYn0000000000000000004iIsU5" - } - }, - "oAuth2Dropbox": { - "description": "OAuth2Dropbox", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appKey": { - "type": "string", - "description": "Dropbox OAuth2 app key.", - "x-example": "jl000000000009t" - }, - "appSecret": { - "type": "string", - "description": "Dropbox OAuth2 app secret.", - "x-example": "g200000000000vw" - } - }, - "required": [ - "$id", - "enabled", - "appKey", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appKey": "jl000000000009t", - "appSecret": "g200000000000vw" - } - }, - "oAuth2Dailymotion": { - "description": "OAuth2Dailymotion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Dailymotion OAuth2 API key.", - "x-example": "07a9000000000000067f" - }, - "apiSecret": { - "type": "string", - "description": "Dailymotion OAuth2 API secret.", - "x-example": "a399a90000000000000000000000000000d90639" - } - }, - "required": [ - "$id", - "enabled", - "apiKey", - "apiSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "apiKey": "07a9000000000000067f", - "apiSecret": "a399a90000000000000000000000000000d90639" - } - }, - "oAuth2Bitbucket": { - "description": "OAuth2Bitbucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "key": { - "type": "string", - "description": "Bitbucket OAuth2 key.", - "x-example": "Knt70000000000ByRc" - }, - "secret": { - "type": "string", - "description": "Bitbucket OAuth2 secret.", - "x-example": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "required": [ - "$id", - "enabled", - "key", - "secret" - ], - "example": { - "$id": "github", - "enabled": false, - "key": "Knt70000000000ByRc", - "secret": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "oAuth2Bitly": { - "description": "OAuth2Bitly", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Bitly OAuth2 client ID.", - "x-example": "d95151000000000000000000000000000067af9b" - }, - "clientSecret": { - "type": "string", - "description": "Bitly OAuth2 client secret.", - "x-example": "a13e250000000000000000000000000000d73095" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "d95151000000000000000000000000000067af9b", - "clientSecret": "a13e250000000000000000000000000000d73095" - } - }, - "oAuth2Box": { - "description": "OAuth2Box", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Box OAuth2 client ID.", - "x-example": "deglcs00000000000000000000x2og6y" - }, - "clientSecret": { - "type": "string", - "description": "Box OAuth2 client secret.", - "x-example": "OKM1f100000000000000000000eshEif" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "deglcs00000000000000000000x2og6y", - "clientSecret": "OKM1f100000000000000000000eshEif" - } - }, - "oAuth2Autodesk": { - "description": "OAuth2Autodesk", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Autodesk OAuth2 client ID.", - "x-example": "5zw90v00000000000000000000kVYXN7" - }, - "clientSecret": { - "type": "string", - "description": "Autodesk OAuth2 client secret.", - "x-example": "7I000000000000MW" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "5zw90v00000000000000000000kVYXN7", - "clientSecret": "7I000000000000MW" - } - }, - "oAuth2Google": { - "description": "OAuth2Google", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Google OAuth2 client ID.", - "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" - }, - "clientSecret": { - "type": "string", - "description": "Google OAuth2 client secret.", - "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "oAuth2Zoom": { - "description": "OAuth2Zoom", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoom OAuth2 client ID.", - "x-example": "QMAC00000000000000w0AQ" - }, - "clientSecret": { - "type": "string", - "description": "Zoom OAuth2 client secret.", - "x-example": "GAWsG4000000000000000000007U01ON" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "QMAC00000000000000w0AQ", - "clientSecret": "GAWsG4000000000000000000007U01ON" - } - }, - "oAuth2Zoho": { - "description": "OAuth2Zoho", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoho OAuth2 client ID.", - "x-example": "1000.83C178000000000000000000RPNX0B" - }, - "clientSecret": { - "type": "string", - "description": "Zoho OAuth2 client secret.", - "x-example": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "1000.83C178000000000000000000RPNX0B", - "clientSecret": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "oAuth2Yandex": { - "description": "OAuth2Yandex", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yandex OAuth2 client ID.", - "x-example": "6a8a6a0000000000000000000091483c" - }, - "clientSecret": { - "type": "string", - "description": "Yandex OAuth2 client secret.", - "x-example": "bbf98500000000000000000000c75a63" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6a8a6a0000000000000000000091483c", - "clientSecret": "bbf98500000000000000000000c75a63" - } - }, - "oAuth2X": { - "description": "OAuth2X", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "X OAuth2 customer key.", - "x-example": "slzZV0000000000000NFLaWT" - }, - "secretKey": { - "type": "string", - "description": "X OAuth2 secret key.", - "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "slzZV0000000000000NFLaWT", - "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "oAuth2WordPress": { - "description": "OAuth2WordPress", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "WordPress OAuth2 client ID.", - "x-example": "130005" - }, - "clientSecret": { - "type": "string", - "description": "WordPress OAuth2 client secret.", - "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "130005", - "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "oAuth2Twitch": { - "description": "OAuth2Twitch", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Twitch OAuth2 client ID.", - "x-example": "vvi0in000000000000000000ikmt9p" - }, - "clientSecret": { - "type": "string", - "description": "Twitch OAuth2 client secret.", - "x-example": "pmapue000000000000000000zylw3v" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "vvi0in000000000000000000ikmt9p", - "clientSecret": "pmapue000000000000000000zylw3v" - } - }, - "oAuth2Stripe": { - "description": "OAuth2Stripe", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Stripe OAuth2 client ID.", - "x-example": "ca_UKibXX0000000000000000000006byvR" - }, - "apiSecretKey": { - "type": "string", - "description": "Stripe OAuth2 API secret key.", - "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "apiSecretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "ca_UKibXX0000000000000000000006byvR", - "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "oAuth2Spotify": { - "description": "OAuth2Spotify", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Spotify OAuth2 client ID.", - "x-example": "6ec271000000000000000000009beace" - }, - "clientSecret": { - "type": "string", - "description": "Spotify OAuth2 client secret.", - "x-example": "db068a000000000000000000008b5b9f" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6ec271000000000000000000009beace", - "clientSecret": "db068a000000000000000000008b5b9f" - } - }, - "oAuth2Slack": { - "description": "OAuth2Slack", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Slack OAuth2 client ID.", - "x-example": "23000000089.15000000000023" - }, - "clientSecret": { - "type": "string", - "description": "Slack OAuth2 client secret.", - "x-example": "81656000000000000000000000f3d2fd" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "23000000089.15000000000023", - "clientSecret": "81656000000000000000000000f3d2fd" - } - }, - "oAuth2Podio": { - "description": "OAuth2Podio", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Podio OAuth2 client ID.", - "x-example": "appwrite-oauth-test-app" - }, - "clientSecret": { - "type": "string", - "description": "Podio OAuth2 client secret.", - "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-oauth-test-app", - "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "oAuth2Notion": { - "description": "OAuth2Notion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauthClientId": { - "type": "string", - "description": "Notion OAuth2 client ID.", - "x-example": "341d8700-0000-0000-0000-000000446ee3" - }, - "oauthClientSecret": { - "type": "string", - "description": "Notion OAuth2 client secret.", - "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "required": [ - "$id", - "enabled", - "oauthClientId", - "oauthClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", - "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "oAuth2Salesforce": { - "description": "OAuth2Salesforce", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "Salesforce OAuth2 consumer key.", - "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" - }, - "customerSecret": { - "type": "string", - "description": "Salesforce OAuth2 consumer secret.", - "x-example": "3w000000000000e2" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "customerSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "customerSecret": "3w000000000000e2" - } - }, - "oAuth2Yahoo": { - "description": "OAuth2Yahoo", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yahoo OAuth2 client ID.", - "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" - }, - "clientSecret": { - "type": "string", - "description": "Yahoo OAuth2 client secret.", - "x-example": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "clientSecret": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "oAuth2Linkedin": { - "description": "OAuth2Linkedin", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "LinkedIn OAuth2 client ID.", - "x-example": "770000000000dv" - }, - "primaryClientSecret": { - "type": "string", - "description": "LinkedIn OAuth2 primary client secret.", - "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "primaryClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "770000000000dv", - "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "oAuth2Disqus": { - "description": "OAuth2Disqus", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "publicKey": { - "type": "string", - "description": "Disqus OAuth2 public key.", - "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" - }, - "secretKey": { - "type": "string", - "description": "Disqus OAuth2 secret key.", - "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "required": [ - "$id", - "enabled", - "publicKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "oAuth2Amazon": { - "description": "OAuth2Amazon", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Amazon OAuth2 client ID.", - "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" - }, - "clientSecret": { - "type": "string", - "description": "Amazon OAuth2 client secret.", - "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "oAuth2Etsy": { - "description": "OAuth2Etsy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "keyString": { - "type": "string", - "description": "Etsy OAuth2 keystring.", - "x-example": "nsgzxh0000000000008j85a2" - }, - "sharedSecret": { - "type": "string", - "description": "Etsy OAuth2 shared secret.", - "x-example": "tp000000ru" - } - }, - "required": [ - "$id", - "enabled", - "keyString", - "sharedSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "keyString": "nsgzxh0000000000008j85a2", - "sharedSecret": "tp000000ru" - } - }, - "oAuth2Facebook": { - "description": "OAuth2Facebook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appId": { - "type": "string", - "description": "Facebook OAuth2 app ID.", - "x-example": "260600000007694" - }, - "appSecret": { - "type": "string", - "description": "Facebook OAuth2 app secret.", - "x-example": "2d0b2800000000000000000000d38af4" - } - }, - "required": [ - "$id", - "enabled", - "appId", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appId": "260600000007694", - "appSecret": "2d0b2800000000000000000000d38af4" - } - }, - "oAuth2Tradeshift": { - "description": "OAuth2Tradeshift", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauth2ClientId": { - "type": "string", - "description": "Tradeshift OAuth2 client ID.", - "x-example": "appwrite-test-org.appwrite-test-app" - }, - "oauth2ClientSecret": { - "type": "string", - "description": "Tradeshift OAuth2 client secret.", - "x-example": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "required": [ - "$id", - "enabled", - "oauth2ClientId", - "oauth2ClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauth2ClientId": "appwrite-test-org.appwrite-test-app", - "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "oAuth2Paypal": { - "description": "OAuth2Paypal", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "PayPal OAuth2 client ID.", - "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" - }, - "secretKey": { - "type": "string", - "description": "PayPal OAuth2 secret key.", - "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "oAuth2Gitlab": { - "description": "OAuth2Gitlab", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "GitLab OAuth2 application ID.", - "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" - }, - "secret": { - "type": "string", - "description": "GitLab OAuth2 secret.", - "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" - }, - "endpoint": { - "type": "string", - "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", - "x-example": "https:\/\/gitlab.com" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "secret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "endpoint": "https:\/\/gitlab.com" - } - }, - "oAuth2Authentik": { - "description": "OAuth2Authentik", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Authentik OAuth2 client ID.", - "x-example": "dTKOPa0000000000000000000000000000e7G8hv" - }, - "clientSecret": { - "type": "string", - "description": "Authentik OAuth2 client secret.", - "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" - }, - "endpoint": { - "type": "string", - "description": "Authentik OAuth2 endpoint domain.", - "x-example": "example.authentik.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dTKOPa0000000000000000000000000000e7G8hv", - "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "endpoint": "example.authentik.com" - } - }, - "oAuth2Auth0": { - "description": "OAuth2Auth0", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Auth0 OAuth2 client ID.", - "x-example": "OaOkIA000000000000000000005KLSYq" - }, - "clientSecret": { - "type": "string", - "description": "Auth0 OAuth2 client secret.", - "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" - }, - "endpoint": { - "type": "string", - "description": "Auth0 OAuth2 endpoint domain.", - "x-example": "example.us.auth0.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "OaOkIA000000000000000000005KLSYq", - "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "endpoint": "example.us.auth0.com" - } - }, - "oAuth2FusionAuth": { - "description": "OAuth2FusionAuth", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "FusionAuth OAuth2 client ID.", - "x-example": "b2222c00-0000-0000-0000-000000862097" - }, - "clientSecret": { - "type": "string", - "description": "FusionAuth OAuth2 client secret.", - "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" - }, - "endpoint": { - "type": "string", - "description": "FusionAuth OAuth2 endpoint domain.", - "x-example": "example.fusionauth.io" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "b2222c00-0000-0000-0000-000000862097", - "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", - "endpoint": "example.fusionauth.io" - } - }, - "oAuth2Keycloak": { - "description": "OAuth2Keycloak", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Keycloak OAuth2 client ID.", - "x-example": "appwrite-o0000000st-app" - }, - "clientSecret": { - "type": "string", - "description": "Keycloak OAuth2 client secret.", - "x-example": "jdjrJd00000000000000000000HUsaZO" - }, - "endpoint": { - "type": "string", - "description": "Keycloak OAuth2 endpoint domain.", - "x-example": "keycloak.example.com" - }, - "realmName": { - "type": "string", - "description": "Keycloak OAuth2 realm name.", - "x-example": "appwrite-realm" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint", - "realmName" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-o0000000st-app", - "clientSecret": "jdjrJd00000000000000000000HUsaZO", - "endpoint": "keycloak.example.com", - "realmName": "appwrite-realm" - } - }, - "oAuth2Oidc": { - "description": "OAuth2Oidc", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "OpenID Connect OAuth2 client ID.", - "x-example": "qibI2x0000000000000000000000000006L2YFoG" - }, - "clientSecret": { - "type": "string", - "description": "OpenID Connect OAuth2 client secret.", - "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", - "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/token" - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "wellKnownURL", - "authorizationURL", - "tokenUrl", - "userInfoUrl" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "qibI2x0000000000000000000000000006L2YFoG", - "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", - "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", - "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", - "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "oAuth2Okta": { - "description": "OAuth2Okta", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Okta OAuth2 client ID.", - "x-example": "0oa00000000000000698" - }, - "clientSecret": { - "type": "string", - "description": "Okta OAuth2 client secret.", - "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" - }, - "domain": { - "type": "string", - "description": "Okta OAuth2 domain.", - "x-example": "trial-6400025.okta.com" - }, - "authorizationServerId": { - "type": "string", - "description": "Okta OAuth2 authorization server ID.", - "x-example": "aus000000000000000h7z" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "domain", - "authorizationServerId" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "0oa00000000000000698", - "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "domain": "trial-6400025.okta.com", - "authorizationServerId": "aus000000000000000h7z" - } - }, - "oAuth2Kick": { - "description": "OAuth2Kick", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Kick OAuth2 client ID.", - "x-example": "01KQ7C00000000000001MFHS32" - }, - "clientSecret": { - "type": "string", - "description": "Kick OAuth2 client secret.", - "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "01KQ7C00000000000001MFHS32", - "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "oAuth2Apple": { - "description": "OAuth2Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "apple" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "serviceId": { - "type": "string", - "description": "Apple OAuth2 service ID.", - "x-example": "ip.appwrite.app.web" - }, - "keyId": { - "type": "string", - "description": "Apple OAuth2 key ID.", - "x-example": "P4000000N8" - }, - "teamId": { - "type": "string", - "description": "Apple OAuth2 team ID.", - "x-example": "D4000000R6" - }, - "p8File": { - "type": "string", - "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", - "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "required": [ - "$id", - "enabled", - "serviceId", - "keyId", - "teamId", - "p8File" - ], - "example": { - "$id": "apple", - "enabled": false, - "serviceId": "ip.appwrite.app.web", - "keyId": "P4000000N8", - "teamId": "D4000000R6", - "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "oAuth2Microsoft": { - "description": "OAuth2Microsoft", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "Microsoft OAuth2 application ID.", - "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" - }, - "applicationSecret": { - "type": "string", - "description": "Microsoft OAuth2 application secret.", - "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", - "x-example": "common" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "applicationSecret", - "tenant" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", - "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "tenant": "common" - } - }, - "oAuth2ProviderList": { - "description": "OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers in the given project.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of OAuth2 providers.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/oAuth2Github" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Discord" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Figma" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Box" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Google" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - }, - { - "$ref": "#\/components\/schemas\/oAuth2X" - }, - { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Slack" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Podio" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Notion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - }, - { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Apple" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Okta" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Kick" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/components\/schemas\/oAuth2Github", - "discord": "#\/components\/schemas\/oAuth2Discord", - "figma": "#\/components\/schemas\/oAuth2Figma", - "dropbox": "#\/components\/schemas\/oAuth2Dropbox", - "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", - "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", - "bitly": "#\/components\/schemas\/oAuth2Bitly", - "box": "#\/components\/schemas\/oAuth2Box", - "autodesk": "#\/components\/schemas\/oAuth2Autodesk", - "google": "#\/components\/schemas\/oAuth2Google", - "zoom": "#\/components\/schemas\/oAuth2Zoom", - "zoho": "#\/components\/schemas\/oAuth2Zoho", - "yandex": "#\/components\/schemas\/oAuth2Yandex", - "x": "#\/components\/schemas\/oAuth2X", - "wordpress": "#\/components\/schemas\/oAuth2WordPress", - "twitch": "#\/components\/schemas\/oAuth2Twitch", - "stripe": "#\/components\/schemas\/oAuth2Stripe", - "spotify": "#\/components\/schemas\/oAuth2Spotify", - "slack": "#\/components\/schemas\/oAuth2Slack", - "podio": "#\/components\/schemas\/oAuth2Podio", - "notion": "#\/components\/schemas\/oAuth2Notion", - "salesforce": "#\/components\/schemas\/oAuth2Salesforce", - "yahoo": "#\/components\/schemas\/oAuth2Yahoo", - "linkedin": "#\/components\/schemas\/oAuth2Linkedin", - "disqus": "#\/components\/schemas\/oAuth2Disqus", - "amazon": "#\/components\/schemas\/oAuth2Amazon", - "etsy": "#\/components\/schemas\/oAuth2Etsy", - "facebook": "#\/components\/schemas\/oAuth2Facebook", - "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", - "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", - "paypal": "#\/components\/schemas\/oAuth2Paypal", - "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", - "gitlab": "#\/components\/schemas\/oAuth2Gitlab", - "authentik": "#\/components\/schemas\/oAuth2Authentik", - "auth0": "#\/components\/schemas\/oAuth2Auth0", - "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", - "keycloak": "#\/components\/schemas\/oAuth2Keycloak", - "oidc": "#\/components\/schemas\/oAuth2Oidc", - "apple": "#\/components\/schemas\/oAuth2Apple", - "okta": "#\/components\/schemas\/oAuth2Okta", - "kick": "#\/components\/schemas\/oAuth2Kick", - "microsoft": "#\/components\/schemas\/oAuth2Microsoft" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "policyPasswordDictionary": { - "description": "Policy Password Dictionary", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password dictionary policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyPasswordHistory": { - "description": "Policy Password History", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Password history length. A value of 0 means the policy is disabled.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 5 - } - }, - "policyPasswordPersonalData": { - "description": "Policy Password Personal Data", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password personal data policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionAlert": { - "description": "Policy Session Alert", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session alert policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionDuration": { - "description": "Policy Session Duration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "duration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 3600, - "format": "int32" - } - }, - "required": [ - "$id", - "duration" - ], - "example": { - "$id": "password-dictionary", - "duration": 3600 - } - }, - "policySessionInvalidation": { - "description": "Policy Session Invalidation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session invalidation policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionLimit": { - "description": "Policy Session Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 10 - } - }, - "policyUserLimit": { - "description": "Policy User Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", - "x-example": 100, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 100 - } - }, - "policyMembershipPrivacy": { - "description": "Policy Membership Privacy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "userId": { - "type": "boolean", - "description": "Whether user ID is visible in memberships.", - "x-example": true - }, - "userEmail": { - "type": "boolean", - "description": "Whether user email is visible in memberships.", - "x-example": true - }, - "userPhone": { - "type": "boolean", - "description": "Whether user phone is visible in memberships.", - "x-example": true - }, - "userName": { - "type": "boolean", - "description": "Whether user name is visible in memberships.", - "x-example": true - }, - "userMFA": { - "type": "boolean", - "description": "Whether user MFA status is visible in memberships.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "userEmail", - "userPhone", - "userName", - "userMFA" - ], - "example": { - "$id": "password-dictionary", - "userId": true, - "userEmail": true, - "userPhone": true, - "userName": true, - "userMFA": true - } - }, - "authProvider": { - "description": "AuthProvider", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Auth Provider.", - "x-example": "github" - }, - "name": { - "type": "string", - "description": "Auth Provider name.", - "x-example": "GitHub" - }, - "appId": { - "type": "string", - "description": "OAuth 2.0 application ID.", - "x-example": "259125845563242502" - }, - "secret": { - "type": "string", - "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Auth Provider is active and can be used to create session.", - "x-example": "" - } - }, - "required": [ - "key", - "name", - "appId", - "secret", - "enabled" - ], - "example": { - "key": "github", - "name": "GitHub", - "appId": "259125845563242502", - "secret": "", - "enabled": "" - } - }, - "platformWeb": { - "description": "Platform Web", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": "app.example.com" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "hostname", - "key" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "hostname": "app.example.com" - } - }, - "platformApple": { - "description": "Platform Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "bundleIdentifier" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "bundleIdentifier": "com.company.appname" - } - }, - "platformAndroid": { - "description": "Platform Android", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "applicationId": { - "type": "string", - "description": "Android application ID.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "applicationId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "applicationId": "com.company.appname" - } - }, - "platformWindows": { - "description": "Platform Windows", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageIdentifierName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageIdentifierName": "com.company.appname" - } - }, - "platformLinux": { - "description": "Platform Linux", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageName": { - "type": "string", - "description": "Linux package name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageName": "com.company.appname" - } - }, - "platformList": { - "description": "Platforms List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of platforms in the given project.", - "x-example": 5, - "format": "int32" - }, - "platforms": { - "type": "array", - "description": "List of platforms.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "platforms" - ], - "example": { - "total": 5, - "platforms": "" - } - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "secret", - "resourceType", - "resourceId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "API_KEY", - "value": "myPa$$word1", - "secret": false, - "resourceType": "function", - "resourceId": "myAwesomeFunction" - } - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", - "x-example": "online", - "enum": [ - "disabled", - "offline", - "online" - ] - } - }, - "required": [ - "version", - "status" - ], - "example": { - "version": "1.0.0", - "status": "online" - } - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": [ - "size" - ], - "example": { - "size": 8 - } - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values are: `pass`, `fail`", - "x-example": "pass", - "enum": [ - "pass", - "fail" - ], - "x-enum-name": "HealthCheckStatus" - } - }, - "required": [ - "name", - "ping", - "status" - ], - "example": { - "name": "database", - "ping": 128, - "status": "pass" - } - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "\/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ], - "example": { - "name": "\/CN=www.google.com", - "subjectSN": "", - "issuerOrganisation": "", - "validFrom": "1704200998", - "validTo": "1711458597", - "signatureTypeSN": "RSA-SHA256" - } - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": [ - "remoteTime", - "localTime", - "diff" - ], - "example": { - "remoteTime": 1639490751, - "localTime": 1639490844, - "diff": 93 - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application\/json" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "Content-Type", - "value": "application\/json" - } - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "memory", - "cpus", - "enabled", - "slug" - ], - "example": { - "memory": 512, - "cpus": 1, - "enabled": true, - "slug": "s-1vcpu-512mb" - } - }, - "emailTemplate": { - "description": "EmailTemplate", - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Template type", - "x-example": "verification" - }, - "locale": { - "type": "string", - "description": "Template locale", - "x-example": "en_us" - }, - "message": { - "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." - }, - "senderName": { - "type": "string", - "description": "Name of the sender", - "x-example": "My User" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" - }, - "replyToName": { - "type": "string", - "description": "Reply to name", - "x-example": "Support Team" - }, - "subject": { - "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" - } - }, - "required": [ - "templateId", - "locale", - "message", - "senderName", - "senderEmail", - "replyToEmail", - "replyToName", - "subject" - ], - "example": { - "templateId": "verification", - "locale": "en_us", - "message": "Click on the link to verify your account.", - "senderName": "My User", - "senderEmail": "mail@appwrite.io", - "replyToEmail": "emails@appwrite.io", - "replyToName": "Support Team", - "subject": "Please verify your email address" - } - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": [ - "totp", - "phone", - "email", - "recoveryCode" - ], - "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true - } - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - }, - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Mailgun", - "provider": "mailgun", - "enabled": true, - "type": "sms", - "credentials": { - "key": "123456789" - }, - "options": { - "from": "sender-email@mydomain" - } - } - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "processing", - "enum": [ - "draft", - "processing", - "scheduled", - "sent", - "failed" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "topics": [ - "5e5ea5c16897e" - ], - "users": [ - "5e5ea5c16897e" - ], - "targets": [ - "5e5ea5c16897e" - ], - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "deliveredAt": "2020-10-15T06:38:00.000+00:00", - "deliveryErrors": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "deliveredTotal": 1, - "data": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - }, - "status": "processing" - } - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "events", - "emailTotal": 100, - "smsTotal": 100, - "pushTotal": 100, - "subscribe": "users" - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" - }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "$ref": "#\/components\/schemas\/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" - } - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false - } - } - }, - "securitySchemes": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Session": { - "type": "apiKey", - "name": "X-Appwrite-Session", - "description": "The user session to authenticate with", - "in": "header" - }, - "ForwardedUserAgent": { - "type": "apiKey", - "name": "X-Forwarded-User-Agent", - "description": "The user agent string of the client that made the request", - "in": "header" - }, - "ImpersonateUserId": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Id", - "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserEmail": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Email", - "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserPhone": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Phone", - "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - } - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https:\/\/appwrite.io\/docs" - } -} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json deleted file mode 100644 index 65e4f12ddf..0000000000 --- a/app/config/specs/swagger2-latest-client.json +++ /dev/null @@ -1,17510 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.9.3", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", - "termsOfService": "https:\/\/appwrite.io\/policy\/terms", - "contact": { - "name": "Appwrite Team", - "url": "https:\/\/appwrite.io\/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" - } - }, - "host": "cloud.appwrite.io", - "x-host-docs": "<REGION>.cloud.appwrite.io", - "basePath": "\/v1", - "schemes": [ - "https" - ], - "consumes": [ - "application\/json", - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "securityDefinitions": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Session": { - "type": "apiKey", - "name": "X-Appwrite-Session", - "description": "The user session to authenticate with", - "in": "header" - }, - "DevKey": { - "type": "apiKey", - "name": "X-Appwrite-Dev-Key", - "description": "Your secret dev API key", - "in": "header" - }, - "ImpersonateUserId": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Id", - "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserEmail": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Email", - "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserPhone": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Phone", - "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - } - }, - "paths": { - "\/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "account", - "weight": 9, - "cookies": false, - "type": "", - "demo": "account\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create account", - "operationId": "accountCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "account", - "weight": 8, - "cookies": false, - "type": "", - "demo": "account\/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "account", - "weight": 34, - "cookies": false, - "type": "", - "demo": "account\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#\/definitions\/identityList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/account\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#\/definitions\/jwt" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "tokens", - "weight": 29, - "cookies": false, - "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } - ] - } - }, - "\/account\/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 31, - "cookies": false, - "type": "", - "demo": "account\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMFA", - "group": "mfa", - "weight": 166, - "cookies": false, - "type": "", - "demo": "account\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - ] - } - }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "schema": { - "$ref": "#\/definitions\/mfaType" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", - "weight": 168, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", - "weight": 169, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - ] - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 170, - "cookies": false, - "type": "", - "demo": "account\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/account\/mfa\/challenges": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "schema": { - "$ref": "#\/definitions\/mfaChallenge" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", - "weight": 174, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "default": null, - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": [ - "factor" - ] - } - } - ] - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", - "weight": 175, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } - }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "default": null, - "x-example": "<CHALLENGE_ID>" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "challengeId", - "otp" - ] - } - } - ] - } - }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#\/definitions\/mfaFactors" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 167, - "cookies": false, - "type": "", - "demo": "account\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 173, - "cookies": false, - "type": "", - "demo": "account\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 171, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 172, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "weight": 32, - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "account", - "weight": 33, - "cookies": false, - "type": "", - "demo": "account\/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - ] - } - }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "account", - "weight": 35, - "cookies": false, - "type": "", - "demo": "account\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - ] - } - }, - "\/account\/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "account", - "weight": 30, - "cookies": false, - "type": "", - "demo": "account\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "account", - "weight": 36, - "cookies": false, - "type": "", - "demo": "account\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRecovery", - "group": "recovery", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - ] - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", - "weight": 39, - "cookies": false, - "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "<SECRET>" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - } - }, - "required": [ - "userId", - "secret", - "password" - ] - } - } - ] - } - }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#\/definitions\/sessionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 11, - "cookies": false, - "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 12, - "cookies": false, - "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", - "weight": 17, - "cookies": false, - "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", - "weight": 16, - "cookies": false, - "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/sessions\/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", - "weight": 26, - "cookies": false, - "type": "", - "demo": "account\/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 session", - "operationId": "accountCreateOAuth2Session", - "consumes": [], - "produces": [ - "text\/html" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "301": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Session", - "group": "sessions", - "weight": 19, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "weight": 27, - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 18, - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/{sessionId}": { - "get": { - "summary": "Get session", - "operationId": "accountGetSession", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSession", - "group": "sessions", - "weight": 13, - "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSession", - "group": "sessions", - "weight": 15, - "cookies": false, - "type": "", - "demo": "account\/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 14, - "cookies": false, - "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "account", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/targets\/push": { - "post": { - "summary": "Create push target", - "operationId": "accountCreatePushTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPushTarget", - "group": "pushTargets", - "weight": 44, - "cookies": false, - "type": "", - "demo": "account\/create-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TARGET_ID>" - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - } - }, - "required": [ - "targetId", - "identifier" - ] - } - } - ] - } - }, - "\/account\/targets\/{targetId}\/push": { - "put": { - "summary": "Update push target", - "operationId": "accountUpdatePushTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePushTarget", - "group": "pushTargets", - "weight": 45, - "cookies": false, - "type": "", - "demo": "account\/update-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - } - }, - "required": [ - "identifier" - ] - } - } - ] - }, - "delete": { - "summary": "Delete push target", - "operationId": "accountDeletePushTarget", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePushTarget", - "group": "pushTargets", - "weight": 46, - "cookies": false, - "type": "", - "demo": "account\/delete-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "\/account\/tokens\/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailToken", - "group": "tokens", - "weight": 25, - "cookies": false, - "type": "", - "demo": "account\/create-email-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - ] - } - }, - "\/account\/tokens\/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMagicURLToken", - "group": "tokens", - "weight": 24, - "cookies": false, - "type": "", - "demo": "account\/create-magic-url-token.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - ] - } - }, - "\/account\/tokens\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "consumes": [], - "produces": [ - "text\/html" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "301": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Token", - "group": "tokens", - "weight": 23, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-token.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/account\/tokens\/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneToken", - "group": "tokens", - "weight": 28, - "cookies": false, - "type": "", - "demo": "account\/create-phone-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},phone:{param-phone}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "userId", - "phone" - ] - } - } - ] - } - }, - "\/account\/verifications\/email": { - "post": { - "summary": "Create email verification", - "operationId": "accountCreateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailVerification", - "group": "verification", - "weight": 40, - "cookies": false, - "type": "", - "demo": "account\/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", - "methods": [ - { - "name": "createEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-email-verification.md", - "public": true - }, - { - "name": "createVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "url" - ] - } - } - ] - }, - "put": { - "summary": "Update email verification (confirmation)", - "operationId": "accountUpdateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "verification", - "weight": 41, - "cookies": false, - "type": "", - "demo": "account\/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", - "methods": [ - { - "name": "updateEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-email-verification.md", - "public": true - }, - { - "name": "updateVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/verifications\/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneVerification", - "group": "verification", - "weight": 42, - "cookies": false, - "type": "", - "demo": "account\/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},userId:{userId}", - "url:{url},ip:{ip}" - ], - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "verification", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account\/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBrowser", - "group": null, - "weight": 177, - "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCreditCard", - "group": null, - "weight": 176, - "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", - "required": true, - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFavicon", - "group": null, - "weight": 180, - "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - } - ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFlag", - "group": null, - "weight": 178, - "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getImage", - "group": null, - "weight": 179, - "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "\/avatars\/initials": { - "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInitials", - "group": null, - "weight": 182, - "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "", - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - } - ] - } - }, - "\/avatars\/qr": { - "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQR", - "group": null, - "weight": 181, - "cookies": false, - "type": "location", - "demo": "avatars\/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "<TEXT>", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "\/avatars\/screenshots": { - "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getScreenshot", - "group": null, - "weight": 183, - "cookies": false, - "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to capture.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "type": "object", - "default": [], - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", - "in": "query" - }, - { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "1920", - "default": 1280, - "in": "query" - }, - { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "1080", - "default": 720, - "in": "query" - }, - { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": "2", - "default": 1, - "in": "query" - }, - { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "light", - "in": "query" - }, - { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "", - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "type": "boolean", - "x-example": "true", - "default": false, - "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "en-US", - "default": "", - "in": "query" - }, - { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "america\/new_york", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "", - "in": "query" - }, - { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0, - "in": "query" - }, - { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0, - "in": "query" - }, - { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "100", - "default": 0, - "in": "query" - }, - { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, - "type": "boolean", - "x-example": "true", - "default": false, - "in": "query" - }, - { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [], - "in": "query" - }, - { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0, - "in": "query" - }, - { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "", - "in": "query" - } - ] - } - }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 259, - "cookies": false, - "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 255, - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 256, - "cookies": false, - "type": "", - "demo": "databases\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 257, - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 258, - "cookies": false, - "type": "", - "demo": "databases\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 260, - "cookies": false, - "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 210, - "cookies": false, - "type": "", - "demo": "databases\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 202, - "cookies": false, - "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 203, - "cookies": false, - "type": "", - "demo": "databases\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 206, - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 204, - "cookies": false, - "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 208, - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Decrement a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 213, - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Increment a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 212, - "cookies": false, - "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 366, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 362, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 363, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 364, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 365, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 367, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 359, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 351, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 352, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 355, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 353, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 357, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 361, - "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 360, - "cookies": false, - "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/functions\/{functionId}\/executions": { - "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#\/definitions\/executionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listExecutions", - "group": "executions", - "weight": 438, - "cookies": false, - "type": "", - "demo": "functions\/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "consumes": [ - "application\/json" - ], - "produces": [ - "multipart\/form-data" - ], - "tags": [ - "functions" - ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createExecution", - "group": "executions", - "weight": 436, - "cookies": false, - "type": "", - "demo": "functions\/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "default": false, - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "default": "\/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "default": "POST", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "default": null, - "x-example": "<SCHEDULED_AT>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getExecution", - "group": "executions", - "weight": 437, - "cookies": false, - "type": "", - "demo": "functions\/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - } - }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#\/definitions\/any" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "query", - "group": "graphql", - "weight": 117, - "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - ] - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#\/definitions\/any" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "mutation", - "group": "graphql", - "weight": 116, - "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - ] - } - }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "schema": { - "$ref": "#\/definitions\/locale" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 49, - "cookies": false, - "type": "", - "demo": "locale\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "schema": { - "$ref": "#\/definitions\/localeCodeList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCodes", - "group": null, - "weight": 50, - "cookies": false, - "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "schema": { - "$ref": "#\/definitions\/continentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listContinents", - "group": null, - "weight": 54, - "cookies": false, - "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountries", - "group": null, - "weight": 51, - "cookies": false, - "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesEU", - "group": null, - "weight": 52, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "schema": { - "$ref": "#\/definitions\/phoneList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesPhones", - "group": null, - "weight": 53, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "schema": { - "$ref": "#\/definitions\/currencyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCurrencies", - "group": null, - "weight": 55, - "cookies": false, - "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "schema": { - "$ref": "#\/definitions\/languageList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, - "weight": 56, - "cookies": false, - "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "schema": { - "$ref": "#\/definitions\/subscriber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", - "weight": 150, - "cookies": false, - "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "default": null, - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "default": null, - "x-example": "<TARGET_ID>" - } - }, - "required": [ - "subscriberId", - "targetId" - ] - } - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "weight": 154, - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - } - }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesListPresences", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "List presence logs.", - "responses": { - "200": { - "description": "Presences List", - "schema": { - "$ref": "#\/definitions\/presenceList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPresences", - "group": "presences", - "weight": 416, - "cookies": false, - "type": "", - "demo": "presences\/list-presences.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGetPresence", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Get a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPresence", - "group": "presences", - "weight": 415, - "cookies": false, - "type": "", - "demo": "presences\/get-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsertPresence", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Create or update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertPresence", - "group": "presences", - "weight": 413, - "cookies": false, - "type": "", - "demo": "presences\/upsert-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "upsertPresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/presence" - } - ], - "description": "", - "demo": "presences\/upsert-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "default": null, - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": [], - "x-example": "{}" - } - }, - "required": [ - "status" - ] - } - } - ] - }, - "patch": { - "summary": "Update presence", - "operationId": "presencesUpdatePresence", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePresence", - "group": "presences", - "weight": 417, - "cookies": false, - "type": "", - "demo": "presences\/update-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "updatePresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "status", - "expiresAt", - "metadata", - "permissions" - ], - "required": [ - "presenceId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/presence" - } - ], - "description": "", - "demo": "presences\/update-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "default": null, - "x-example": "<STATUS>", - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDeletePresence", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "presences" - ], - "description": "Delete a presence log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePresence", - "group": "presences", - "weight": 418, - "cookies": false, - "type": "", - "demo": "presences\/delete-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Files List", - "schema": { - "$ref": "#\/definitions\/fileList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFiles", - "group": "files", - "weight": 550, - "cookies": false, - "type": "", - "demo": "storage\/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFile", - "group": "files", - "weight": 548, - "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "x-upload-id": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "formData" - }, - { - "name": "file", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "permissions", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "x-example": "[\"read(\"any\")\"]", - "in": "formData" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "Get file", - "operationId": "storageGetFile", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFile", - "group": "files", - "weight": 549, - "cookies": false, - "type": "", - "demo": "storage\/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFile", - "group": "files", - "weight": 551, - "cookies": false, - "type": "", - "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "storage" - ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "weight": 552, - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { - "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileDownload", - "group": "files", - "weight": 554, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFilePreview", - "group": "files", - "weight": 553, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "type": "string", - "x-example": "center", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "default": "center", - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "", - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileView", - "group": "files", - "weight": 555, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 332, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 328, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 329, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 330, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 331, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 333, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 324, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 316, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<ROW_ID>" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 317, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 320, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 318, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 322, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 327, - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 326, - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/teams": { - "get": { - "summary": "List teams", - "operationId": "teamsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", - "responses": { - "200": { - "description": "Teams List", - "schema": { - "$ref": "#\/definitions\/teamList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "teams", - "weight": 526, - "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "teams", - "weight": 524, - "cookies": false, - "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TEAM_ID>" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": [ - "owner" - ], - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } - ] - } - }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "teams", - "weight": 525, - "cookies": false, - "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "teams", - "weight": 528, - "cookies": false, - "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "teams" - ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "teams", - "weight": 527, - "cookies": false, - "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#\/definitions\/membershipList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 533, - "cookies": false, - "type": "", - "demo": "teams\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMembership", - "group": "memberships", - "weight": 531, - "cookies": false, - "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "default": "", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "roles" - ] - } - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { - "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMembership", - "group": "memberships", - "weight": 532, - "cookies": false, - "type": "", - "demo": "teams\/get-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembership", - "group": "memberships", - "weight": 534, - "cookies": false, - "type": "", - "demo": "teams\/update-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - ] - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "teams" - ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", - "weight": 535, - "cookies": false, - "type": "", - "demo": "teams\/delete-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { - "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", - "weight": 536, - "cookies": false, - "type": "", - "demo": "teams\/update-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "teams", - "weight": 529, - "cookies": false, - "type": "", - "demo": "teams\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "teams", - "weight": 530, - "cookies": false, - "type": "", - "demo": "teams\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 399, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 395, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 396, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 397, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 398, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 400, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 389, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 385, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 388, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 387, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 386, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 390, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - } - ], - "definitions": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] - }, - "rowList": { - "description": "Rows List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rows that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "List of rows.", - "items": { - "type": "object", - "$ref": "#\/definitions\/row" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rows" - ], - "example": { - "total": 5, - "rows": "" - } - }, - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/document" - }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "type": "object", - "$ref": "#\/definitions\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/session" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sessions" - ], - "example": { - "total": 5, - "sessions": "" - } - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "type": "object", - "$ref": "#\/definitions\/identity" - }, - "x-example": "" - } - }, - "required": [ - "total", - "identities" - ], - "example": { - "total": 5, - "identities": "" - } - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { - "type": "object", - "$ref": "#\/definitions\/log" - }, - "x-example": "" - } - }, - "required": [ - "total", - "logs" - ], - "example": { - "total": 5, - "logs": "" - } - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "type": "object", - "$ref": "#\/definitions\/file" - }, - "x-example": "" - } - }, - "required": [ - "total", - "files" - ], - "example": { - "total": 5, - "files": "" - } - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "type": "object", - "$ref": "#\/definitions\/team" - }, - "x-example": "" - } - }, - "required": [ - "total", - "teams" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { - "type": "object", - "$ref": "#\/definitions\/membership" - }, - "x-example": "" - } - }, - "required": [ - "total", - "memberships" - ], - "example": { - "total": 5, - "memberships": "" - } - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/execution" - }, - "x-example": "" - } - }, - "required": [ - "total", - "executions" - ], - "example": { - "total": 5, - "executions": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "type": "object", - "$ref": "#\/definitions\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "type": "object", - "$ref": "#\/definitions\/language" - }, - "x-example": "" - } - }, - "required": [ - "total", - "languages" - ], - "example": { - "total": 5, - "languages": "" - } - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "type": "object", - "$ref": "#\/definitions\/currency" - }, - "x-example": "" - } - }, - "required": [ - "total", - "currencies" - ], - "example": { - "total": 5, - "currencies": "" - } - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "type": "object", - "$ref": "#\/definitions\/phone" - }, - "x-example": "" - } - }, - "required": [ - "total", - "phones" - ], - "example": { - "total": 5, - "phones": "" - } - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/localeCode" - }, - "x-example": "" - } - }, - "required": [ - "total", - "localeCodes" - ], - "example": { - "total": 5, - "localeCodes": "" - } - }, - "transactionList": { - "description": "Transaction List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/transaction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "transactions" - ], - "example": { - "total": 5, - "transactions": "" - } - }, - "row": { - "description": "Row", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] - } - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false - } - }, - "presence": { - "description": "Presence", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Presence sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Presence creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Presence update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userInternalId": { - "type": "string", - "description": "User internal ID.", - "x-example": "1" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "x-nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", - "required": [ - "$id", - "$sequence", - "$createdAt", - "$updatedAt", - "$permissions", - "userInternalId", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userInternalId": "1", - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ], - "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" - } - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "x-nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "x-nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/algoArgon2" - }, - { - "$ref": "#\/definitions\/algoScrypt" - }, - { - "$ref": "#\/definitions\/algoScryptModified" - }, - { - "$ref": "#\/definitions\/algoBcrypt" - }, - { - "$ref": "#\/definitions\/algoPhpass" - }, - { - "$ref": "#\/definitions\/algoSha" - }, - { - "$ref": "#\/definitions\/algoMd5" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/definitions\/algoArgon2", - "scrypt": "#\/definitions\/algoScrypt", - "scryptMod": "#\/definitions\/algoScryptModified", - "bcrypt": "#\/definitions\/algoBcrypt", - "phpass": "#\/definitions\/algoPhpass", - "sha": "#\/definitions\/algoSha", - "md5": "#\/definitions\/algoMd5" - } - } - }, - "x-nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/preferences" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "x-nullable": true - }, - "impersonatorUserId": { - "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" - } - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" - } - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": [ - "jwt" - ], - "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the European Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ], - "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" - } - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": [ - "code", - "name" - ], - "example": { - "code": "en-us", - "name": "US" - } - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true - }, - "compression": { - "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" - ], - "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" - } - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } - } - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": [ - "owner" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "roles": [ - "owner" - ] - } - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": [ - "any" - ] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#\/definitions\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#\/definitions\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application\/json" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "Content-Type", - "value": "application\/json" - } - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": [ - "totp", - "phone", - "email", - "recoveryCode" - ], - "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" - }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" - } - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "x-nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false - } - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https:\/\/appwrite.io\/docs" - } -} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json deleted file mode 100644 index b067339b66..0000000000 --- a/app/config/specs/swagger2-latest-console.json +++ /dev/null @@ -1,80584 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.9.3", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", - "termsOfService": "https:\/\/appwrite.io\/policy\/terms", - "contact": { - "name": "Appwrite Team", - "url": "https:\/\/appwrite.io\/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" - } - }, - "host": "cloud.appwrite.io", - "x-host-docs": "<REGION>.cloud.appwrite.io", - "basePath": "\/v1", - "schemes": [ - "https" - ], - "consumes": [ - "application\/json", - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "securityDefinitions": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Mode": { - "type": "apiKey", - "name": "X-Appwrite-Mode", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "" - } - }, - "Cookie": { - "type": "apiKey", - "name": "Cookie", - "description": "The user cookie to authenticate with", - "in": "header" - }, - "ImpersonateUserId": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Id", - "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserEmail": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Email", - "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserPhone": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Phone", - "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - } - }, - "paths": { - "\/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "account", - "weight": 9, - "cookies": false, - "type": "", - "demo": "account\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create account", - "operationId": "accountCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "account", - "weight": 8, - "cookies": false, - "type": "", - "demo": "account\/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - }, - "delete": { - "summary": "Delete account", - "operationId": "accountDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete the currently logged in user.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "account", - "weight": 10, - "cookies": false, - "type": "", - "demo": "account\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "account", - "weight": 34, - "cookies": false, - "type": "", - "demo": "account\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#\/definitions\/identityList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/account\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#\/definitions\/jwt" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "tokens", - "weight": 29, - "cookies": false, - "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } - ] - } - }, - "\/account\/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 31, - "cookies": false, - "type": "", - "demo": "account\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMFA", - "group": "mfa", - "weight": 166, - "cookies": false, - "type": "", - "demo": "account\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - ] - } - }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "schema": { - "$ref": "#\/definitions\/mfaType" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", - "weight": 168, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", - "weight": 169, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - ] - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 170, - "cookies": false, - "type": "", - "demo": "account\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/account\/mfa\/challenges": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "schema": { - "$ref": "#\/definitions\/mfaChallenge" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", - "weight": 174, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "default": null, - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": [ - "factor" - ] - } - } - ] - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", - "weight": 175, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } - }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "default": null, - "x-example": "<CHALLENGE_ID>" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "challengeId", - "otp" - ] - } - } - ] - } - }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#\/definitions\/mfaFactors" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 167, - "cookies": false, - "type": "", - "demo": "account\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 173, - "cookies": false, - "type": "", - "demo": "account\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 171, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 172, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "weight": 32, - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "account", - "weight": 33, - "cookies": false, - "type": "", - "demo": "account\/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - ] - } - }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "account", - "weight": 35, - "cookies": false, - "type": "", - "demo": "account\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - ] - } - }, - "\/account\/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "account", - "weight": 30, - "cookies": false, - "type": "", - "demo": "account\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "account", - "weight": 36, - "cookies": false, - "type": "", - "demo": "account\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRecovery", - "group": "recovery", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - ] - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", - "weight": 39, - "cookies": false, - "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "<SECRET>" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - } - }, - "required": [ - "userId", - "secret", - "password" - ] - } - } - ] - } - }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#\/definitions\/sessionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 11, - "cookies": false, - "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 12, - "cookies": false, - "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", - "weight": 17, - "cookies": false, - "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", - "weight": 16, - "cookies": false, - "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/sessions\/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", - "weight": 26, - "cookies": false, - "type": "", - "demo": "account\/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 session", - "operationId": "accountCreateOAuth2Session", - "consumes": [], - "produces": [ - "text\/html" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "301": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Session", - "group": "sessions", - "weight": 19, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "weight": 27, - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 18, - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/{sessionId}": { - "get": { - "summary": "Get session", - "operationId": "accountGetSession", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSession", - "group": "sessions", - "weight": 13, - "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSession", - "group": "sessions", - "weight": 15, - "cookies": false, - "type": "", - "demo": "account\/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 14, - "cookies": false, - "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "account", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - } - }, - "\/account\/targets\/push": { - "post": { - "summary": "Create push target", - "operationId": "accountCreatePushTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPushTarget", - "group": "pushTargets", - "weight": 44, - "cookies": false, - "type": "", - "demo": "account\/create-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TARGET_ID>" - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - } - }, - "required": [ - "targetId", - "identifier" - ] - } - } - ] - } - }, - "\/account\/targets\/{targetId}\/push": { - "put": { - "summary": "Update push target", - "operationId": "accountUpdatePushTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePushTarget", - "group": "pushTargets", - "weight": 45, - "cookies": false, - "type": "", - "demo": "account\/update-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - } - }, - "required": [ - "identifier" - ] - } - } - ] - }, - "delete": { - "summary": "Delete push target", - "operationId": "accountDeletePushTarget", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePushTarget", - "group": "pushTargets", - "weight": 46, - "cookies": false, - "type": "", - "demo": "account\/delete-push-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "console", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "\/account\/tokens\/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailToken", - "group": "tokens", - "weight": 25, - "cookies": false, - "type": "", - "demo": "account\/create-email-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - ] - } - }, - "\/account\/tokens\/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMagicURLToken", - "group": "tokens", - "weight": 24, - "cookies": false, - "type": "", - "demo": "account\/create-magic-url-token.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - ] - } - }, - "\/account\/tokens\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "consumes": [], - "produces": [ - "text\/html" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "301": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Token", - "group": "tokens", - "weight": 23, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-token.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/account\/tokens\/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneToken", - "group": "tokens", - "weight": 28, - "cookies": false, - "type": "", - "demo": "account\/create-phone-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},phone:{param-phone}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "userId", - "phone" - ] - } - } - ] - } - }, - "\/account\/verifications\/email": { - "post": { - "summary": "Create email verification", - "operationId": "accountCreateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailVerification", - "group": "verification", - "weight": 40, - "cookies": false, - "type": "", - "demo": "account\/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", - "methods": [ - { - "name": "createEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-email-verification.md", - "public": true - }, - { - "name": "createVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "url" - ] - } - } - ] - }, - "put": { - "summary": "Update email verification (confirmation)", - "operationId": "accountUpdateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "verification", - "weight": 41, - "cookies": false, - "type": "", - "demo": "account\/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", - "methods": [ - { - "name": "updateEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-email-verification.md", - "public": true - }, - { - "name": "updateVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateEmailVerification" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/verifications\/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneVerification", - "group": "verification", - "weight": 42, - "cookies": false, - "type": "", - "demo": "account\/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},userId:{userId}", - "url:{url},ip:{ip}" - ], - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "verification", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account\/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBrowser", - "group": null, - "weight": 177, - "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCreditCard", - "group": null, - "weight": 176, - "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", - "required": true, - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFavicon", - "group": null, - "weight": 180, - "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - } - ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFlag", - "group": null, - "weight": 178, - "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getImage", - "group": null, - "weight": 179, - "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "\/avatars\/initials": { - "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInitials", - "group": null, - "weight": 182, - "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "", - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - } - ] - } - }, - "\/avatars\/qr": { - "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQR", - "group": null, - "weight": 181, - "cookies": false, - "type": "location", - "demo": "avatars\/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "<TEXT>", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "\/avatars\/screenshots": { - "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getScreenshot", - "group": null, - "weight": 183, - "cookies": false, - "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to capture.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "type": "object", - "default": [], - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", - "in": "query" - }, - { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "1920", - "default": 1280, - "in": "query" - }, - { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "1080", - "default": 720, - "in": "query" - }, - { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": "2", - "default": 1, - "in": "query" - }, - { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "light", - "in": "query" - }, - { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "", - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "type": "boolean", - "x-example": "true", - "default": false, - "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "en-US", - "default": "", - "in": "query" - }, - { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "america\/new_york", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "", - "in": "query" - }, - { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0, - "in": "query" - }, - { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0, - "in": "query" - }, - { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "100", - "default": 0, - "in": "query" - }, - { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, - "type": "boolean", - "x-example": "true", - "default": false, - "in": "query" - }, - { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [], - "in": "query" - }, - { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0, - "in": "query" - }, - { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "", - "in": "query" - } - ] - } - }, - "\/console\/assistant": { - "post": { - "summary": "Create assistant query", - "operationId": "assistantChat", - "consumes": [ - "application\/json" - ], - "produces": [ - "text\/plain" - ], - "tags": [ - "assistant" - ], - "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "chat", - "group": "console", - "weight": 506, - "cookies": false, - "type": "", - "demo": "assistant\/chat.md", - "rate-limit": 15, - "rate-time": 3600, - "rate-key": "userId:{userId}", - "scope": "assistant.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prompt": { - "type": "string", - "description": "Prompt. A string containing questions asked to the AI assistant.", - "default": null, - "x-example": "<PROMPT>" - } - }, - "required": [ - "prompt" - ] - } - } - ] - } - }, - "\/console\/oauth2-providers": { - "get": { - "summary": "List OAuth2 providers", - "operationId": "consoleListOAuth2Providers", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "console" - ], - "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", - "responses": { - "200": { - "description": "Console OAuth2 Providers List", - "schema": { - "$ref": "#\/definitions\/consoleOAuth2ProviderList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listOAuth2Providers", - "group": "console", - "weight": 504, - "cookies": false, - "type": "", - "demo": "console\/list-o-auth-2-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/console\/resources": { - "get": { - "summary": "Check resource ID availability", - "operationId": "consoleGetResource", - "consumes": [], - "produces": [], - "tags": [ - "console" - ], - "description": "Check if a resource ID is available.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getResource", - "group": null, - "weight": 507, - "cookies": false, - "type": "", - "demo": "console\/get-resource.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "value", - "description": "Resource value.", - "required": true, - "type": "string", - "x-example": "<VALUE>", - "in": "query" - }, - { - "name": "type", - "description": "Resource type.", - "required": true, - "type": "string", - "x-example": "rules", - "enum": [ - "rules" - ], - "x-enum-name": "ConsoleResourceType", - "x-enum-keys": [], - "in": "query" - } - ] - } - }, - "\/console\/scopes\/project": { - "get": { - "summary": "List project scopes", - "operationId": "consoleListProjectScopes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "console" - ], - "description": "List all scopes available for project API keys, along with a description for each scope.", - "responses": { - "200": { - "description": "Console Key Scopes List", - "schema": { - "$ref": "#\/definitions\/consoleKeyScopeList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProjectScopes", - "group": "console", - "weight": 505, - "cookies": false, - "type": "", - "demo": "console\/list-project-scopes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/console\/variables": { - "get": { - "summary": "Get variables", - "operationId": "consoleVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "console" - ], - "description": "Get all Environment Variables that are relevant for the console.", - "responses": { - "200": { - "description": "Console Variables", - "schema": { - "$ref": "#\/definitions\/consoleVariables" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "variables", - "group": "console", - "weight": 503, - "cookies": false, - "type": "", - "demo": "console\/variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "list", - "group": "databases", - "weight": 191, - "cookies": false, - "type": "", - "demo": "databases\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - }, - "methods": [ - { - "name": "list", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search", - "total" - ], - "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.", - "demo": "databases\/list.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "create", - "group": "databases", - "weight": 187, - "cookies": false, - "type": "", - "demo": "databases\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - }, - "methods": [ - { - "name": "create", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n", - "demo": "databases\/create.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 259, - "cookies": false, - "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 255, - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 256, - "cookies": false, - "type": "", - "demo": "databases\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 257, - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 258, - "cookies": false, - "type": "", - "demo": "databases\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 260, - "cookies": false, - "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/databases\/usage": { - "get": { - "summary": "Get databases usage stats", - "operationId": "databasesListUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "schema": { - "$ref": "#\/definitions\/usageDatabases" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 194, - "cookies": false, - "type": "", - "demo": "databases\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listUsage" - }, - "methods": [ - { - "name": "listUsage", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "databases\/list-usage.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listUsage" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "get", - "group": "databases", - "weight": 188, - "cookies": false, - "type": "", - "demo": "databases\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - }, - "methods": [ - { - "name": "get", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/get.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "update", - "group": "databases", - "weight": 189, - "cookies": false, - "type": "", - "demo": "databases\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - }, - "methods": [ - { - "name": "update", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID.", - "demo": "databases\/update.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "delete", - "group": "databases", - "weight": 190, - "cookies": false, - "type": "", - "demo": "databases\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - }, - "methods": [ - { - "name": "delete", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/delete.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "schema": { - "$ref": "#\/definitions\/collectionList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 199, - "cookies": false, - "type": "", - "demo": "databases\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTables" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collections", - "operationId": "databasesCreateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 195, - "cookies": false, - "type": "", - "demo": "databases\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 196, - "cookies": false, - "type": "", - "demo": "databases\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 197, - "cookies": false, - "type": "", - "demo": "databases\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 198, - "cookies": false, - "type": "", - "demo": "databases\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTable" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "schema": { - "$ref": "#\/definitions\/attributeList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listAttributes", - "group": "attributes", - "weight": 216, - "cookies": false, - "type": "", - "demo": "databases\/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listColumns" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#\/definitions\/attributeBoolean" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createBooleanAttribute", - "group": "attributes", - "weight": 217, - "cookies": false, - "type": "", - "demo": "databases\/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createBooleanColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#\/definitions\/attributeBoolean" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateBooleanAttribute", - "group": "attributes", - "weight": 218, - "cookies": false, - "type": "", - "demo": "databases\/update-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateBooleanColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#\/definitions\/attributeDatetime" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDatetimeAttribute", - "group": "attributes", - "weight": 219, - "cookies": false, - "type": "", - "demo": "databases\/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createDatetimeColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { - "patch": { - "summary": "Update datetime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#\/definitions\/attributeDatetime" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "group": "attributes", - "weight": 220, - "cookies": false, - "type": "", - "demo": "databases\/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateDatetimeColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "schema": { - "$ref": "#\/definitions\/attributeEmail" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEmailAttribute", - "group": "attributes", - "weight": 221, - "cookies": false, - "type": "", - "demo": "databases\/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEmailColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "schema": { - "$ref": "#\/definitions\/attributeEmail" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEmailAttribute", - "group": "attributes", - "weight": 222, - "cookies": false, - "type": "", - "demo": "databases\/update-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEmailColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "schema": { - "$ref": "#\/definitions\/attributeEnum" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEnumAttribute", - "group": "attributes", - "weight": 223, - "cookies": false, - "type": "", - "demo": "databases\/create-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEnumColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "schema": { - "$ref": "#\/definitions\/attributeEnum" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEnumAttribute", - "group": "attributes", - "weight": 224, - "cookies": false, - "type": "", - "demo": "databases\/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEnumColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "schema": { - "$ref": "#\/definitions\/attributeFloat" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFloatAttribute", - "group": "attributes", - "weight": 225, - "cookies": false, - "type": "", - "demo": "databases\/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createFloatColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "schema": { - "$ref": "#\/definitions\/attributeFloat" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFloatAttribute", - "group": "attributes", - "weight": 226, - "cookies": false, - "type": "", - "demo": "databases\/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateFloatColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "schema": { - "$ref": "#\/definitions\/attributeInteger" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIntegerAttribute", - "group": "attributes", - "weight": 227, - "cookies": false, - "type": "", - "demo": "databases\/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIntegerColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "schema": { - "$ref": "#\/definitions\/attributeInteger" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIntegerAttribute", - "group": "attributes", - "weight": 228, - "cookies": false, - "type": "", - "demo": "databases\/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIntegerColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "schema": { - "$ref": "#\/definitions\/attributeIp" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIpAttribute", - "group": "attributes", - "weight": 229, - "cookies": false, - "type": "", - "demo": "databases\/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIpColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "schema": { - "$ref": "#\/definitions\/attributeIp" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIpAttribute", - "group": "attributes", - "weight": 230, - "cookies": false, - "type": "", - "demo": "databases\/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIpColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { - "post": { - "summary": "Create line attribute", - "operationId": "databasesCreateLineAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a geometric line attribute.", - "responses": { - "202": { - "description": "AttributeLine", - "schema": { - "$ref": "#\/definitions\/attributeLine" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createLineAttribute", - "group": "attributes", - "weight": 231, - "cookies": false, - "type": "", - "demo": "databases\/create-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createLineColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { - "patch": { - "summary": "Update line attribute", - "operationId": "databasesUpdateLineAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeLine", - "schema": { - "$ref": "#\/definitions\/attributeLine" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateLineAttribute", - "group": "attributes", - "weight": 232, - "cookies": false, - "type": "", - "demo": "databases\/update-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateLineColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { - "post": { - "summary": "Create longtext attribute", - "operationId": "databasesCreateLongtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a longtext attribute.\n", - "responses": { - "202": { - "description": "AttributeLongtext", - "schema": { - "$ref": "#\/definitions\/attributeLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextAttribute", - "group": "attributes", - "weight": 249, - "cookies": false, - "type": "", - "demo": "databases\/create-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { - "patch": { - "summary": "Update longtext attribute", - "operationId": "databasesUpdateLongtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeLongtext", - "schema": { - "$ref": "#\/definitions\/attributeLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextAttribute", - "group": "attributes", - "weight": 250, - "cookies": false, - "type": "", - "demo": "databases\/update-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { - "post": { - "summary": "Create mediumtext attribute", - "operationId": "databasesCreateMediumtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a mediumtext attribute.\n", - "responses": { - "202": { - "description": "AttributeMediumtext", - "schema": { - "$ref": "#\/definitions\/attributeMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextAttribute", - "group": "attributes", - "weight": 247, - "cookies": false, - "type": "", - "demo": "databases\/create-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext attribute", - "operationId": "databasesUpdateMediumtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeMediumtext", - "schema": { - "$ref": "#\/definitions\/attributeMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextAttribute", - "group": "attributes", - "weight": 248, - "cookies": false, - "type": "", - "demo": "databases\/update-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { - "post": { - "summary": "Create point attribute", - "operationId": "databasesCreatePointAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a geometric point attribute.", - "responses": { - "202": { - "description": "AttributePoint", - "schema": { - "$ref": "#\/definitions\/attributePoint" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPointAttribute", - "group": "attributes", - "weight": 233, - "cookies": false, - "type": "", - "demo": "databases\/create-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPointColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { - "patch": { - "summary": "Update point attribute", - "operationId": "databasesUpdatePointAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePoint", - "schema": { - "$ref": "#\/definitions\/attributePoint" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePointAttribute", - "group": "attributes", - "weight": 234, - "cookies": false, - "type": "", - "demo": "databases\/update-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePointColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { - "post": { - "summary": "Create polygon attribute", - "operationId": "databasesCreatePolygonAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a geometric polygon attribute.", - "responses": { - "202": { - "description": "AttributePolygon", - "schema": { - "$ref": "#\/definitions\/attributePolygon" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPolygonAttribute", - "group": "attributes", - "weight": 235, - "cookies": false, - "type": "", - "demo": "databases\/create-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPolygonColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { - "patch": { - "summary": "Update polygon attribute", - "operationId": "databasesUpdatePolygonAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePolygon", - "schema": { - "$ref": "#\/definitions\/attributePolygon" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePolygonAttribute", - "group": "attributes", - "weight": 236, - "cookies": false, - "type": "", - "demo": "databases\/update-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePolygonColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#\/definitions\/attributeRelationship" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createRelationshipAttribute", - "group": "attributes", - "weight": 237, - "cookies": false, - "type": "", - "demo": "databases\/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRelationshipColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID.", - "default": null, - "x-example": "<RELATED_COLLECTION_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedCollectionId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#\/definitions\/attributeRelationship" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "group": "attributes", - "weight": 238, - "cookies": false, - "type": "", - "demo": "databases\/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRelationshipColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "schema": { - "$ref": "#\/definitions\/attributeString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringAttribute", - "group": "attributes", - "weight": 239, - "cookies": false, - "type": "", - "demo": "databases\/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createStringColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "schema": { - "$ref": "#\/definitions\/attributeString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringAttribute", - "group": "attributes", - "weight": 240, - "cookies": false, - "type": "", - "demo": "databases\/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateStringColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { - "post": { - "summary": "Create text attribute", - "operationId": "databasesCreateTextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a text attribute.\n", - "responses": { - "202": { - "description": "AttributeText", - "schema": { - "$ref": "#\/definitions\/attributeText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextAttribute", - "group": "attributes", - "weight": 245, - "cookies": false, - "type": "", - "demo": "databases\/create-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { - "patch": { - "summary": "Update text attribute", - "operationId": "databasesUpdateTextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeText", - "schema": { - "$ref": "#\/definitions\/attributeText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextAttribute", - "group": "attributes", - "weight": 246, - "cookies": false, - "type": "", - "demo": "databases\/update-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "schema": { - "$ref": "#\/definitions\/attributeUrl" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createUrlAttribute", - "group": "attributes", - "weight": 241, - "cookies": false, - "type": "", - "demo": "databases\/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createUrlColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "schema": { - "$ref": "#\/definitions\/attributeUrl" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateUrlAttribute", - "group": "attributes", - "weight": 242, - "cookies": false, - "type": "", - "demo": "databases\/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateUrlColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { - "post": { - "summary": "Create varchar attribute", - "operationId": "databasesCreateVarcharAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a varchar attribute.\n", - "responses": { - "202": { - "description": "AttributeVarchar", - "schema": { - "$ref": "#\/definitions\/attributeVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharAttribute", - "group": "attributes", - "weight": 243, - "cookies": false, - "type": "", - "demo": "databases\/create-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { - "patch": { - "summary": "Update varchar attribute", - "operationId": "databasesUpdateVarcharAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeVarchar", - "schema": { - "$ref": "#\/definitions\/attributeVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharAttribute", - "group": "attributes", - "weight": 244, - "cookies": false, - "type": "", - "demo": "databases\/update-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar attribute.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/attributeBoolean" - }, - { - "$ref": "#\/definitions\/attributeInteger" - }, - { - "$ref": "#\/definitions\/attributeFloat" - }, - { - "$ref": "#\/definitions\/attributeEmail" - }, - { - "$ref": "#\/definitions\/attributeEnum" - }, - { - "$ref": "#\/definitions\/attributeUrl" - }, - { - "$ref": "#\/definitions\/attributeIp" - }, - { - "$ref": "#\/definitions\/attributeDatetime" - }, - { - "$ref": "#\/definitions\/attributeRelationship" - }, - { - "$ref": "#\/definitions\/attributeString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/attributeBoolean", - "integer": "#\/definitions\/attributeInteger", - "double": "#\/definitions\/attributeFloat", - "string": "#\/definitions\/attributeString", - "datetime": "#\/definitions\/attributeDatetime", - "relationship": "#\/definitions\/attributeRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/attributeBoolean": { - "type": "boolean" - }, - "#\/definitions\/attributeInteger": { - "type": "integer" - }, - "#\/definitions\/attributeFloat": { - "type": "double" - }, - "#\/definitions\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/attributeDatetime": { - "type": "datetime" - }, - "#\/definitions\/attributeRelationship": { - "type": "relationship" - }, - "#\/definitions\/attributeString": { - "type": "string" - } - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getAttribute", - "group": "attributes", - "weight": 214, - "cookies": false, - "type": "", - "demo": "databases\/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteAttribute", - "group": "attributes", - "weight": 215, - "cookies": false, - "type": "", - "demo": "databases\/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 210, - "cookies": false, - "type": "", - "demo": "databases\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 202, - "cookies": false, - "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - }, - { - "name": "createDocuments", - "namespace": "databases", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRows" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "put": { - "summary": "Upsert documents", - "operationId": "databasesUpsertDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 207, - "cookies": false, - "type": "", - "demo": "databases\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - }, - "methods": [ - { - "name": "upsertDocuments", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "demo": "databases\/upsert-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "documents" - ] - } - } - ] - }, - "patch": { - "summary": "Update documents", - "operationId": "databasesUpdateDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 205, - "cookies": false, - "type": "", - "demo": "databases\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete documents", - "operationId": "databasesDeleteDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 209, - "cookies": false, - "type": "", - "demo": "databases\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRows" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 203, - "cookies": false, - "type": "", - "demo": "databases\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 206, - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 204, - "cookies": false, - "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 208, - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs": { - "get": { - "summary": "List document logs", - "operationId": "databasesListDocumentLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get the document activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocumentLogs", - "group": "logs", - "weight": 211, - "cookies": false, - "type": "", - "demo": "databases\/list-document-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRowLogs" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "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}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Decrement a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 213, - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Increment a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 212, - "cookies": false, - "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#\/definitions\/indexList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 254, - "cookies": false, - "type": "", - "demo": "databases\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listIndexes" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 251, - "cookies": false, - "type": "", - "demo": "databases\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIndex" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "DatabasesIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get an index by its unique ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 252, - "cookies": false, - "type": "", - "demo": "databases\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getIndex" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 253, - "cookies": false, - "type": "", - "demo": "databases\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteIndex" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/logs": { - "get": { - "summary": "List collection logs", - "operationId": "databasesListCollectionLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get the collection activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listCollectionLogs", - "group": "collections", - "weight": 200, - "cookies": false, - "type": "", - "demo": "databases\/list-collection-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTableLogs" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "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}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "databasesGetCollectionUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "schema": { - "$ref": "#\/definitions\/usageCollection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollectionUsage", - "group": null, - "weight": 201, - "cookies": false, - "type": "", - "demo": "databases\/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTableUsage" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/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": 192, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listDatabaseLogs" - }, - "methods": [ - { - "name": "listLogs", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/logList" - } - ], - "description": "Get the database activity logs list by its unique ID.", - "demo": "databases\/list-logs.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listDatabaseLogs" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "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", - "operationId": "databasesGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabase", - "schema": { - "$ref": "#\/definitions\/usageDatabase" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 193, - "cookies": false, - "type": "", - "demo": "databases\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getUsage" - }, - "methods": [ - { - "name": "getUsage", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "databases\/get-usage.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getUsage" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/documentsdb": { - "get": { - "summary": "List databases", - "operationId": "documentsDBList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "documentsdb", - "weight": 338, - "cookies": false, - "type": "", - "demo": "documentsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "documentsDBCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "documentsdb", - "weight": 334, - "cookies": false, - "type": "", - "demo": "documentsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 366, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 362, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 363, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 364, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 365, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/usage": { - "get": { - "summary": "Get DocumentsDB usage stats", - "operationId": "documentsDBListUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "schema": { - "$ref": "#\/definitions\/usageDatabases" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 340, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "documentsdb\/list-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/documentsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "documentsDBGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "documentsdb", - "weight": 335, - "cookies": false, - "type": "", - "demo": "documentsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "documentsDBUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "documentsdb", - "weight": 336, - "cookies": false, - "type": "", - "demo": "documentsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "documentsDBDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "documentsdb", - "weight": 337, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "documentsDBListCollections", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "schema": { - "$ref": "#\/definitions\/collectionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 345, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "documentsDBCreateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 341, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "documentsDBGetCollection", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 342, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "documentsDBUpdateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 343, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "documentsDBDeleteCollection", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 344, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 359, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 351, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "put": { - "summary": "Upsert documents", - "operationId": "documentsDBUpsertDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 356, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "documentsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - ] - }, - "patch": { - "summary": "Update documents", - "operationId": "documentsDBUpdateDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 354, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete documents", - "operationId": "documentsDBDeleteDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 358, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 352, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 355, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 353, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 357, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 361, - "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 360, - "cookies": false, - "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "documentsDBListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#\/definitions\/indexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 350, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "documentsDBCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 347, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "DocumentsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "documentsDBGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 348, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "documentsDBDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 349, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "documentsDBGetCollectionUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "schema": { - "$ref": "#\/definitions\/usageCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollectionUsage", - "group": null, - "weight": 346, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/usage": { - "get": { - "summary": "Get DocumentsDB usage stats", - "operationId": "documentsDBGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDocumentsDB", - "schema": { - "$ref": "#\/definitions\/usageDocumentsDB" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 339, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDocumentsDB" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "documentsdb\/get-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/functions": { - "get": { - "summary": "List functions", - "operationId": "functionsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "schema": { - "$ref": "#\/definitions\/functionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "functions", - "weight": 422, - "cookies": false, - "type": "", - "demo": "functions\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create function", - "operationId": "functionsCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", - "responses": { - "201": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "functions", - "weight": 419, - "cookies": false, - "type": "", - "demo": "functions\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "functionId": { - "type": "string", - "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<FUNCTION_ID>" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "default": 15, - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "functionId", - "name", - "runtime" - ] - } - } - ] - } - }, - "\/functions\/runtimes": { - "get": { - "summary": "List runtimes", - "operationId": "functionsListRuntimes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all runtimes that are currently active on your instance.", - "responses": { - "200": { - "description": "Runtimes List", - "schema": { - "$ref": "#\/definitions\/runtimeList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRuntimes", - "group": "runtimes", - "weight": 424, - "cookies": false, - "type": "", - "demo": "functions\/list-runtimes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "functionsListSpecifications", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "List allowed function specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "schema": { - "$ref": "#\/definitions\/specificationList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "runtimes", - "weight": 425, - "cookies": false, - "type": "", - "demo": "functions\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/templates": { - "get": { - "summary": "List templates", - "operationId": "functionsListTemplates", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", - "responses": { - "200": { - "description": "Function Templates List", - "schema": { - "$ref": "#\/definitions\/templateFunctionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTemplates", - "group": "templates", - "weight": 448, - "cookies": false, - "type": "", - "demo": "functions\/list-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "runtimes", - "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [], - "in": "query" - }, - { - "name": "useCases", - "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "starter", - "databases", - "ai", - "messaging", - "utilities", - "dev-tools", - "auth" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset the list of returned templates. Maximum offset is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/functions\/templates\/{templateId}": { - "get": { - "summary": "Get function template", - "operationId": "functionsGetTemplate", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", - "responses": { - "200": { - "description": "Template Function", - "schema": { - "$ref": "#\/definitions\/templateFunction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTemplate", - "group": "templates", - "weight": 447, - "cookies": false, - "type": "", - "demo": "functions\/get-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Template ID.", - "required": true, - "type": "string", - "x-example": "<TEMPLATE_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/usage": { - "get": { - "summary": "Get functions usage", - "operationId": "functionsListUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageFunctions", - "schema": { - "$ref": "#\/definitions\/usageFunctions" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 441, - "cookies": false, - "type": "", - "demo": "functions\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}": { - "get": { - "summary": "Get function", - "operationId": "functionsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "functions", - "weight": 420, - "cookies": false, - "type": "", - "demo": "functions\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update function", - "operationId": "functionsUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Update function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "functions", - "weight": 421, - "cookies": false, - "type": "", - "demo": "functions\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": "", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "default": null, - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete function", - "operationId": "functionsDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a function by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "functions", - "weight": 423, - "cookies": false, - "type": "", - "demo": "functions\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployment": { - "patch": { - "summary": "Update function's deployment", - "operationId": "functionsUpdateFunctionDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", - "responses": { - "200": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFunctionDeployment", - "group": "functions", - "weight": 428, - "cookies": false, - "type": "", - "demo": "functions\/update-function-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "functionsListDeployments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { - "$ref": "#\/definitions\/deploymentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 429, - "cookies": false, - "type": "", - "demo": "functions\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "functionsCreateDeployment", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 426, - "cookies": false, - "type": "upload", - "demo": "functions\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "entrypoint", - "description": "Entrypoint File.", - "required": false, - "type": "string", - "x-example": "<ENTRYPOINT>", - "in": "formData" - }, - { - "name": "commands", - "description": "Build Commands.", - "required": false, - "type": "string", - "x-example": "<COMMANDS>", - "in": "formData" - }, - { - "name": "code", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "activate", - "description": "Automatically activate the deployment when it is finished building.", - "required": true, - "type": "boolean", - "x-example": false, - "in": "formData" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "functionsCreateDuplicateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 434, - "cookies": false, - "type": "", - "demo": "functions\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - }, - "buildId": { - "type": "string", - "description": "Build unique ID.", - "default": "", - "x-example": "<BUILD_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "functionsCreateTemplateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 431, - "cookies": false, - "type": "", - "demo": "functions\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "default": null, - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "default": null, - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "default": null, - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "default": null, - "x-example": "commit", - "enum": [ - "commit", - "branch", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "functionsCreateVcsDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 432, - "cookies": false, - "type": "", - "demo": "functions\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "default": null, - "x-example": "branch", - "enum": [ - "branch", - "commit" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "functionsGetDeployment", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 427, - "cookies": false, - "type": "", - "demo": "functions\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "functionsDeleteDeployment", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a code deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 430, - "cookies": false, - "type": "", - "demo": "functions\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "functionsGetDeploymentDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "functions" - ], - "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 433, - "cookies": false, - "type": "location", - "demo": "functions\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source", - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "functionsUpdateDeploymentStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 435, - "cookies": false, - "type": "", - "demo": "functions\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/executions": { - "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#\/definitions\/executionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listExecutions", - "group": "executions", - "weight": 438, - "cookies": false, - "type": "", - "demo": "functions\/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "consumes": [ - "application\/json" - ], - "produces": [ - "multipart\/form-data" - ], - "tags": [ - "functions" - ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createExecution", - "group": "executions", - "weight": 436, - "cookies": false, - "type": "", - "demo": "functions\/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "default": false, - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "default": "\/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "default": "POST", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "default": null, - "x-example": "<SCHEDULED_AT>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getExecution", - "group": "executions", - "weight": 437, - "cookies": false, - "type": "", - "demo": "functions\/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a function execution by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteExecution", - "group": "executions", - "weight": 439, - "cookies": false, - "type": "", - "demo": "functions\/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/usage": { - "get": { - "summary": "Get function usage", - "operationId": "functionsGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageFunction", - "schema": { - "$ref": "#\/definitions\/usageFunction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 440, - "cookies": false, - "type": "", - "demo": "functions\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#\/definitions\/variableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 444, - "cookies": false, - "type": "", - "demo": "functions\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 442, - "cookies": false, - "type": "", - "demo": "functions\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 443, - "cookies": false, - "type": "", - "demo": "functions\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 445, - "cookies": false, - "type": "", - "demo": "functions\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 446, - "cookies": false, - "type": "", - "demo": "functions\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#\/definitions\/any" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "query", - "group": "graphql", - "weight": 117, - "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - ] - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#\/definitions\/any" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "mutation", - "group": "graphql", - "weight": 116, - "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - ] - } - }, - "\/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite HTTP server is up and responsive.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#\/definitions\/healthStatus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "health", - "weight": 449, - "cookies": false, - "type": "", - "demo": "health\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/anti-virus": { - "get": { - "summary": "Get antivirus", - "operationId": "healthGetAntivirus", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Antivirus", - "schema": { - "$ref": "#\/definitions\/healthAntivirus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAntivirus", - "group": "health", - "weight": 458, - "cookies": false, - "type": "", - "demo": "health\/get-antivirus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/cache": { - "get": { - "summary": "Get cache", - "operationId": "healthGetCache", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "schema": { - "$ref": "#\/definitions\/healthStatusList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCache", - "group": "health", - "weight": 452, - "cookies": false, - "type": "", - "demo": "health\/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "schema": { - "$ref": "#\/definitions\/healthCertificate" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCertificate", - "group": "health", - "weight": 455, - "cookies": false, - "type": "", - "demo": "health\/get-certificate.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "type": "string", - "in": "query" - } - ] - } - }, - "\/health\/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "schema": { - "$ref": "#\/definitions\/healthStatusList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDB", - "group": "health", - "weight": 451, - "cookies": false, - "type": "", - "demo": "health\/get-db.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "schema": { - "$ref": "#\/definitions\/healthStatusList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPubSub", - "group": "health", - "weight": 453, - "cookies": false, - "type": "", - "demo": "health\/get-pub-sub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/queue\/audits": { - "get": { - "summary": "Get audits queue", - "operationId": "healthGetQueueAudits", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueAudits", - "group": "queue", - "weight": 459, - "cookies": false, - "type": "", - "demo": "health\/get-queue-audits.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueBuilds", - "group": "queue", - "weight": 463, - "cookies": false, - "type": "", - "demo": "health\/get-queue-builds.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/certificates": { - "get": { - "summary": "Get certificates queue", - "operationId": "healthGetQueueCertificates", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueCertificates", - "group": "queue", - "weight": 462, - "cookies": false, - "type": "", - "demo": "health\/get-queue-certificates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDatabases", - "group": "queue", - "weight": 464, - "cookies": false, - "type": "", - "demo": "health\/get-queue-databases.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "database_db_main", - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDeletes", - "group": "queue", - "weight": 465, - "cookies": false, - "type": "", - "demo": "health\/get-queue-deletes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/failed\/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFailedJobs", - "group": "queue", - "weight": 472, - "cookies": false, - "type": "", - "demo": "health\/get-failed-jobs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueFunctions", - "group": "queue", - "weight": 469, - "cookies": false, - "type": "", - "demo": "health\/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/logs": { - "get": { - "summary": "Get logs queue", - "operationId": "healthGetQueueLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueLogs", - "group": "queue", - "weight": 461, - "cookies": false, - "type": "", - "demo": "health\/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMails", - "group": "queue", - "weight": 466, - "cookies": false, - "type": "", - "demo": "health\/get-queue-mails.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMessaging", - "group": "queue", - "weight": 467, - "cookies": false, - "type": "", - "demo": "health\/get-queue-messaging.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMigrations", - "group": "queue", - "weight": 468, - "cookies": false, - "type": "", - "demo": "health\/get-queue-migrations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-resources": { - "get": { - "summary": "Get stats resources queue", - "operationId": "healthGetQueueStatsResources", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueStatsResources", - "group": "queue", - "weight": 470, - "cookies": false, - "type": "", - "demo": "health\/get-queue-stats-resources.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-usage": { - "get": { - "summary": "Get stats usage queue", - "operationId": "healthGetQueueUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueUsage", - "group": "queue", - "weight": 471, - "cookies": false, - "type": "", - "demo": "health\/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/webhooks": { - "get": { - "summary": "Get webhooks queue", - "operationId": "healthGetQueueWebhooks", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueWebhooks", - "group": "queue", - "weight": 460, - "cookies": false, - "type": "", - "demo": "health\/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#\/definitions\/healthStatus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorage", - "group": "storage", - "weight": 457, - "cookies": false, - "type": "", - "demo": "health\/get-storage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/storage\/local": { - "get": { - "summary": "Get local storage", - "operationId": "healthGetStorageLocal", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite local storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#\/definitions\/healthStatus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorageLocal", - "group": "storage", - "weight": 456, - "cookies": false, - "type": "", - "demo": "health\/get-storage-local.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/time": { - "get": { - "summary": "Get time", - "operationId": "healthGetTime", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", - "responses": { - "200": { - "description": "Health Time", - "schema": { - "$ref": "#\/definitions\/healthTime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTime", - "group": "health", - "weight": 454, - "cookies": false, - "type": "", - "demo": "health\/get-time.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "schema": { - "$ref": "#\/definitions\/locale" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 49, - "cookies": false, - "type": "", - "demo": "locale\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "schema": { - "$ref": "#\/definitions\/localeCodeList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCodes", - "group": null, - "weight": 50, - "cookies": false, - "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "schema": { - "$ref": "#\/definitions\/continentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listContinents", - "group": null, - "weight": 54, - "cookies": false, - "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountries", - "group": null, - "weight": 51, - "cookies": false, - "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesEU", - "group": null, - "weight": 52, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "schema": { - "$ref": "#\/definitions\/phoneList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesPhones", - "group": null, - "weight": 53, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "schema": { - "$ref": "#\/definitions\/currencyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCurrencies", - "group": null, - "weight": 55, - "cookies": false, - "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "schema": { - "$ref": "#\/definitions\/languageList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, - "weight": 56, - "cookies": false, - "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/messaging\/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "schema": { - "$ref": "#\/definitions\/messageList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessages", - "group": "messages", - "weight": 158, - "cookies": false, - "type": "", - "demo": "messaging\/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmail", - "group": "messages", - "weight": 155, - "cookies": false, - "type": "", - "demo": "messaging\/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<MESSAGE_ID>" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "subject", - "content" - ] - } - } - ] - } - }, - "\/messaging\/messages\/email\/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "messages", - "weight": 162, - "cookies": false, - "type": "", - "demo": "messaging\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false, - "x-nullable": true - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": null, - "x-example": false, - "x-nullable": true - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "\/messaging\/messages\/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPush", - "group": "messages", - "weight": 157, - "cookies": false, - "type": "", - "demo": "messaging\/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<MESSAGE_ID>" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": "", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": "", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": "", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": "", - "x-example": "<ID1:ID2>" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "default": "", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "default": "", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "default": -1, - "x-example": null, - "format": "int32" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "default": "high", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - }, - "required": [ - "messageId" - ] - } - } - ] - } - }, - "\/messaging\/messages\/push\/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePush", - "group": "messages", - "weight": 164, - "cookies": false, - "type": "", - "demo": "messaging\/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": null, - "x-example": "<TITLE>", - "x-nullable": true - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": null, - "x-example": "<BODY>", - "x-nullable": true - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": null, - "x-example": "<ACTION>", - "x-nullable": true - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": "<ID1:ID2>", - "x-nullable": true - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "default": null, - "x-example": "<ICON>", - "x-nullable": true - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "default": null, - "x-example": "<SOUND>", - "x-nullable": true - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<COLOR>", - "x-nullable": true - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<TAG>", - "x-nullable": true - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "default": null, - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "default": null, - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [], - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/messages\/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSms", - "group": "messages", - "weight": 156, - "cookies": false, - "type": "", - "demo": "messaging\/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - }, - "methods": [ - { - "name": "createSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - } - }, - { - "name": "createSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "content" - ] - } - } - ] - } - }, - "\/messaging\/messages\/sms\/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSms", - "group": "messages", - "weight": 163, - "cookies": false, - "type": "", - "demo": "messaging\/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - }, - "methods": [ - { - "name": "updateSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - } - }, - { - "name": "updateSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/messages\/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMessage", - "group": "messages", - "weight": 161, - "cookies": false, - "type": "", - "demo": "messaging\/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "messages", - "weight": 165, - "cookies": false, - "type": "", - "demo": "messaging\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessageLogs", - "group": "logs", - "weight": 159, - "cookies": false, - "type": "", - "demo": "messaging\/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#\/definitions\/targetList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "messages", - "weight": 160, - "cookies": false, - "type": "", - "demo": "messaging\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "schema": { - "$ref": "#\/definitions\/providerList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviders", - "group": "providers", - "weight": 129, - "cookies": false, - "type": "", - "demo": "messaging\/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/providers\/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createApnsProvider", - "group": "providers", - "weight": 128, - "cookies": false, - "type": "", - "demo": "messaging\/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - }, - "methods": [ - { - "name": "createApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - } - }, - { - "name": "createAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/apns\/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateApnsProvider", - "group": "providers", - "weight": 142, - "cookies": false, - "type": "", - "demo": "messaging\/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - }, - "methods": [ - { - "name": "updateApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - } - }, - { - "name": "updateAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/providers\/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFcmProvider", - "group": "providers", - "weight": 127, - "cookies": false, - "type": "", - "demo": "messaging\/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - }, - "methods": [ - { - "name": "createFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - } - }, - { - "name": "createFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/fcm\/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFcmProvider", - "group": "providers", - "weight": 141, - "cookies": false, - "type": "", - "demo": "messaging\/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - }, - "methods": [ - { - "name": "updateFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - } - }, - { - "name": "updateFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/providers\/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMailgunProvider", - "group": "providers", - "weight": 118, - "cookies": false, - "type": "", - "demo": "messaging\/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/mailgun\/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMailgunProvider", - "group": "providers", - "weight": 132, - "cookies": false, - "type": "", - "demo": "messaging\/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", - "weight": 122, - "cookies": false, - "type": "", - "demo": "messaging\/create-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/msg91\/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", - "weight": 136, - "cookies": false, - "type": "", - "demo": "messaging\/update-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/resend": { - "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Resend provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createResendProvider", - "group": "providers", - "weight": 120, - "cookies": false, - "type": "", - "demo": "messaging\/create-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/resend\/{providerId}": { - "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Resend provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateResendProvider", - "group": "providers", - "weight": 134, - "cookies": false, - "type": "", - "demo": "messaging\/update-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSendgridProvider", - "group": "providers", - "weight": 119, - "cookies": false, - "type": "", - "demo": "messaging\/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/sendgrid\/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSendgridProvider", - "group": "providers", - "weight": 133, - "cookies": false, - "type": "", - "demo": "messaging\/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSmtpProvider", - "group": "providers", - "weight": 121, - "cookies": false, - "type": "", - "demo": "messaging\/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - }, - "methods": [ - { - "name": "createSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - } - }, - { - "name": "createSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": null, - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "default": 587, - "x-example": 1, - "format": "int32" - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "default": "", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": true, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name", - "host" - ] - } - } - ] - } - }, - "\/messaging\/providers\/smtp\/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSmtpProvider", - "group": "providers", - "weight": 135, - "cookies": false, - "type": "", - "demo": "messaging\/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - }, - "methods": [ - { - "name": "updateSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - } - }, - { - "name": "updateSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": "", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "default": "", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/providers\/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTelesignProvider", - "group": "providers", - "weight": 123, - "cookies": false, - "type": "", - "demo": "messaging\/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/telesign\/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTelesignProvider", - "group": "providers", - "weight": 137, - "cookies": false, - "type": "", - "demo": "messaging\/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextmagicProvider", - "group": "providers", - "weight": 124, - "cookies": false, - "type": "", - "demo": "messaging\/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/textmagic\/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextmagicProvider", - "group": "providers", - "weight": 138, - "cookies": false, - "type": "", - "demo": "messaging\/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTwilioProvider", - "group": "providers", - "weight": 125, - "cookies": false, - "type": "", - "demo": "messaging\/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/twilio\/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTwilioProvider", - "group": "providers", - "weight": 139, - "cookies": false, - "type": "", - "demo": "messaging\/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVonageProvider", - "group": "providers", - "weight": 126, - "cookies": false, - "type": "", - "demo": "messaging\/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/vonage\/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVonageProvider", - "group": "providers", - "weight": 140, - "cookies": false, - "type": "", - "demo": "messaging\/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getProvider", - "group": "providers", - "weight": 131, - "cookies": false, - "type": "", - "demo": "messaging\/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteProvider", - "group": "providers", - "weight": 143, - "cookies": false, - "type": "", - "demo": "messaging\/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - } - }, - "\/messaging\/providers\/{providerId}\/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviderLogs", - "group": "providers", - "weight": 130, - "cookies": false, - "type": "", - "demo": "messaging\/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/subscribers\/{subscriberId}\/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscriberLogs", - "group": "subscribers", - "weight": 152, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "schema": { - "$ref": "#\/definitions\/topicList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopics", - "group": "topics", - "weight": 145, - "cookies": false, - "type": "", - "demo": "messaging\/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "schema": { - "$ref": "#\/definitions\/topic" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTopic", - "group": "topics", - "weight": 144, - "cookies": false, - "type": "", - "demo": "messaging\/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "default": null, - "x-example": "<TOPIC_ID>" - }, - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [ - "users" - ], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": [ - "topicId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/topics\/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#\/definitions\/topic" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTopic", - "group": "topics", - "weight": 147, - "cookies": false, - "type": "", - "demo": "messaging\/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#\/definitions\/topic" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTopic", - "group": "topics", - "weight": 148, - "cookies": false, - "type": "", - "demo": "messaging\/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>", - "x-nullable": true - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": null, - "x-example": "[\"any\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTopic", - "group": "topics", - "weight": 149, - "cookies": false, - "type": "", - "demo": "messaging\/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", - "weight": 146, - "cookies": false, - "type": "", - "demo": "messaging\/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "schema": { - "$ref": "#\/definitions\/subscriberList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", - "weight": 151, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "schema": { - "$ref": "#\/definitions\/subscriber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", - "weight": 150, - "cookies": false, - "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "default": null, - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "default": null, - "x-example": "<TARGET_ID>" - } - }, - "required": [ - "subscriberId", - "targetId" - ] - } - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "schema": { - "$ref": "#\/definitions\/subscriber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", - "weight": 153, - "cookies": false, - "type": "", - "demo": "messaging\/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "weight": 154, - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - } - }, - "\/migrations": { - "get": { - "summary": "List migrations", - "operationId": "migrationsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", - "responses": { - "200": { - "description": "Migrations List", - "schema": { - "$ref": "#\/definitions\/migrationList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "weight": 578, - "cookies": false, - "type": "", - "demo": "migrations\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/migrations\/appwrite": { - "post": { - "summary": "Create Appwrite migration", - "operationId": "migrationsCreateAppwriteMigration", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAppwriteMigration", - "group": null, - "weight": 582, - "cookies": false, - "type": "", - "demo": "migrations\/create-appwrite-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "team", - "membership", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable" - ], - "x-enum-name": "AppwriteMigrationResource", - "x-enum-keys": [] - } - }, - "endpoint": { - "type": "string", - "description": "Source Appwrite endpoint", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - }, - "projectId": { - "type": "string", - "description": "Source Project ID", - "default": null, - "x-example": "<PROJECT_ID>" - }, - "apiKey": { - "type": "string", - "description": "Source API Key", - "default": null, - "x-example": "<API_KEY>" - } - }, - "required": [ - "resources", - "endpoint", - "projectId", - "apiKey" - ] - } - } - ] - } - }, - "\/migrations\/appwrite\/report": { - "get": { - "summary": "Get Appwrite migration report", - "operationId": "migrationsGetAppwriteReport", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#\/definitions\/migrationReport" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAppwriteReport", - "group": null, - "weight": 583, - "cookies": false, - "type": "", - "demo": "migrations\/get-appwrite-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "user", - "team", - "membership", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable" - ], - "x-enum-name": "AppwriteMigrationResource", - "x-enum-keys": [] - }, - "in": "query" - }, - { - "name": "endpoint", - "description": "Source's Appwrite Endpoint", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "projectID", - "description": "Source's Project ID", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "query" - }, - { - "name": "key", - "description": "Source's API Key", - "required": true, - "type": "string", - "x-example": "<KEY>", - "in": "query" - } - ] - } - }, - "\/migrations\/csv\/exports": { - "post": { - "summary": "Export documents to CSV", - "operationId": "migrationsCreateCSVExport", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCSVExport", - "group": null, - "weight": 591, - "cookies": false, - "type": "", - "demo": "migrations\/create-csv-export.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-export.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", - "default": null, - "x-example": "<ID1:ID2>" - }, - "filename": { - "type": "string", - "description": "The name of the file to be created for the export, excluding the .csv extension.", - "default": null, - "x-example": "<FILENAME>" - }, - "columns": { - "type": "array", - "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "delimiter": { - "type": "string", - "description": "The character that separates each column value. Default is comma.", - "default": ",", - "x-example": "<DELIMITER>" - }, - "enclosure": { - "type": "string", - "description": "The character that encloses each column value. Default is double quotes.", - "default": "\"", - "x-example": "<ENCLOSURE>" - }, - "escape": { - "type": "string", - "description": "The escape character for the enclosure character. Default is double quotes.", - "default": "\"", - "x-example": "<ESCAPE>" - }, - "header": { - "type": "boolean", - "description": "Whether to include the header row with column names. Default is true.", - "default": true, - "x-example": false - }, - "notify": { - "type": "boolean", - "description": "Set to true to receive an email when the export is complete. Default is true.", - "default": true, - "x-example": false - } - }, - "required": [ - "resourceId", - "filename" - ] - } - } - ] - } - }, - "\/migrations\/csv\/imports": { - "post": { - "summary": "Import documents from a CSV", - "operationId": "migrationsCreateCSVImport", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCSVImport", - "group": null, - "weight": 590, - "cookies": false, - "type": "", - "demo": "migrations\/create-csv-import.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-import.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "default": null, - "x-example": "<BUCKET_ID>" - }, - "fileId": { - "type": "string", - "description": "File ID.", - "default": null, - "x-example": "<FILE_ID>" - }, - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", - "default": null, - "x-example": "<ID1:ID2>" - }, - "internalFile": { - "type": "boolean", - "description": "Is the file stored in an internal bucket?", - "default": false, - "x-example": false - } - }, - "required": [ - "bucketId", - "fileId", - "resourceId" - ] - } - } - ] - } - }, - "\/migrations\/firebase": { - "post": { - "summary": "Create Firebase migration", - "operationId": "migrationsCreateFirebaseMigration", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFirebaseMigration", - "group": null, - "weight": 584, - "cookies": false, - "type": "", - "demo": "migrations\/create-firebase-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "FirebaseMigrationResource", - "x-enum-keys": [] - } - }, - "serviceAccount": { - "type": "string", - "description": "JSON of the Firebase service account credentials", - "default": null, - "x-example": "<SERVICE_ACCOUNT>" - } - }, - "required": [ - "resources", - "serviceAccount" - ] - } - } - ] - } - }, - "\/migrations\/firebase\/report": { - "get": { - "summary": "Get Firebase migration report", - "operationId": "migrationsGetFirebaseReport", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#\/definitions\/migrationReport" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFirebaseReport", - "group": null, - "weight": 585, - "cookies": false, - "type": "", - "demo": "migrations\/get-firebase-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "FirebaseMigrationResource", - "x-enum-keys": [] - }, - "in": "query" - }, - { - "name": "serviceAccount", - "description": "JSON of the Firebase service account credentials", - "required": true, - "type": "string", - "x-example": "<SERVICE_ACCOUNT>", - "in": "query" - } - ] - } - }, - "\/migrations\/json\/exports": { - "post": { - "summary": "Export documents to JSON", - "operationId": "migrationsCreateJSONExport", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJSONExport", - "group": null, - "weight": 593, - "cookies": false, - "type": "", - "demo": "migrations\/create-json-export.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-export.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", - "default": null, - "x-example": "<ID1:ID2>" - }, - "filename": { - "type": "string", - "description": "The name of the file to be created for the export, excluding the .json extension.", - "default": null, - "x-example": "<FILENAME>" - }, - "columns": { - "type": "array", - "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "notify": { - "type": "boolean", - "description": "Set to true to receive an email when the export is complete. Default is true.", - "default": true, - "x-example": false - } - }, - "required": [ - "resourceId", - "filename" - ] - } - } - ] - } - }, - "\/migrations\/json\/imports": { - "post": { - "summary": "Import documents from a JSON", - "operationId": "migrationsCreateJSONImport", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJSONImport", - "group": null, - "weight": 592, - "cookies": false, - "type": "", - "demo": "migrations\/create-json-import.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-import.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "default": null, - "x-example": "<BUCKET_ID>" - }, - "fileId": { - "type": "string", - "description": "File ID.", - "default": null, - "x-example": "<FILE_ID>" - }, - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", - "default": null, - "x-example": "<ID1:ID2>" - }, - "internalFile": { - "type": "boolean", - "description": "Is the file stored in an internal bucket?", - "default": false, - "x-example": false - } - }, - "required": [ - "bucketId", - "fileId", - "resourceId" - ] - } - } - ] - } - }, - "\/migrations\/nhost": { - "post": { - "summary": "Create NHost migration", - "operationId": "migrationsCreateNHostMigration", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createNHostMigration", - "group": null, - "weight": 588, - "cookies": false, - "type": "", - "demo": "migrations\/create-n-host-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "NHostMigrationResource", - "x-enum-keys": [] - } - }, - "subdomain": { - "type": "string", - "description": "Source's Subdomain", - "default": null, - "x-example": "<SUBDOMAIN>" - }, - "region": { - "type": "string", - "description": "Source's Region", - "default": null, - "x-example": "<REGION>" - }, - "adminSecret": { - "type": "string", - "description": "Source's Admin Secret", - "default": null, - "x-example": "<ADMIN_SECRET>" - }, - "database": { - "type": "string", - "description": "Source's Database Name", - "default": null, - "x-example": "<DATABASE>" - }, - "username": { - "type": "string", - "description": "Source's Database Username", - "default": null, - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Source's Database Password", - "default": null, - "x-example": "<PASSWORD>" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "default": 5432, - "x-example": null, - "format": "int32" - } - }, - "required": [ - "resources", - "subdomain", - "region", - "adminSecret", - "database", - "username", - "password" - ] - } - } - ] - } - }, - "\/migrations\/nhost\/report": { - "get": { - "summary": "Get NHost migration report", - "operationId": "migrationsGetNHostReport", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#\/definitions\/migrationReport" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getNHostReport", - "group": null, - "weight": 589, - "cookies": false, - "type": "", - "demo": "migrations\/get-n-host-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate.", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "NHostMigrationResource", - "x-enum-keys": [] - }, - "in": "query" - }, - { - "name": "subdomain", - "description": "Source's Subdomain.", - "required": true, - "type": "string", - "x-example": "<SUBDOMAIN>", - "in": "query" - }, - { - "name": "region", - "description": "Source's Region.", - "required": true, - "type": "string", - "x-example": "<REGION>", - "in": "query" - }, - { - "name": "adminSecret", - "description": "Source's Admin Secret.", - "required": true, - "type": "string", - "x-example": "<ADMIN_SECRET>", - "in": "query" - }, - { - "name": "database", - "description": "Source's Database Name.", - "required": true, - "type": "string", - "x-example": "<DATABASE>", - "in": "query" - }, - { - "name": "username", - "description": "Source's Database Username.", - "required": true, - "type": "string", - "x-example": "<USERNAME>", - "in": "query" - }, - { - "name": "password", - "description": "Source's Database Password.", - "required": true, - "type": "string", - "x-example": "<PASSWORD>", - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5432, - "in": "query" - } - ] - } - }, - "\/migrations\/supabase": { - "post": { - "summary": "Create Supabase migration", - "operationId": "migrationsCreateSupabaseMigration", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSupabaseMigration", - "group": null, - "weight": 586, - "cookies": false, - "type": "", - "demo": "migrations\/create-supabase-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "SupabaseMigrationResource", - "x-enum-keys": [] - } - }, - "endpoint": { - "type": "string", - "description": "Source's Supabase Endpoint", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - }, - "apiKey": { - "type": "string", - "description": "Source's API Key", - "default": null, - "x-example": "<API_KEY>" - }, - "databaseHost": { - "type": "string", - "description": "Source's Database Host", - "default": null, - "x-example": "<DATABASE_HOST>" - }, - "username": { - "type": "string", - "description": "Source's Database Username", - "default": null, - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Source's Database Password", - "default": null, - "x-example": "<PASSWORD>" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "default": 5432, - "x-example": null, - "format": "int32" - } - }, - "required": [ - "resources", - "endpoint", - "apiKey", - "databaseHost", - "username", - "password" - ] - } - } - ] - } - }, - "\/migrations\/supabase\/report": { - "get": { - "summary": "Get Supabase migration report", - "operationId": "migrationsGetSupabaseReport", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", - "responses": { - "200": { - "description": "Migration Report", - "schema": { - "$ref": "#\/definitions\/migrationReport" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSupabaseReport", - "group": null, - "weight": 587, - "cookies": false, - "type": "", - "demo": "migrations\/get-supabase-report.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "SupabaseMigrationResource", - "x-enum-keys": [] - }, - "in": "query" - }, - { - "name": "endpoint", - "description": "Source's Supabase Endpoint.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "apiKey", - "description": "Source's API Key.", - "required": true, - "type": "string", - "x-example": "<API_KEY>", - "in": "query" - }, - { - "name": "databaseHost", - "description": "Source's Database Host.", - "required": true, - "type": "string", - "x-example": "<DATABASE_HOST>", - "in": "query" - }, - { - "name": "username", - "description": "Source's Database Username.", - "required": true, - "type": "string", - "x-example": "<USERNAME>", - "in": "query" - }, - { - "name": "password", - "description": "Source's Database Password.", - "required": true, - "type": "string", - "x-example": "<PASSWORD>", - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5432, - "in": "query" - } - ] - } - }, - "\/migrations\/{migrationId}": { - "get": { - "summary": "Get migration", - "operationId": "migrationsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", - "responses": { - "200": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 579, - "cookies": false, - "type": "", - "demo": "migrations\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", - "required": true, - "type": "string", - "x-example": "<MIGRATION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update retry migration", - "operationId": "migrationsRetry", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "migrations" - ], - "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", - "responses": { - "202": { - "description": "Migration", - "schema": { - "$ref": "#\/definitions\/migration" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "retry", - "group": null, - "weight": 580, - "cookies": false, - "type": "", - "demo": "migrations\/retry.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", - "required": true, - "type": "string", - "x-example": "<MIGRATION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete migration", - "operationId": "migrationsDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "migrations" - ], - "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 581, - "cookies": false, - "type": "", - "demo": "migrations\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "migrationId", - "description": "Migration ID.", - "required": true, - "type": "string", - "x-example": "<MIGRATION_ID>", - "in": "path" - } - ] - } - }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesListPresences", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "List presence logs.", - "responses": { - "200": { - "description": "Presences List", - "schema": { - "$ref": "#\/definitions\/presenceList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPresences", - "group": "presences", - "weight": 416, - "cookies": false, - "type": "", - "demo": "presences\/list-presences.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/presences\/usage": { - "get": { - "summary": "Get presence usage", - "operationId": "presencesGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Get presence usage metrics and statistics, including the current total of online users and historical online user counts for the selected time range.", - "responses": { - "200": { - "description": "UsagePresence", - "schema": { - "$ref": "#\/definitions\/usagePresence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 414, - "cookies": false, - "type": "", - "demo": "presences\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGetPresence", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Get a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPresence", - "group": "presences", - "weight": 415, - "cookies": false, - "type": "", - "demo": "presences\/get-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsertPresence", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Create or update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertPresence", - "group": "presences", - "weight": 413, - "cookies": false, - "type": "", - "demo": "presences\/upsert-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "upsertPresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "userId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/presence" - } - ], - "description": "", - "demo": "presences\/upsert-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "default": null, - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": [], - "x-example": "{}" - } - }, - "required": [ - "status" - ] - } - } - ] - }, - "patch": { - "summary": "Update presence", - "operationId": "presencesUpdatePresence", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePresence", - "group": "presences", - "weight": 417, - "cookies": false, - "type": "", - "demo": "presences\/update-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "updatePresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "expiresAt", - "metadata", - "permissions" - ], - "required": [ - "presenceId", - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/presence" - } - ], - "description": "", - "demo": "presences\/update-presence.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "default": null, - "x-example": "<STATUS>", - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDeletePresence", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "presences" - ], - "description": "Delete a presence log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePresence", - "group": "presences", - "weight": 418, - "cookies": false, - "type": "", - "demo": "presences\/delete-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - } - ] - } - }, - "\/project": { - "delete": { - "summary": "Delete project", - "operationId": "projectDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 594, - "cookies": false, - "type": "", - "demo": "project\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/auth-methods\/{methodId}": { - "patch": { - "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", - "operationId": "projectUpdateAuthMethod", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAuthMethod", - "group": null, - "weight": 643, - "cookies": false, - "type": "", - "demo": "project\/update-auth-method.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "methodId", - "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", - "required": true, - "type": "string", - "x-example": "email-password", - "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Auth method status.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/keys": { - "get": { - "summary": "List project keys", - "operationId": "projectListKeys", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all API keys from the current project.", - "responses": { - "200": { - "description": "API Keys List", - "schema": { - "$ref": "#\/definitions\/keyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listKeys", - "group": "keys", - "weight": 610, - "cookies": false, - "type": "", - "demo": "project\/list-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project key", - "operationId": "projectCreateKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", - "responses": { - "201": { - "description": "Key", - "schema": { - "$ref": "#\/definitions\/key" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createKey", - "group": "keys", - "weight": 608, - "cookies": false, - "type": "", - "demo": "project\/create-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<KEY_ID>" - }, - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "keyId", - "name", - "scopes" - ] - } - } - ] - } - }, - "\/project\/keys\/ephemeral": { - "post": { - "summary": "Create ephemeral project key", - "operationId": "projectCreateEphemeralKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", - "responses": { - "201": { - "description": "Ephemeral Key", - "schema": { - "$ref": "#\/definitions\/ephemeralKey" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEphemeralKey", - "group": "keys", - "weight": 609, - "cookies": false, - "type": "", - "demo": "project\/create-ephemeral-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "duration": { - "type": "integer", - "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", - "default": null, - "x-example": 1, - "format": "int32" - } - }, - "required": [ - "scopes", - "duration" - ] - } - } - ] - } - }, - "\/project\/keys\/{keyId}": { - "get": { - "summary": "Get project key", - "operationId": "projectGetKey", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a key by its unique ID. ", - "responses": { - "200": { - "description": "Key", - "schema": { - "$ref": "#\/definitions\/key" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getKey", - "group": "keys", - "weight": 611, - "cookies": false, - "type": "", - "demo": "project\/get-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update project key", - "operationId": "projectUpdateKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", - "responses": { - "200": { - "description": "Key", - "schema": { - "$ref": "#\/definitions\/key" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateKey", - "group": "keys", - "weight": 613, - "cookies": false, - "type": "", - "demo": "project\/update-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "name", - "scopes" - ] - } - } - ] - }, - "delete": { - "summary": "Delete project key", - "operationId": "projectDeleteKey", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteKey", - "group": "keys", - "weight": 612, - "cookies": false, - "type": "", - "demo": "project\/delete-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - } - ] - } - }, - "\/project\/labels": { - "put": { - "summary": "Update project labels", - "operationId": "projectUpdateLabels", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": null, - "weight": 595, - "cookies": false, - "type": "", - "demo": "project\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - ] - } - }, - "\/project\/mock-phones": { - "get": { - "summary": "List project mock phones", - "operationId": "projectListMockPhones", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", - "responses": { - "200": { - "description": "Mock Numbers List", - "schema": { - "$ref": "#\/definitions\/mockNumberList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMockPhones", - "group": "mocks", - "weight": 628, - "cookies": false, - "type": "", - "demo": "project\/list-mock-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project mock phone", - "operationId": "projectCreateMockPhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", - "responses": { - "201": { - "description": "Mock Number", - "schema": { - "$ref": "#\/definitions\/mockNumber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMockPhone", - "group": "mocks", - "weight": 627, - "cookies": false, - "type": "", - "demo": "project\/create-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - }, - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "number", - "otp" - ] - } - } - ] - } - }, - "\/project\/mock-phones\/{number}": { - "get": { - "summary": "Get project mock phone", - "operationId": "projectGetMockPhone", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "schema": { - "$ref": "#\/definitions\/mockNumber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMockPhone", - "group": "mocks", - "weight": 629, - "cookies": false, - "type": "", - "demo": "project\/get-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" - } - ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "schema": { - "$ref": "#\/definitions\/mockNumber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMockPhone", - "group": "mocks", - "weight": 630, - "cookies": false, - "type": "", - "demo": "project\/update-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - ] - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMockPhone", - "group": "mocks", - "weight": 631, - "cookies": false, - "type": "", - "demo": "project\/delete-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" - } - ] - } - }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2 Providers List", - "schema": { - "$ref": "#\/definitions\/oAuth2ProviderList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listOAuth2Providers", - "group": "oauth2", - "weight": 644, - "cookies": false, - "type": "", - "demo": "project\/list-o-auth-2-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/oauth2\/amazon": { - "patch": { - "summary": "Update project OAuth2 Amazon", - "operationId": "projectUpdateOAuth2Amazon", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Amazon configuration.", - "responses": { - "200": { - "description": "OAuth2Amazon", - "schema": { - "$ref": "#\/definitions\/oAuth2Amazon" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Amazon", - "group": "oauth2", - "weight": 671, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-amazon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/apple": { - "patch": { - "summary": "Update project OAuth2 Apple", - "operationId": "projectUpdateOAuth2Apple", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Apple configuration.", - "responses": { - "200": { - "description": "OAuth2Apple", - "schema": { - "$ref": "#\/definitions\/oAuth2Apple" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Apple", - "group": "oauth2", - "weight": 686, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-apple.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "serviceId": { - "type": "string", - "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", - "default": null, - "x-example": "<SERVICE_ID>", - "x-nullable": true - }, - "keyId": { - "type": "string", - "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", - "default": null, - "x-example": "<KEY_ID>", - "x-nullable": true - }, - "teamId": { - "type": "string", - "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", - "default": null, - "x-example": "<TEAM_ID>", - "x-nullable": true - }, - "p8File": { - "type": "string", - "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", - "default": null, - "x-example": "<P8_FILE>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/auth0": { - "patch": { - "summary": "Update project OAuth2 Auth0", - "operationId": "projectUpdateOAuth2Auth0", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Auth0 configuration.", - "responses": { - "200": { - "description": "OAuth2Auth0", - "schema": { - "$ref": "#\/definitions\/oAuth2Auth0" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Auth0", - "group": "oauth2", - "weight": 680, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-auth-0.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Auth0 instance. For example: example.us.auth0.com", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/authentik": { - "patch": { - "summary": "Update project OAuth2 Authentik", - "operationId": "projectUpdateOAuth2Authentik", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Authentik configuration.", - "responses": { - "200": { - "description": "OAuth2Authentik", - "schema": { - "$ref": "#\/definitions\/oAuth2Authentik" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Authentik", - "group": "oauth2", - "weight": 679, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-authentik.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Authentik instance. For example: example.authentik.com", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/autodesk": { - "patch": { - "summary": "Update project OAuth2 Autodesk", - "operationId": "projectUpdateOAuth2Autodesk", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Autodesk configuration.", - "responses": { - "200": { - "description": "OAuth2Autodesk", - "schema": { - "$ref": "#\/definitions\/oAuth2Autodesk" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Autodesk", - "group": "oauth2", - "weight": 654, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-autodesk.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/bitbucket": { - "patch": { - "summary": "Update project OAuth2 Bitbucket", - "operationId": "projectUpdateOAuth2Bitbucket", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitbucket configuration.", - "responses": { - "200": { - "description": "OAuth2Bitbucket", - "schema": { - "$ref": "#\/definitions\/oAuth2Bitbucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitbucket", - "group": "oauth2", - "weight": 651, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitbucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", - "default": null, - "x-example": "<KEY>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/bitly": { - "patch": { - "summary": "Update project OAuth2 Bitly", - "operationId": "projectUpdateOAuth2Bitly", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitly configuration.", - "responses": { - "200": { - "description": "OAuth2Bitly", - "schema": { - "$ref": "#\/definitions\/oAuth2Bitly" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitly", - "group": "oauth2", - "weight": 652, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitly.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/box": { - "patch": { - "summary": "Update project OAuth2 Box", - "operationId": "projectUpdateOAuth2Box", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Box configuration.", - "responses": { - "200": { - "description": "OAuth2Box", - "schema": { - "$ref": "#\/definitions\/oAuth2Box" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Box", - "group": "oauth2", - "weight": 653, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-box.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/dailymotion": { - "patch": { - "summary": "Update project OAuth2 Dailymotion", - "operationId": "projectUpdateOAuth2Dailymotion", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dailymotion configuration.", - "responses": { - "200": { - "description": "OAuth2Dailymotion", - "schema": { - "$ref": "#\/definitions\/oAuth2Dailymotion" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dailymotion", - "group": "oauth2", - "weight": 650, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dailymotion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", - "default": null, - "x-example": "<API_KEY>", - "x-nullable": true - }, - "apiSecret": { - "type": "string", - "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", - "default": null, - "x-example": "<API_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/discord": { - "patch": { - "summary": "Update project OAuth2 Discord", - "operationId": "projectUpdateOAuth2Discord", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Discord configuration.", - "responses": { - "200": { - "description": "OAuth2Discord", - "schema": { - "$ref": "#\/definitions\/oAuth2Discord" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Discord", - "group": "oauth2", - "weight": 647, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-discord.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/disqus": { - "patch": { - "summary": "Update project OAuth2 Disqus", - "operationId": "projectUpdateOAuth2Disqus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Disqus configuration.", - "responses": { - "200": { - "description": "OAuth2Disqus", - "schema": { - "$ref": "#\/definitions\/oAuth2Disqus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Disqus", - "group": "oauth2", - "weight": 670, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-disqus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "publicKey": { - "type": "string", - "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "default": null, - "x-example": "<PUBLIC_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/dropbox": { - "patch": { - "summary": "Update project OAuth2 Dropbox", - "operationId": "projectUpdateOAuth2Dropbox", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dropbox configuration.", - "responses": { - "200": { - "description": "OAuth2Dropbox", - "schema": { - "$ref": "#\/definitions\/oAuth2Dropbox" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dropbox", - "group": "oauth2", - "weight": 649, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dropbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "appKey": { - "type": "string", - "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", - "default": null, - "x-example": "<APP_KEY>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", - "default": null, - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/etsy": { - "patch": { - "summary": "Update project OAuth2 Etsy", - "operationId": "projectUpdateOAuth2Etsy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Etsy configuration.", - "responses": { - "200": { - "description": "OAuth2Etsy", - "schema": { - "$ref": "#\/definitions\/oAuth2Etsy" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Etsy", - "group": "oauth2", - "weight": 672, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-etsy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "keyString": { - "type": "string", - "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", - "default": null, - "x-example": "<KEY_STRING>", - "x-nullable": true - }, - "sharedSecret": { - "type": "string", - "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", - "default": null, - "x-example": "<SHARED_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/facebook": { - "patch": { - "summary": "Update project OAuth2 Facebook", - "operationId": "projectUpdateOAuth2Facebook", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Facebook configuration.", - "responses": { - "200": { - "description": "OAuth2Facebook", - "schema": { - "$ref": "#\/definitions\/oAuth2Facebook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Facebook", - "group": "oauth2", - "weight": 673, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-facebook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "appId": { - "type": "string", - "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", - "default": null, - "x-example": "<APP_ID>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", - "default": null, - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/figma": { - "patch": { - "summary": "Update project OAuth2 Figma", - "operationId": "projectUpdateOAuth2Figma", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Figma configuration.", - "responses": { - "200": { - "description": "OAuth2Figma", - "schema": { - "$ref": "#\/definitions\/oAuth2Figma" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Figma", - "group": "oauth2", - "weight": 648, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-figma.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/fusionauth": { - "patch": { - "summary": "Update project OAuth2 FusionAuth", - "operationId": "projectUpdateOAuth2FusionAuth", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 FusionAuth configuration.", - "responses": { - "200": { - "description": "OAuth2FusionAuth", - "schema": { - "$ref": "#\/definitions\/oAuth2FusionAuth" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2FusionAuth", - "group": "oauth2", - "weight": 681, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-fusion-auth.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/github": { - "patch": { - "summary": "Update project OAuth2 GitHub", - "operationId": "projectUpdateOAuth2GitHub", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 GitHub configuration.", - "responses": { - "200": { - "description": "OAuth2GitHub", - "schema": { - "$ref": "#\/definitions\/oAuth2Github" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2GitHub", - "group": "oauth2", - "weight": 646, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-git-hub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/gitlab": { - "patch": { - "summary": "Update project OAuth2 Gitlab", - "operationId": "projectUpdateOAuth2Gitlab", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Gitlab configuration.", - "responses": { - "200": { - "description": "OAuth2Gitlab", - "schema": { - "$ref": "#\/definitions\/oAuth2Gitlab" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Gitlab", - "group": "oauth2", - "weight": 678, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-gitlab.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "default": null, - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/google": { - "patch": { - "summary": "Update project OAuth2 Google", - "operationId": "projectUpdateOAuth2Google", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Google configuration.", - "responses": { - "200": { - "description": "OAuth2Google", - "schema": { - "$ref": "#\/definitions\/oAuth2Google" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Google", - "group": "oauth2", - "weight": 655, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-google.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/keycloak": { - "patch": { - "summary": "Update project OAuth2 Keycloak", - "operationId": "projectUpdateOAuth2Keycloak", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Keycloak configuration.", - "responses": { - "200": { - "description": "OAuth2Keycloak", - "schema": { - "$ref": "#\/definitions\/oAuth2Keycloak" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Keycloak", - "group": "oauth2", - "weight": 682, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-keycloak.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Keycloak instance. For example: keycloak.example.com", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "realmName": { - "type": "string", - "description": "Keycloak realm name. For example: appwrite-realm", - "default": null, - "x-example": "<REALM_NAME>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/kick": { - "patch": { - "summary": "Update project OAuth2 Kick", - "operationId": "projectUpdateOAuth2Kick", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Kick configuration.", - "responses": { - "200": { - "description": "OAuth2Kick", - "schema": { - "$ref": "#\/definitions\/oAuth2Kick" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Kick", - "group": "oauth2", - "weight": 685, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-kick.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/linkedin": { - "patch": { - "summary": "Update project OAuth2 Linkedin", - "operationId": "projectUpdateOAuth2Linkedin", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Linkedin configuration.", - "responses": { - "200": { - "description": "OAuth2Linkedin", - "schema": { - "$ref": "#\/definitions\/oAuth2Linkedin" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Linkedin", - "group": "oauth2", - "weight": 669, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-linkedin.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "primaryClientSecret": { - "type": "string", - "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", - "default": null, - "x-example": "<PRIMARY_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/microsoft": { - "patch": { - "summary": "Update project OAuth2 Microsoft", - "operationId": "projectUpdateOAuth2Microsoft", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Microsoft configuration.", - "responses": { - "200": { - "description": "OAuth2Microsoft", - "schema": { - "$ref": "#\/definitions\/oAuth2Microsoft" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Microsoft", - "group": "oauth2", - "weight": 687, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-microsoft.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", - "default": null, - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "applicationSecret": { - "type": "string", - "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "default": null, - "x-example": "<APPLICATION_SECRET>", - "x-nullable": true - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", - "default": null, - "x-example": "<TENANT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/notion": { - "patch": { - "summary": "Update project OAuth2 Notion", - "operationId": "projectUpdateOAuth2Notion", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Notion configuration.", - "responses": { - "200": { - "description": "OAuth2Notion", - "schema": { - "$ref": "#\/definitions\/oAuth2Notion" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Notion", - "group": "oauth2", - "weight": 666, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-notion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "oauthClientId": { - "type": "string", - "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", - "default": null, - "x-example": "<OAUTH_CLIENT_ID>", - "x-nullable": true - }, - "oauthClientSecret": { - "type": "string", - "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", - "default": null, - "x-example": "<OAUTH_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/oidc": { - "patch": { - "summary": "Update project OAuth2 Oidc", - "operationId": "projectUpdateOAuth2Oidc", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Oidc configuration.", - "responses": { - "200": { - "description": "OAuth2Oidc", - "schema": { - "$ref": "#\/definitions\/oAuth2Oidc" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Oidc", - "group": "oauth2", - "weight": 683, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-oidc.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/okta": { - "patch": { - "summary": "Update project OAuth2 Okta", - "operationId": "projectUpdateOAuth2Okta", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Okta configuration.", - "responses": { - "200": { - "description": "OAuth2Okta", - "schema": { - "$ref": "#\/definitions\/oAuth2Okta" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Okta", - "group": "oauth2", - "weight": 684, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-okta.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "domain": { - "type": "string", - "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", - "default": null, - "x-example": null, - "x-nullable": true - }, - "authorizationServerId": { - "type": "string", - "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", - "default": null, - "x-example": "<AUTHORIZATION_SERVER_ID>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/paypal": { - "patch": { - "summary": "Update project OAuth2 Paypal", - "operationId": "projectUpdateOAuth2Paypal", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Paypal configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "schema": { - "$ref": "#\/definitions\/oAuth2Paypal" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Paypal", - "group": "oauth2", - "weight": 676, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/paypalSandbox": { - "patch": { - "summary": "Update project OAuth2 PaypalSandbox", - "operationId": "projectUpdateOAuth2PaypalSandbox", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 PaypalSandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "schema": { - "$ref": "#\/definitions\/oAuth2Paypal" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2PaypalSandbox", - "group": "oauth2", - "weight": 677, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/podio": { - "patch": { - "summary": "Update project OAuth2 Podio", - "operationId": "projectUpdateOAuth2Podio", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Podio configuration.", - "responses": { - "200": { - "description": "OAuth2Podio", - "schema": { - "$ref": "#\/definitions\/oAuth2Podio" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Podio", - "group": "oauth2", - "weight": 665, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-podio.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/salesforce": { - "patch": { - "summary": "Update project OAuth2 Salesforce", - "operationId": "projectUpdateOAuth2Salesforce", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Salesforce configuration.", - "responses": { - "200": { - "description": "OAuth2Salesforce", - "schema": { - "$ref": "#\/definitions\/oAuth2Salesforce" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Salesforce", - "group": "oauth2", - "weight": 667, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-salesforce.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "default": null, - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "customerSecret": { - "type": "string", - "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", - "default": null, - "x-example": "<CUSTOMER_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/slack": { - "patch": { - "summary": "Update project OAuth2 Slack", - "operationId": "projectUpdateOAuth2Slack", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Slack configuration.", - "responses": { - "200": { - "description": "OAuth2Slack", - "schema": { - "$ref": "#\/definitions\/oAuth2Slack" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Slack", - "group": "oauth2", - "weight": 664, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-slack.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/spotify": { - "patch": { - "summary": "Update project OAuth2 Spotify", - "operationId": "projectUpdateOAuth2Spotify", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Spotify configuration.", - "responses": { - "200": { - "description": "OAuth2Spotify", - "schema": { - "$ref": "#\/definitions\/oAuth2Spotify" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Spotify", - "group": "oauth2", - "weight": 663, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-spotify.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/stripe": { - "patch": { - "summary": "Update project OAuth2 Stripe", - "operationId": "projectUpdateOAuth2Stripe", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Stripe configuration.", - "responses": { - "200": { - "description": "OAuth2Stripe", - "schema": { - "$ref": "#\/definitions\/oAuth2Stripe" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Stripe", - "group": "oauth2", - "weight": 662, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-stripe.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "apiSecretKey": { - "type": "string", - "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", - "default": null, - "x-example": "<API_SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/tradeshift": { - "patch": { - "summary": "Update project OAuth2 Tradeshift", - "operationId": "projectUpdateOAuth2Tradeshift", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "schema": { - "$ref": "#\/definitions\/oAuth2Tradeshift" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Tradeshift", - "group": "oauth2", - "weight": 674, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "default": null, - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "default": null, - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/tradeshiftBox": { - "patch": { - "summary": "Update project OAuth2 Tradeshift Sandbox", - "operationId": "projectUpdateOAuth2TradeshiftSandbox", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "schema": { - "$ref": "#\/definitions\/oAuth2Tradeshift" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2TradeshiftSandbox", - "group": "oauth2", - "weight": 675, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "default": null, - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "default": null, - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/twitch": { - "patch": { - "summary": "Update project OAuth2 Twitch", - "operationId": "projectUpdateOAuth2Twitch", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Twitch configuration.", - "responses": { - "200": { - "description": "OAuth2Twitch", - "schema": { - "$ref": "#\/definitions\/oAuth2Twitch" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Twitch", - "group": "oauth2", - "weight": 661, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-twitch.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/wordpress": { - "patch": { - "summary": "Update project OAuth2 WordPress", - "operationId": "projectUpdateOAuth2WordPress", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 WordPress configuration.", - "responses": { - "200": { - "description": "OAuth2WordPress", - "schema": { - "$ref": "#\/definitions\/oAuth2WordPress" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2WordPress", - "group": "oauth2", - "weight": 660, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-word-press.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/x": { - "patch": { - "summary": "Update project OAuth2 X", - "operationId": "projectUpdateOAuth2X", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 X configuration.", - "responses": { - "200": { - "description": "OAuth2X", - "schema": { - "$ref": "#\/definitions\/oAuth2X" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2X", - "group": "oauth2", - "weight": 659, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2x.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", - "default": null, - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/yahoo": { - "patch": { - "summary": "Update project OAuth2 Yahoo", - "operationId": "projectUpdateOAuth2Yahoo", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yahoo configuration.", - "responses": { - "200": { - "description": "OAuth2Yahoo", - "schema": { - "$ref": "#\/definitions\/oAuth2Yahoo" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yahoo", - "group": "oauth2", - "weight": 668, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yahoo.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/yandex": { - "patch": { - "summary": "Update project OAuth2 Yandex", - "operationId": "projectUpdateOAuth2Yandex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yandex configuration.", - "responses": { - "200": { - "description": "OAuth2Yandex", - "schema": { - "$ref": "#\/definitions\/oAuth2Yandex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yandex", - "group": "oauth2", - "weight": 658, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yandex.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/zoho": { - "patch": { - "summary": "Update project OAuth2 Zoho", - "operationId": "projectUpdateOAuth2Zoho", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoho configuration.", - "responses": { - "200": { - "description": "OAuth2Zoho", - "schema": { - "$ref": "#\/definitions\/oAuth2Zoho" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoho", - "group": "oauth2", - "weight": 657, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoho.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/zoom": { - "patch": { - "summary": "Update project OAuth2 Zoom", - "operationId": "projectUpdateOAuth2Zoom", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoom configuration.", - "responses": { - "200": { - "description": "OAuth2Zoom", - "schema": { - "$ref": "#\/definitions\/oAuth2Zoom" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoom", - "group": "oauth2", - "weight": 656, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoom.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/{provider}": { - "get": { - "summary": "Get project OAuth2 provider", - "operationId": "projectGetOAuth2Provider", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/oAuth2Github" - }, - { - "$ref": "#\/definitions\/oAuth2Discord" - }, - { - "$ref": "#\/definitions\/oAuth2Figma" - }, - { - "$ref": "#\/definitions\/oAuth2Dropbox" - }, - { - "$ref": "#\/definitions\/oAuth2Dailymotion" - }, - { - "$ref": "#\/definitions\/oAuth2Bitbucket" - }, - { - "$ref": "#\/definitions\/oAuth2Bitly" - }, - { - "$ref": "#\/definitions\/oAuth2Box" - }, - { - "$ref": "#\/definitions\/oAuth2Autodesk" - }, - { - "$ref": "#\/definitions\/oAuth2Google" - }, - { - "$ref": "#\/definitions\/oAuth2Zoom" - }, - { - "$ref": "#\/definitions\/oAuth2Zoho" - }, - { - "$ref": "#\/definitions\/oAuth2Yandex" - }, - { - "$ref": "#\/definitions\/oAuth2X" - }, - { - "$ref": "#\/definitions\/oAuth2WordPress" - }, - { - "$ref": "#\/definitions\/oAuth2Twitch" - }, - { - "$ref": "#\/definitions\/oAuth2Stripe" - }, - { - "$ref": "#\/definitions\/oAuth2Spotify" - }, - { - "$ref": "#\/definitions\/oAuth2Slack" - }, - { - "$ref": "#\/definitions\/oAuth2Podio" - }, - { - "$ref": "#\/definitions\/oAuth2Notion" - }, - { - "$ref": "#\/definitions\/oAuth2Salesforce" - }, - { - "$ref": "#\/definitions\/oAuth2Yahoo" - }, - { - "$ref": "#\/definitions\/oAuth2Linkedin" - }, - { - "$ref": "#\/definitions\/oAuth2Disqus" - }, - { - "$ref": "#\/definitions\/oAuth2Amazon" - }, - { - "$ref": "#\/definitions\/oAuth2Etsy" - }, - { - "$ref": "#\/definitions\/oAuth2Facebook" - }, - { - "$ref": "#\/definitions\/oAuth2Tradeshift" - }, - { - "$ref": "#\/definitions\/oAuth2Paypal" - }, - { - "$ref": "#\/definitions\/oAuth2Gitlab" - }, - { - "$ref": "#\/definitions\/oAuth2Authentik" - }, - { - "$ref": "#\/definitions\/oAuth2Auth0" - }, - { - "$ref": "#\/definitions\/oAuth2FusionAuth" - }, - { - "$ref": "#\/definitions\/oAuth2Keycloak" - }, - { - "$ref": "#\/definitions\/oAuth2Oidc" - }, - { - "$ref": "#\/definitions\/oAuth2Apple" - }, - { - "$ref": "#\/definitions\/oAuth2Okta" - }, - { - "$ref": "#\/definitions\/oAuth2Kick" - }, - { - "$ref": "#\/definitions\/oAuth2Microsoft" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/definitions\/oAuth2Github", - "discord": "#\/definitions\/oAuth2Discord", - "figma": "#\/definitions\/oAuth2Figma", - "dropbox": "#\/definitions\/oAuth2Dropbox", - "dailymotion": "#\/definitions\/oAuth2Dailymotion", - "bitbucket": "#\/definitions\/oAuth2Bitbucket", - "bitly": "#\/definitions\/oAuth2Bitly", - "box": "#\/definitions\/oAuth2Box", - "autodesk": "#\/definitions\/oAuth2Autodesk", - "google": "#\/definitions\/oAuth2Google", - "zoom": "#\/definitions\/oAuth2Zoom", - "zoho": "#\/definitions\/oAuth2Zoho", - "yandex": "#\/definitions\/oAuth2Yandex", - "x": "#\/definitions\/oAuth2X", - "wordpress": "#\/definitions\/oAuth2WordPress", - "twitch": "#\/definitions\/oAuth2Twitch", - "stripe": "#\/definitions\/oAuth2Stripe", - "spotify": "#\/definitions\/oAuth2Spotify", - "slack": "#\/definitions\/oAuth2Slack", - "podio": "#\/definitions\/oAuth2Podio", - "notion": "#\/definitions\/oAuth2Notion", - "salesforce": "#\/definitions\/oAuth2Salesforce", - "yahoo": "#\/definitions\/oAuth2Yahoo", - "linkedin": "#\/definitions\/oAuth2Linkedin", - "disqus": "#\/definitions\/oAuth2Disqus", - "amazon": "#\/definitions\/oAuth2Amazon", - "etsy": "#\/definitions\/oAuth2Etsy", - "facebook": "#\/definitions\/oAuth2Facebook", - "tradeshift": "#\/definitions\/oAuth2Tradeshift", - "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", - "paypal": "#\/definitions\/oAuth2Paypal", - "paypalSandbox": "#\/definitions\/oAuth2Paypal", - "gitlab": "#\/definitions\/oAuth2Gitlab", - "authentik": "#\/definitions\/oAuth2Authentik", - "auth0": "#\/definitions\/oAuth2Auth0", - "fusionauth": "#\/definitions\/oAuth2FusionAuth", - "keycloak": "#\/definitions\/oAuth2Keycloak", - "oidc": "#\/definitions\/oAuth2Oidc", - "apple": "#\/definitions\/oAuth2Apple", - "okta": "#\/definitions\/oAuth2Okta", - "kick": "#\/definitions\/oAuth2Kick", - "microsoft": "#\/definitions\/oAuth2Microsoft" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getOAuth2Provider", - "group": "oauth2", - "weight": 645, - "cookies": false, - "type": "", - "demo": "project\/get-o-auth-2-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 provider key. For example: github, google, apple.", - "required": true, - "type": "string", - "x-example": "<PROVIDER>", - "in": "path" - } - ] - } - }, - "\/project\/platforms": { - "get": { - "summary": "List project platforms", - "operationId": "projectListPlatforms", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", - "responses": { - "200": { - "description": "Platforms List", - "schema": { - "$ref": "#\/definitions\/platformList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPlatforms", - "group": "platforms", - "weight": 626, - "cookies": false, - "type": "", - "demo": "project\/list-platforms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/project\/platforms\/android": { - "post": { - "summary": "Create project Android platform", - "operationId": "projectCreateAndroidPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Android", - "schema": { - "$ref": "#\/definitions\/platformAndroid" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAndroidPlatform", - "group": "platforms", - "weight": 622, - "cookies": false, - "type": "", - "demo": "project\/create-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "default": null, - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "platformId", - "name", - "applicationId" - ] - } - } - ] - } - }, - "\/project\/platforms\/android\/{platformId}": { - "put": { - "summary": "Update project Android platform", - "operationId": "projectUpdateAndroidPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", - "responses": { - "200": { - "description": "Platform Android", - "schema": { - "$ref": "#\/definitions\/platformAndroid" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAndroidPlatform", - "group": "platforms", - "weight": 617, - "cookies": false, - "type": "", - "demo": "project\/update-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "default": null, - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "name", - "applicationId" - ] - } - } - ] - } - }, - "\/project\/platforms\/apple": { - "post": { - "summary": "Create project Apple platform", - "operationId": "projectCreateApplePlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Apple", - "schema": { - "$ref": "#\/definitions\/platformApple" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createApplePlatform", - "group": "platforms", - "weight": 621, - "cookies": false, - "type": "", - "demo": "project\/create-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "default": null, - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "platformId", - "name", - "bundleIdentifier" - ] - } - } - ] - } - }, - "\/project\/platforms\/apple\/{platformId}": { - "put": { - "summary": "Update project Apple platform", - "operationId": "projectUpdateApplePlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", - "responses": { - "200": { - "description": "Platform Apple", - "schema": { - "$ref": "#\/definitions\/platformApple" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateApplePlatform", - "group": "platforms", - "weight": 616, - "cookies": false, - "type": "", - "demo": "project\/update-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "default": null, - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "name", - "bundleIdentifier" - ] - } - } - ] - } - }, - "\/project\/platforms\/linux": { - "post": { - "summary": "Create project Linux platform", - "operationId": "projectCreateLinuxPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Linux", - "schema": { - "$ref": "#\/definitions\/platformLinux" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLinuxPlatform", - "group": "platforms", - "weight": 624, - "cookies": false, - "type": "", - "demo": "project\/create-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageName" - ] - } - } - ] - } - }, - "\/project\/platforms\/linux\/{platformId}": { - "put": { - "summary": "Update project Linux platform", - "operationId": "projectUpdateLinuxPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", - "responses": { - "200": { - "description": "Platform Linux", - "schema": { - "$ref": "#\/definitions\/platformLinux" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLinuxPlatform", - "group": "platforms", - "weight": 619, - "cookies": false, - "type": "", - "demo": "project\/update-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "name", - "packageName" - ] - } - } - ] - } - }, - "\/project\/platforms\/web": { - "post": { - "summary": "Create project web platform", - "operationId": "projectCreateWebPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Web", - "schema": { - "$ref": "#\/definitions\/platformWeb" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWebPlatform", - "group": "platforms", - "weight": 620, - "cookies": false, - "type": "", - "demo": "project\/create-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "default": null, - "x-example": "app.example.com" - } - }, - "required": [ - "platformId", - "name", - "hostname" - ] - } - } - ] - } - }, - "\/project\/platforms\/web\/{platformId}": { - "put": { - "summary": "Update project web platform", - "operationId": "projectUpdateWebPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", - "responses": { - "200": { - "description": "Platform Web", - "schema": { - "$ref": "#\/definitions\/platformWeb" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWebPlatform", - "group": "platforms", - "weight": 615, - "cookies": false, - "type": "", - "demo": "project\/update-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "default": null, - "x-example": "app.example.com" - } - }, - "required": [ - "name", - "hostname" - ] - } - } - ] - } - }, - "\/project\/platforms\/windows": { - "post": { - "summary": "Create project Windows platform", - "operationId": "projectCreateWindowsPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Windows", - "schema": { - "$ref": "#\/definitions\/platformWindows" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWindowsPlatform", - "group": "platforms", - "weight": 623, - "cookies": false, - "type": "", - "demo": "project\/create-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageIdentifierName" - ] - } - } - ] - } - }, - "\/project\/platforms\/windows\/{platformId}": { - "put": { - "summary": "Update project Windows platform", - "operationId": "projectUpdateWindowsPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", - "responses": { - "200": { - "description": "Platform Windows", - "schema": { - "$ref": "#\/definitions\/platformWindows" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWindowsPlatform", - "group": "platforms", - "weight": 618, - "cookies": false, - "type": "", - "demo": "project\/update-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "name", - "packageIdentifierName" - ] - } - } - ] - } - }, - "\/project\/platforms\/{platformId}": { - "get": { - "summary": "Get project platform", - "operationId": "projectGetPlatform", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", - "responses": { - "200": { - "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/platformWeb" - }, - { - "$ref": "#\/definitions\/platformApple" - }, - { - "$ref": "#\/definitions\/platformAndroid" - }, - { - "$ref": "#\/definitions\/platformWindows" - }, - { - "$ref": "#\/definitions\/platformLinux" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/definitions\/platformWeb", - "apple": "#\/definitions\/platformApple", - "android": "#\/definitions\/platformAndroid", - "windows": "#\/definitions\/platformWindows", - "linux": "#\/definitions\/platformLinux" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPlatform", - "group": "platforms", - "weight": 625, - "cookies": false, - "type": "", - "demo": "project\/get-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete project platform", - "operationId": "projectDeletePlatform", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePlatform", - "group": "platforms", - "weight": 614, - "cookies": false, - "type": "", - "demo": "project\/delete-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - } - ] - } - }, - "\/project\/policies": { - "get": { - "summary": "List project policies", - "operationId": "projectListPolicies", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all project policies and their current configuration.", - "responses": { - "200": { - "description": "Policies List", - "schema": { - "$ref": "#\/definitions\/policyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPolicies", - "group": "policies", - "weight": 632, - "cookies": false, - "type": "", - "demo": "project\/list-policies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/project\/policies\/membership-privacy": { - "patch": { - "summary": "Update membership privacy policy", - "operationId": "projectUpdateMembershipPrivacyPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipPrivacyPolicy", - "group": "policies", - "weight": 634, - "cookies": false, - "type": "", - "demo": "project\/update-membership-privacy-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "boolean", - "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userEmail": { - "type": "boolean", - "description": "Set to true if you want make user email visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userPhone": { - "type": "boolean", - "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userName": { - "type": "boolean", - "description": "Set to true if you want make user name visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userMFA": { - "type": "boolean", - "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", - "default": null, - "x-example": false - } - } - } - } - ] - } - }, - "\/project\/policies\/password-dictionary": { - "patch": { - "summary": "Update password dictionary policy", - "operationId": "projectUpdatePasswordDictionaryPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordDictionaryPolicy", - "group": "policies", - "weight": 635, - "cookies": false, - "type": "", - "demo": "project\/update-password-dictionary-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/password-history": { - "patch": { - "summary": "Update password history policy", - "operationId": "projectUpdatePasswordHistoryPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordHistoryPolicy", - "group": "policies", - "weight": 636, - "cookies": false, - "type": "", - "demo": "project\/update-password-history-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - ] - } - }, - "\/project\/policies\/password-personal-data": { - "patch": { - "summary": "Update password personal data policy", - "operationId": "projectUpdatePasswordPersonalDataPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordPersonalDataPolicy", - "group": "policies", - "weight": 637, - "cookies": false, - "type": "", - "demo": "project\/update-password-personal-data-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/session-alert": { - "patch": { - "summary": "Update session alert policy", - "operationId": "projectUpdateSessionAlertPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionAlertPolicy", - "group": "policies", - "weight": 638, - "cookies": false, - "type": "", - "demo": "project\/update-session-alert-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/session-duration": { - "patch": { - "summary": "Update session duration policy", - "operationId": "projectUpdateSessionDurationPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update maximum duration how long sessions created within a project should stay active for.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionDurationPolicy", - "group": "policies", - "weight": 639, - "cookies": false, - "type": "", - "demo": "project\/update-session-duration-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", - "default": null, - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "duration" - ] - } - } - ] - } - }, - "\/project\/policies\/session-invalidation": { - "patch": { - "summary": "Update session invalidation policy", - "operationId": "projectUpdateSessionInvalidationPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionInvalidationPolicy", - "group": "policies", - "weight": 640, - "cookies": false, - "type": "", - "demo": "project\/update-session-invalidation-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/session-limit": { - "patch": { - "summary": "Update session limit policy", - "operationId": "projectUpdateSessionLimitPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionLimitPolicy", - "group": "policies", - "weight": 641, - "cookies": false, - "type": "", - "demo": "project\/update-session-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - ] - } - }, - "\/project\/policies\/user-limit": { - "patch": { - "summary": "Update user limit policy", - "operationId": "projectUpdateUserLimitPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUserLimitPolicy", - "group": "policies", - "weight": 642, - "cookies": false, - "type": "", - "demo": "project\/update-user-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - ] - } - }, - "\/project\/policies\/{policyId}": { - "get": { - "summary": "Get project policy", - "operationId": "projectGetPolicy", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", - "responses": { - "200": { - "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/policyPasswordDictionary" - }, - { - "$ref": "#\/definitions\/policyPasswordHistory" - }, - { - "$ref": "#\/definitions\/policyPasswordPersonalData" - }, - { - "$ref": "#\/definitions\/policySessionAlert" - }, - { - "$ref": "#\/definitions\/policySessionDuration" - }, - { - "$ref": "#\/definitions\/policySessionInvalidation" - }, - { - "$ref": "#\/definitions\/policySessionLimit" - }, - { - "$ref": "#\/definitions\/policyUserLimit" - }, - { - "$ref": "#\/definitions\/policyMembershipPrivacy" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/definitions\/policyPasswordDictionary", - "password-history": "#\/definitions\/policyPasswordHistory", - "password-personal-data": "#\/definitions\/policyPasswordPersonalData", - "session-alert": "#\/definitions\/policySessionAlert", - "session-duration": "#\/definitions\/policySessionDuration", - "session-invalidation": "#\/definitions\/policySessionInvalidation", - "session-limit": "#\/definitions\/policySessionLimit", - "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPolicy", - "group": "policies", - "weight": 633, - "cookies": false, - "type": "", - "demo": "project\/get-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", - "required": true, - "type": "string", - "x-example": "password-dictionary", - "enum": [ - "password-dictionary", - "password-history", - "password-personal-data", - "session-alert", - "session-duration", - "session-invalidation", - "session-limit", - "user-limit", - "membership-privacy" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/project\/protocols\/{protocolId}": { - "patch": { - "summary": "Update project protocol", - "operationId": "projectUpdateProtocol", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateProtocol", - "group": null, - "weight": 596, - "cookies": false, - "type": "", - "demo": "project\/update-protocol.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "protocolId", - "description": "Protocol name. Can be one of: rest, graphql, websocket", - "required": true, - "type": "string", - "x-example": "rest", - "enum": [ - "rest", - "graphql", - "websocket" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Protocol status.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/services\/{serviceId}": { - "patch": { - "summary": "Update project service", - "operationId": "projectUpdateService", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateService", - "group": null, - "weight": 597, - "cookies": false, - "type": "", - "demo": "project\/update-service.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "serviceId", - "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", - "required": true, - "type": "string", - "x-example": "account", - "enum": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Service status.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/smtp": { - "patch": { - "summary": "Update project SMTP configuration", - "operationId": "projectUpdateSMTP", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSMTP", - "group": "smtp", - "weight": 598, - "cookies": false, - "type": "", - "demo": "project\/update-smtp.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "SMTP server hostname (domain)", - "default": null, - "x-example": null, - "x-nullable": true - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "default": null, - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "SMTP server username. Leave empty for no authorization.", - "default": null, - "x-example": "<USERNAME>", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", - "default": null, - "x-example": "<PASSWORD>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email address shown in inbox as the sender of the email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name shown in inbox as the sender of the email.", - "default": null, - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Email used when user replies to the email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Name used when user replies to the email.", - "default": null, - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - }, - "secure": { - "type": "string", - "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", - "default": null, - "x-example": "tls", - "enum": [ - "tls", - "ssl" - ], - "x-enum-name": null, - "x-enum-keys": [], - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/smtp\/tests": { - "post": { - "summary": "Create project SMTP test", - "operationId": "projectCreateSMTPTest", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Send a test email to verify SMTP configuration. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSMTPTest", - "group": "smtp", - "weight": 599, - "cookies": false, - "type": "", - "demo": "project\/create-smtp-test.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "emails" - ] - } - } - ] - } - }, - "\/project\/templates\/email": { - "get": { - "summary": "List project email templates", - "operationId": "projectListEmailTemplates", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", - "responses": { - "200": { - "description": "Email Templates List", - "schema": { - "$ref": "#\/definitions\/emailTemplateList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listEmailTemplates", - "group": "templates", - "weight": 600, - "cookies": false, - "type": "", - "demo": "project\/list-email-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "patch": { - "summary": "Update project email template", - "operationId": "projectUpdateEmailTemplate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#\/definitions\/emailTemplate" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailTemplate", - "group": "templates", - "weight": 602, - "cookies": false, - "type": "", - "demo": "project\/update-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "default": null, - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [] - }, - "locale": { - "type": "string", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "default": "", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [] - }, - "subject": { - "type": "string", - "description": "Subject of the email template. Can be up to 255 characters.", - "default": null, - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "message": { - "type": "string", - "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", - "default": null, - "x-example": "<MESSAGE>", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name of the email sender.", - "default": null, - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Reply to name.", - "default": null, - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - } - }, - "required": [ - "templateId" - ] - } - } - ] - } - }, - "\/project\/templates\/email\/{templateId}": { - "get": { - "summary": "Get project email template", - "operationId": "projectGetEmailTemplate", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#\/definitions\/emailTemplate" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getEmailTemplate", - "group": "templates", - "weight": 601, - "cookies": false, - "type": "", - "demo": "project\/get-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "required": true, - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "required": false, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "default": "", - "in": "query" - } - ] - } - }, - "\/project\/usage": { - "get": { - "summary": "Get project usage stats", - "operationId": "projectGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.", - "responses": { - "200": { - "description": "UsageProject", - "schema": { - "$ref": "#\/definitions\/usageProject" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 61, - "cookies": false, - "type": "", - "demo": "project\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "startDate", - "description": "Starting date for the usage", - "required": true, - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00", - "in": "query" - }, - { - "name": "endDate", - "description": "End date for the usage", - "required": true, - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00", - "in": "query" - }, - { - "name": "period", - "description": "Period used", - "required": false, - "type": "string", - "x-example": "1h", - "enum": [ - "1h", - "1d" - ], - "x-enum-name": "ProjectUsageRange", - "x-enum-keys": [ - "One Hour", - "One Day" - ], - "default": "1d", - "in": "query" - } - ] - } - }, - "\/project\/variables": { - "get": { - "summary": "List project variables", - "operationId": "projectListVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all project environment variables.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#\/definitions\/variableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 604, - "cookies": false, - "type": "", - "demo": "project\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project variable", - "operationId": "projectCreateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 603, - "cookies": false, - "type": "", - "demo": "project\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<VARIABLE_ID>" - }, - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "variableId", - "key", - "value" - ] - } - } - ] - } - }, - "\/project\/variables\/{variableId}": { - "get": { - "summary": "Get project variable", - "operationId": "projectGetVariable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a variable by its unique ID. ", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 605, - "cookies": false, - "type": "", - "demo": "project\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update project variable", - "operationId": "projectUpdateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 607, - "cookies": false, - "type": "", - "demo": "project\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>", - "x-nullable": true - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete project variable", - "operationId": "projectDeleteVariable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a variable by its unique ID. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 606, - "cookies": false, - "type": "", - "demo": "project\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "\/projects": { - "get": { - "summary": "List projects", - "operationId": "projectsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Get a list of all projects. You can use the query params to filter your results. ", - "responses": { - "200": { - "description": "Projects List", - "schema": { - "$ref": "#\/definitions\/projectList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "projects", - "weight": 408, - "cookies": false, - "type": "", - "demo": "projects\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project", - "operationId": "projectsCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Create a new project. You can create a maximum of 100 projects per account. ", - "responses": { - "201": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "projects", - "weight": 406, - "cookies": false, - "type": "", - "demo": "projects\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "projectId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "teamId": { - "type": "string", - "description": "Team unique ID.", - "default": null, - "x-example": "<TEAM_ID>" - }, - "region": { - "type": "string", - "description": "Project Region.", - "default": "default", - "x-example": "default", - "enum": [ - "default" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "default": "", - "x-example": "<DESCRIPTION>" - }, - "logo": { - "type": "string", - "description": "Project logo.", - "default": "", - "x-example": "<LOGO>" - }, - "url": { - "type": "string", - "description": "Project URL.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "legalName": { - "type": "string", - "description": "Project legal Name. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_NAME>" - }, - "legalCountry": { - "type": "string", - "description": "Project legal Country. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_COUNTRY>" - }, - "legalState": { - "type": "string", - "description": "Project legal State. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_STATE>" - }, - "legalCity": { - "type": "string", - "description": "Project legal City. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_CITY>" - }, - "legalAddress": { - "type": "string", - "description": "Project legal Address. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_ADDRESS>" - }, - "legalTaxId": { - "type": "string", - "description": "Project legal Tax ID. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_TAX_ID>" - } - }, - "required": [ - "projectId", - "name", - "teamId" - ] - } - } - ] - } - }, - "\/projects\/{projectId}": { - "get": { - "summary": "Get project", - "operationId": "projectsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "projects", - "weight": 57, - "cookies": false, - "type": "", - "demo": "projects\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update project", - "operationId": "projectsUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Update a project by its unique ID.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "projects", - "weight": 407, - "cookies": false, - "type": "", - "demo": "projects\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "default": "", - "x-example": "<DESCRIPTION>" - }, - "logo": { - "type": "string", - "description": "Project logo.", - "default": "", - "x-example": "<LOGO>" - }, - "url": { - "type": "string", - "description": "Project URL.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "legalName": { - "type": "string", - "description": "Project legal name. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_NAME>" - }, - "legalCountry": { - "type": "string", - "description": "Project legal country. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_COUNTRY>" - }, - "legalState": { - "type": "string", - "description": "Project legal state. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_STATE>" - }, - "legalCity": { - "type": "string", - "description": "Project legal city. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_CITY>" - }, - "legalAddress": { - "type": "string", - "description": "Project legal address. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_ADDRESS>" - }, - "legalTaxId": { - "type": "string", - "description": "Project legal tax ID. Max length: 256 chars.", - "default": "", - "x-example": "<LEGAL_TAX_ID>" - } - }, - "required": [ - "name" - ] - } - } - ] - } - }, - "\/projects\/{projectId}\/dev-keys": { - "get": { - "summary": "List dev keys", - "operationId": "projectsListDevKeys", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", - "responses": { - "200": { - "description": "Dev Keys List", - "schema": { - "$ref": "#\/definitions\/devKeyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDevKeys", - "group": "devKeys", - "weight": 404, - "cookies": false, - "type": "", - "demo": "projects\/list-dev-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create dev key", - "operationId": "projectsCreateDevKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", - "responses": { - "201": { - "description": "DevKey", - "schema": { - "$ref": "#\/definitions\/devKey" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDevKey", - "group": "devKeys", - "weight": 401, - "cookies": false, - "type": "", - "demo": "projects\/create-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - } - }, - "required": [ - "name", - "expire" - ] - } - } - ] - } - }, - "\/projects\/{projectId}\/dev-keys\/{keyId}": { - "get": { - "summary": "Get dev key", - "operationId": "projectsGetDevKey", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Get a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", - "responses": { - "200": { - "description": "DevKey", - "schema": { - "$ref": "#\/definitions\/devKey" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDevKey", - "group": "devKeys", - "weight": 403, - "cookies": false, - "type": "", - "demo": "projects\/get-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update dev key", - "operationId": "projectsUpdateDevKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Update a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", - "responses": { - "200": { - "description": "DevKey", - "schema": { - "$ref": "#\/definitions\/devKey" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDevKey", - "group": "devKeys", - "weight": 402, - "cookies": false, - "type": "", - "demo": "projects\/update-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - } - }, - "required": [ - "name", - "expire" - ] - } - } - ] - }, - "delete": { - "summary": "Delete dev key", - "operationId": "projectsDeleteDevKey", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "projects" - ], - "description": "Delete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDevKey", - "group": "devKeys", - "weight": 405, - "cookies": false, - "type": "", - "demo": "projects\/delete-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - } - ] - } - }, - "\/projects\/{projectId}\/schedules": { - "get": { - "summary": "List schedules", - "operationId": "projectsListSchedules", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Get a list of all the project's schedules. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Schedules List", - "schema": { - "$ref": "#\/definitions\/scheduleList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSchedules", - "group": "schedules", - "weight": 412, - "cookies": false, - "type": "", - "demo": "projects\/list-schedules.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "schedules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-schedules.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create schedule", - "operationId": "projectsCreateSchedule", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Create a new schedule for a resource.", - "responses": { - "201": { - "description": "Schedule", - "schema": { - "$ref": "#\/definitions\/schedule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSchedule", - "group": "schedules", - "weight": 410, - "cookies": false, - "type": "", - "demo": "projects\/create-schedule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "schedules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-schedule.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "resourceType": { - "type": "string", - "description": "The resource type for the schedule. Possible values: function, execution, message.", - "default": null, - "x-example": "function", - "enum": [ - "function", - "execution", - "message" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "resourceId": { - "type": "string", - "description": "The resource ID to associate with this schedule.", - "default": null, - "x-example": "<RESOURCE_ID>" - }, - "schedule": { - "type": "string", - "description": "Schedule CRON expression.", - "default": null, - "x-example": null - }, - "active": { - "type": "boolean", - "description": "Whether the schedule is active.", - "default": false, - "x-example": false - }, - "data": { - "type": "object", - "description": "Schedule data as a JSON string. Used to store resource-specific context needed for execution.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "resourceType", - "resourceId", - "schedule" - ] - } - } - ] - } - }, - "\/projects\/{projectId}\/schedules\/{scheduleId}": { - "get": { - "summary": "Get schedule", - "operationId": "projectsGetSchedule", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Get a schedule by its unique ID.", - "responses": { - "200": { - "description": "Schedule", - "schema": { - "$ref": "#\/definitions\/schedule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSchedule", - "group": "schedules", - "weight": 411, - "cookies": false, - "type": "", - "demo": "projects\/get-schedule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "schedules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-schedule.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "scheduleId", - "description": "Schedule ID.", - "required": true, - "type": "string", - "x-example": "<SCHEDULE_ID>", - "in": "path" - } - ] - } - }, - "\/projects\/{projectId}\/team": { - "patch": { - "summary": "Update project team", - "operationId": "projectsUpdateTeam", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "Update the team ID of a project allowing for it to be transferred to another team.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTeam", - "group": "projects", - "weight": 409, - "cookies": false, - "type": "", - "demo": "projects\/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "<PROJECT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer project to.", - "default": null, - "x-example": "<TEAM_ID>" - } - }, - "required": [ - "teamId" - ] - } - } - ] - } - }, - "\/proxy\/rules": { - "get": { - "summary": "List rules", - "operationId": "proxyListRules", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rule List", - "schema": { - "$ref": "#\/definitions\/proxyRuleList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRules", - "group": null, - "weight": 521, - "cookies": false, - "type": "", - "demo": "proxy\/list-rules.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/proxy\/rules\/api": { - "post": { - "summary": "Create API rule", - "operationId": "proxyCreateAPIRule", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for serving Appwrite's API on custom domain.", - "responses": { - "201": { - "description": "Rule", - "schema": { - "$ref": "#\/definitions\/proxyRule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAPIRule", - "group": null, - "weight": 516, - "cookies": false, - "type": "", - "demo": "proxy\/create-api-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "default": null, - "x-example": null - } - }, - "required": [ - "domain" - ] - } - } - ] - } - }, - "\/proxy\/rules\/function": { - "post": { - "summary": "Create function rule", - "operationId": "proxyCreateFunctionRule", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for executing Appwrite Function on custom domain.", - "responses": { - "201": { - "description": "Rule", - "schema": { - "$ref": "#\/definitions\/proxyRule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFunctionRule", - "group": null, - "weight": 518, - "cookies": false, - "type": "", - "demo": "proxy\/create-function-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "default": null, - "x-example": null - }, - "functionId": { - "type": "string", - "description": "ID of function to be executed.", - "default": null, - "x-example": "<FUNCTION_ID>" - }, - "branch": { - "type": "string", - "description": "Name of VCS branch to deploy changes automatically", - "default": "", - "x-example": "<BRANCH>" - } - }, - "required": [ - "domain", - "functionId" - ] - } - } - ] - } - }, - "\/proxy\/rules\/redirect": { - "post": { - "summary": "Create Redirect rule", - "operationId": "proxyCreateRedirectRule", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for to redirect from custom domain to another domain.", - "responses": { - "201": { - "description": "Rule", - "schema": { - "$ref": "#\/definitions\/proxyRule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRedirectRule", - "group": null, - "weight": 519, - "cookies": false, - "type": "", - "demo": "proxy\/create-redirect-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "default": null, - "x-example": null - }, - "url": { - "type": "string", - "description": "Target URL of redirection", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - }, - "statusCode": { - "type": "string", - "description": "Status code of redirection", - "default": null, - "x-example": "301", - "enum": [ - "301", - "302", - "307", - "308" - ], - "x-enum-name": null, - "x-enum-keys": [ - "Moved Permanently 301", - "Found 302", - "Temporary Redirect 307", - "Permanent Redirect 308" - ] - }, - "resourceId": { - "type": "string", - "description": "ID of parent resource.", - "default": null, - "x-example": "<RESOURCE_ID>" - }, - "resourceType": { - "type": "string", - "description": "Type of parent resource.", - "default": null, - "x-example": "site", - "enum": [ - "site", - "function" - ], - "x-enum-name": "ProxyResourceType", - "x-enum-keys": [ - "Site", - "Function" - ] - } - }, - "required": [ - "domain", - "url", - "statusCode", - "resourceId", - "resourceType" - ] - } - } - ] - } - }, - "\/proxy\/rules\/site": { - "post": { - "summary": "Create site rule", - "operationId": "proxyCreateSiteRule", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for serving Appwrite Site on custom domain.", - "responses": { - "201": { - "description": "Rule", - "schema": { - "$ref": "#\/definitions\/proxyRule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSiteRule", - "group": null, - "weight": 517, - "cookies": false, - "type": "", - "demo": "proxy\/create-site-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "default": null, - "x-example": null - }, - "siteId": { - "type": "string", - "description": "ID of site to be executed.", - "default": null, - "x-example": "<SITE_ID>" - }, - "branch": { - "type": "string", - "description": "Name of VCS branch to deploy changes automatically", - "default": "", - "x-example": "<BRANCH>" - } - }, - "required": [ - "domain", - "siteId" - ] - } - } - ] - } - }, - "\/proxy\/rules\/{ruleId}": { - "get": { - "summary": "Get rule", - "operationId": "proxyGetRule", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Get a proxy rule by its unique ID.", - "responses": { - "200": { - "description": "Rule", - "schema": { - "$ref": "#\/definitions\/proxyRule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRule", - "group": null, - "weight": 520, - "cookies": false, - "type": "", - "demo": "proxy\/get-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "type": "string", - "x-example": "<RULE_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete rule", - "operationId": "proxyDeleteRule", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "proxy" - ], - "description": "Delete a proxy rule by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRule", - "group": null, - "weight": 522, - "cookies": false, - "type": "", - "demo": "proxy\/delete-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "type": "string", - "x-example": "<RULE_ID>", - "in": "path" - } - ] - } - }, - "\/proxy\/rules\/{ruleId}\/verification": { - "patch": { - "summary": "Update rule verification status", - "operationId": "proxyUpdateRuleVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "proxy" - ], - "description": "Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.", - "responses": { - "200": { - "description": "Rule", - "schema": { - "$ref": "#\/definitions\/proxyRule" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRuleVerification", - "group": null, - "weight": 523, - "cookies": false, - "type": "", - "demo": "proxy\/update-rule-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "ruleId", - "description": "Rule ID.", - "required": true, - "type": "string", - "x-example": "<RULE_ID>", - "in": "path" - } - ] - } - }, - "\/sites": { - "get": { - "summary": "List sites", - "operationId": "sitesList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all the project's sites. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Sites List", - "schema": { - "$ref": "#\/definitions\/siteList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "sites", - "weight": 476, - "cookies": false, - "type": "", - "demo": "sites\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create site", - "operationId": "sitesCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new site.", - "responses": { - "201": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "sites", - "weight": 474, - "cookies": false, - "type": "", - "demo": "sites\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "siteId": { - "type": "string", - "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<SITE_ID>" - }, - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "default": null, - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "default": true, - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "default": 30, - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "default": "", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "default": "", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "default": "", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "default": "", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "default": null, - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "default": "", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "default": "", - "x-example": "<FALLBACK_FILE>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "siteId", - "name", - "framework", - "buildRuntime" - ] - } - } - ] - } - }, - "\/sites\/frameworks": { - "get": { - "summary": "List frameworks", - "operationId": "sitesListFrameworks", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all frameworks that are currently available on the server instance.", - "responses": { - "200": { - "description": "Frameworks List", - "schema": { - "$ref": "#\/definitions\/frameworkList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFrameworks", - "group": "frameworks", - "weight": 479, - "cookies": false, - "type": "", - "demo": "sites\/list-frameworks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "sitesListSpecifications", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "List allowed site specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "schema": { - "$ref": "#\/definitions\/specificationList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "frameworks", - "weight": 502, - "cookies": false, - "type": "", - "demo": "sites\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/templates": { - "get": { - "summary": "List templates", - "operationId": "sitesListTemplates", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "List available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", - "responses": { - "200": { - "description": "Site Templates List", - "schema": { - "$ref": "#\/definitions\/templateSiteList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTemplates", - "group": "templates", - "weight": 498, - "cookies": false, - "type": "", - "demo": "sites\/list-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "frameworks", - "description": "List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [], - "in": "query" - }, - { - "name": "useCases", - "description": "List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "portfolio", - "starter", - "events", - "ecommerce", - "documentation", - "blog", - "ai", - "forms", - "dashboard" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset the list of returned templates. Maximum offset is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "\/sites\/templates\/{templateId}": { - "get": { - "summary": "Get site template", - "operationId": "sitesGetTemplate", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", - "responses": { - "200": { - "description": "Template Site", - "schema": { - "$ref": "#\/definitions\/templateSite" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTemplate", - "group": "templates", - "weight": 499, - "cookies": false, - "type": "", - "demo": "sites\/get-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Template ID.", - "required": true, - "type": "string", - "x-example": "<TEMPLATE_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/usage": { - "get": { - "summary": "Get sites usage", - "operationId": "sitesListUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageSites", - "schema": { - "$ref": "#\/definitions\/usageSites" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 500, - "cookies": false, - "type": "", - "demo": "sites\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}": { - "get": { - "summary": "Get site", - "operationId": "sitesGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "sites", - "weight": 475, - "cookies": false, - "type": "", - "demo": "sites\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update site", - "operationId": "sitesUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Update site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "sites", - "weight": 477, - "cookies": false, - "type": "", - "demo": "sites\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "default": null, - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "default": true, - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "default": 30, - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "default": "", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "default": "", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "default": "", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "default": "", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "default": "", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "default": "", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "default": "", - "x-example": "<FALLBACK_FILE>" - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name", - "framework" - ] - } - } - ] - }, - "delete": { - "summary": "Delete site", - "operationId": "sitesDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "sites" - ], - "description": "Delete a site by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "sites", - "weight": 478, - "cookies": false, - "type": "", - "demo": "sites\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployment": { - "patch": { - "summary": "Update site's deployment", - "operationId": "sitesUpdateSiteDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", - "responses": { - "200": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSiteDeployment", - "group": "sites", - "weight": 485, - "cookies": false, - "type": "", - "demo": "sites\/update-site-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "sitesListDeployments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { - "$ref": "#\/definitions\/deploymentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 484, - "cookies": false, - "type": "", - "demo": "sites\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "sitesCreateDeployment", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 480, - "cookies": false, - "type": "upload", - "demo": "sites\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "installCommand", - "description": "Install Commands.", - "required": false, - "type": "string", - "x-example": "<INSTALL_COMMAND>", - "in": "formData" - }, - { - "name": "buildCommand", - "description": "Build Commands.", - "required": false, - "type": "string", - "x-example": "<BUILD_COMMAND>", - "in": "formData" - }, - { - "name": "outputDirectory", - "description": "Output Directory.", - "required": false, - "type": "string", - "x-example": "<OUTPUT_DIRECTORY>", - "in": "formData" - }, - { - "name": "code", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "activate", - "description": "Automatically activate the deployment when it is finished building.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "formData" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "sitesCreateDuplicateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 488, - "cookies": false, - "type": "", - "demo": "sites\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "sitesCreateTemplateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 481, - "cookies": false, - "type": "", - "demo": "sites\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "default": null, - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "default": null, - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to site code in the template repo.", - "default": null, - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "default": null, - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "sitesCreateVcsDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 482, - "cookies": false, - "type": "", - "demo": "sites\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "default": null, - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "sitesGetDeployment", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 483, - "cookies": false, - "type": "", - "demo": "sites\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "sitesDeleteDeployment", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "sites" - ], - "description": "Delete a site deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 486, - "cookies": false, - "type": "", - "demo": "sites\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "sitesGetDeploymentDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "sites" - ], - "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 487, - "cookies": false, - "type": "location", - "demo": "sites\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source", - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "sitesUpdateDeploymentStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 489, - "cookies": false, - "type": "", - "demo": "sites\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/logs": { - "get": { - "summary": "List logs", - "operationId": "sitesListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all site logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#\/definitions\/executionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 491, - "cookies": false, - "type": "", - "demo": "sites\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/logs\/{logId}": { - "get": { - "summary": "Get log", - "operationId": "sitesGetLog", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site request log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getLog", - "group": "logs", - "weight": 490, - "cookies": false, - "type": "", - "demo": "sites\/get-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "type": "string", - "x-example": "<LOG_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete log", - "operationId": "sitesDeleteLog", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Delete a site log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteLog", - "group": "logs", - "weight": 492, - "cookies": false, - "type": "", - "demo": "sites\/delete-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "type": "string", - "x-example": "<LOG_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/usage": { - "get": { - "summary": "Get site usage", - "operationId": "sitesGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. 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, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageSite", - "schema": { - "$ref": "#\/definitions\/usageSite" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 501, - "cookies": false, - "type": "", - "demo": "sites\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "sitesListVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all variables of a specific site.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#\/definitions\/variableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 495, - "cookies": false, - "type": "", - "demo": "sites\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "sitesCreateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 493, - "cookies": false, - "type": "", - "demo": "sites\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "sitesGetVariable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 494, - "cookies": false, - "type": "", - "demo": "sites\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "sitesUpdateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 496, - "cookies": false, - "type": "", - "demo": "sites\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "sitesDeleteVariable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "sites" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 497, - "cookies": false, - "type": "", - "demo": "sites\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Buckets List", - "schema": { - "$ref": "#\/definitions\/bucketList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listBuckets", - "group": "buckets", - "weight": 545, - "cookies": false, - "type": "", - "demo": "storage\/list-buckets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create bucket", - "operationId": "storageCreateBucket", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Create a new storage bucket.", - "responses": { - "201": { - "description": "Bucket", - "schema": { - "$ref": "#\/definitions\/bucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBucket", - "group": "buckets", - "weight": 543, - "cookies": false, - "type": "", - "demo": "storage\/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<BUCKET_ID>" - }, - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "default": true, - "x-example": false - } - }, - "required": [ - "bucketId", - "name" - ] - } - } - ] - } - }, - "\/storage\/buckets\/{bucketId}": { - "get": { - "summary": "Get bucket", - "operationId": "storageGetBucket", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "schema": { - "$ref": "#\/definitions\/bucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucket", - "group": "buckets", - "weight": 544, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update bucket", - "operationId": "storageUpdateBucket", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Update a storage bucket by its unique ID.", - "responses": { - "200": { - "description": "Bucket", - "schema": { - "$ref": "#\/definitions\/bucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBucket", - "group": "buckets", - "weight": 546, - "cookies": false, - "type": "", - "demo": "storage\/update-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete bucket", - "operationId": "storageDeleteBucket", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "storage" - ], - "description": "Delete a storage bucket by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteBucket", - "group": "buckets", - "weight": 547, - "cookies": false, - "type": "", - "demo": "storage\/delete-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Files List", - "schema": { - "$ref": "#\/definitions\/fileList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFiles", - "group": "files", - "weight": 550, - "cookies": false, - "type": "", - "demo": "storage\/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFile", - "group": "files", - "weight": 548, - "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "x-upload-id": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "formData" - }, - { - "name": "file", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "permissions", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "x-example": "[\"read(\"any\")\"]", - "in": "formData" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "Get file", - "operationId": "storageGetFile", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFile", - "group": "files", - "weight": 549, - "cookies": false, - "type": "", - "demo": "storage\/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFile", - "group": "files", - "weight": 551, - "cookies": false, - "type": "", - "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "storage" - ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "weight": 552, - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { - "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileDownload", - "group": "files", - "weight": 554, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFilePreview", - "group": "files", - "weight": 553, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "type": "string", - "x-example": "center", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "default": "center", - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "", - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileView", - "group": "files", - "weight": 555, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/usage": { - "get": { - "summary": "Get storage usage stats", - "operationId": "storageGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, 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.\n", - "responses": { - "200": { - "description": "StorageUsage", - "schema": { - "$ref": "#\/definitions\/usageStorage" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 557, - "cookies": false, - "type": "", - "demo": "storage\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/storage\/{bucketId}\/usage": { - "get": { - "summary": "Get bucket usage stats", - "operationId": "storageGetBucketUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, 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.\n", - "responses": { - "200": { - "description": "UsageBuckets", - "schema": { - "$ref": "#\/definitions\/usageBuckets" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucketUsage", - "group": null, - "weight": 558, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/tablesdb": { - "get": { - "summary": "List databases", - "operationId": "tablesDBList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "tablesdb", - "weight": 265, - "cookies": false, - "type": "", - "demo": "tablesdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "tablesDBCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "tablesdb", - "weight": 261, - "cookies": false, - "type": "", - "demo": "tablesdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 332, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 328, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 329, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 330, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 331, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 333, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/tablesdb\/usage": { - "get": { - "summary": "Get TablesDB usage stats", - "operationId": "tablesDBListUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabases", - "schema": { - "$ref": "#\/definitions\/usageDatabases" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 267, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "tablesdb\/list-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "tablesDBGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tablesdb", - "weight": 262, - "cookies": false, - "type": "", - "demo": "tablesdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "tablesDBUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tablesdb", - "weight": 263, - "cookies": false, - "type": "", - "demo": "tablesdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "tablesDBDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tablesdb", - "weight": 264, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables": { - "get": { - "summary": "List tables", - "operationId": "tablesDBListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": "tables", - "weight": 272, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "tablesDBCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": "tables", - "weight": 268, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TABLE_ID>" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "columns": { - "type": "array", - "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "tableId", - "name" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "tablesDBGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": "tables", - "weight": 269, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "tablesDBUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": "tables", - "weight": 270, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete table", - "operationId": "tablesDBDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": "tables", - "weight": 271, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "tablesDBListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 277, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "tablesDBCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 278, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "tablesDBUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 279, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "tablesDBCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 280, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "tablesDBUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 281, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "tablesDBCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 282, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "tablesDBUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 283, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "tablesDBCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 284, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "tablesDBUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 285, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "tablesDBCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 286, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "tablesDBUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 287, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "tablesDBCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 288, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "tablesDBUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 289, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "tablesDBCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 290, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "tablesDBUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 291, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { - "post": { - "summary": "Create line column", - "operationId": "tablesDBCreateLineColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a geometric line column.", - "responses": { - "202": { - "description": "ColumnLine", - "schema": { - "$ref": "#\/definitions\/columnLine" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLineColumn", - "group": "columns", - "weight": 292, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { - "patch": { - "summary": "Update line column", - "operationId": "tablesDBUpdateLineColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a line column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnLine", - "schema": { - "$ref": "#\/definitions\/columnLine" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLineColumn", - "group": "columns", - "weight": 293, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { - "post": { - "summary": "Create longtext column", - "operationId": "tablesDBCreateLongtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a longtext column.\n", - "responses": { - "202": { - "description": "ColumnLongtext", - "schema": { - "$ref": "#\/definitions\/columnLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextColumn", - "group": "columns", - "weight": 310, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { - "patch": { - "summary": "Update longtext column", - "operationId": "tablesDBUpdateLongtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnLongtext", - "schema": { - "$ref": "#\/definitions\/columnLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextColumn", - "group": "columns", - "weight": 311, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { - "post": { - "summary": "Create mediumtext column", - "operationId": "tablesDBCreateMediumtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a mediumtext column.\n", - "responses": { - "202": { - "description": "ColumnMediumtext", - "schema": { - "$ref": "#\/definitions\/columnMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextColumn", - "group": "columns", - "weight": 308, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext column", - "operationId": "tablesDBUpdateMediumtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnMediumtext", - "schema": { - "$ref": "#\/definitions\/columnMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextColumn", - "group": "columns", - "weight": 309, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { - "post": { - "summary": "Create point column", - "operationId": "tablesDBCreatePointColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a geometric point column.", - "responses": { - "202": { - "description": "ColumnPoint", - "schema": { - "$ref": "#\/definitions\/columnPoint" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPointColumn", - "group": "columns", - "weight": 294, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { - "patch": { - "summary": "Update point column", - "operationId": "tablesDBUpdatePointColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a point column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPoint", - "schema": { - "$ref": "#\/definitions\/columnPoint" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePointColumn", - "group": "columns", - "weight": 295, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { - "post": { - "summary": "Create polygon column", - "operationId": "tablesDBCreatePolygonColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a geometric polygon column.", - "responses": { - "202": { - "description": "ColumnPolygon", - "schema": { - "$ref": "#\/definitions\/columnPolygon" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPolygonColumn", - "group": "columns", - "weight": 296, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { - "patch": { - "summary": "Update polygon column", - "operationId": "tablesDBUpdatePolygonColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPolygon", - "schema": { - "$ref": "#\/definitions\/columnPolygon" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePolygonColumn", - "group": "columns", - "weight": 297, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "tablesDBCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 298, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "default": null, - "x-example": "<RELATED_TABLE_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "tablesDBCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 300, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", - "deprecated": { - "since": "1.9.0", - "replaceWith": "tablesDB.createTextColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for text columns, in number of characters.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "tablesDBUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 301, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { - "post": { - "summary": "Create text column", - "operationId": "tablesDBCreateTextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a text column.\n", - "responses": { - "202": { - "description": "ColumnText", - "schema": { - "$ref": "#\/definitions\/columnText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextColumn", - "group": "columns", - "weight": 306, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { - "patch": { - "summary": "Update text column", - "operationId": "tablesDBUpdateTextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnText", - "schema": { - "$ref": "#\/definitions\/columnText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextColumn", - "group": "columns", - "weight": 307, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "tablesDBCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 302, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "tablesDBUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 303, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { - "post": { - "summary": "Create varchar column", - "operationId": "tablesDBCreateVarcharColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a varchar column.\n", - "responses": { - "202": { - "description": "ColumnVarchar", - "schema": { - "$ref": "#\/definitions\/columnVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharColumn", - "group": "columns", - "weight": 304, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { - "patch": { - "summary": "Update varchar column", - "operationId": "tablesDBUpdateVarcharColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnVarchar", - "schema": { - "$ref": "#\/definitions\/columnVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharColumn", - "group": "columns", - "weight": 305, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar column.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "tablesDBGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/columnBoolean", - "integer": "#\/definitions\/columnInteger", - "double": "#\/definitions\/columnFloat", - "string": "#\/definitions\/columnString", - "datetime": "#\/definitions\/columnDatetime", - "relationship": "#\/definitions\/columnRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/columnBoolean": { - "type": "boolean" - }, - "#\/definitions\/columnInteger": { - "type": "integer" - }, - "#\/definitions\/columnFloat": { - "type": "double" - }, - "#\/definitions\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/columnDatetime": { - "type": "datetime" - }, - "#\/definitions\/columnRelationship": { - "type": "relationship" - }, - "#\/definitions\/columnString": { - "type": "string" - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 275, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "tablesDBDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 276, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "tablesDBUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 299, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [], - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "tablesDBListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List indexes on the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 315, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "tablesDBCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 312, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "TablesDBIndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "tablesDBGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 313, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "tablesDBDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 314, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "tablesDBListTableLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 273, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 324, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 316, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - }, - { - "name": "createRows", - "namespace": "tablesDB", - "desc": "Create rows", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-rows.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<ROW_ID>" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "put": { - "summary": "Upsert rows", - "operationId": "tablesDBUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 321, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", - "methods": [ - { - "name": "upsertRows", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "demo": "tablesdb\/upsert-rows.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "rows" - ] - } - } - ] - }, - "patch": { - "summary": "Update rows", - "operationId": "tablesDBUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 319, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete rows", - "operationId": "tablesDBDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 323, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 317, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 320, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 318, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 322, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "tablesDBListRowLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 325, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 327, - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 326, - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "tablesDBGetTableUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "schema": { - "$ref": "#\/definitions\/usageTable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 274, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/usage": { - "get": { - "summary": "Get TablesDB usage stats", - "operationId": "tablesDBGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageDatabase", - "schema": { - "$ref": "#\/definitions\/usageDatabase" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 266, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "tablesdb\/get-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/teams": { - "get": { - "summary": "List teams", - "operationId": "teamsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", - "responses": { - "200": { - "description": "Teams List", - "schema": { - "$ref": "#\/definitions\/teamList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "teams", - "weight": 526, - "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "teams", - "weight": 524, - "cookies": false, - "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TEAM_ID>" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": [ - "owner" - ], - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } - ] - } - }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "teams", - "weight": 525, - "cookies": false, - "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "teams", - "weight": 528, - "cookies": false, - "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "teams" - ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "teams", - "weight": 527, - "cookies": false, - "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/logs": { - "get": { - "summary": "List team logs", - "operationId": "teamsListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get the team 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": 537, - "cookies": false, - "type": "", - "demo": "teams\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#\/definitions\/membershipList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 533, - "cookies": false, - "type": "", - "demo": "teams\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMembership", - "group": "memberships", - "weight": 531, - "cookies": false, - "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "default": "", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "roles" - ] - } - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { - "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMembership", - "group": "memberships", - "weight": 532, - "cookies": false, - "type": "", - "demo": "teams\/get-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembership", - "group": "memberships", - "weight": 534, - "cookies": false, - "type": "", - "demo": "teams\/update-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - ] - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "teams" - ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", - "weight": 535, - "cookies": false, - "type": "", - "demo": "teams\/delete-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { - "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", - "weight": 536, - "cookies": false, - "type": "", - "demo": "teams\/update-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "teams", - "weight": 529, - "cookies": false, - "type": "", - "demo": "teams\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "teams", - "weight": 530, - "cookies": false, - "type": "", - "demo": "teams\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "List tokens", - "operationId": "tokensList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Resource Tokens List", - "schema": { - "$ref": "#\/definitions\/resourceTokenList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "files", - "weight": 540, - "cookies": false, - "type": "", - "demo": "tokens\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file token", - "operationId": "tokensCreateFileToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", - "responses": { - "201": { - "description": "ResourceToken", - "schema": { - "$ref": "#\/definitions\/resourceToken" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFileToken", - "group": "files", - "weight": 538, - "cookies": false, - "type": "", - "demo": "tokens\/create-file-token.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "Token expiry date", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tokens\/{tokenId}": { - "get": { - "summary": "Get token", - "operationId": "tokensGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "Get a token by its unique ID.", - "responses": { - "200": { - "description": "ResourceToken", - "schema": { - "$ref": "#\/definitions\/resourceToken" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tokens", - "weight": 539, - "cookies": false, - "type": "", - "demo": "tokens\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "type": "string", - "x-example": "<TOKEN_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update token", - "operationId": "tokensUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", - "responses": { - "200": { - "description": "ResourceToken", - "schema": { - "$ref": "#\/definitions\/resourceToken" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tokens", - "weight": 541, - "cookies": false, - "type": "", - "demo": "tokens\/update.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token unique ID.", - "required": true, - "type": "string", - "x-example": "<TOKEN_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "File token expiry date", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete token", - "operationId": "tokensDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tokens" - ], - "description": "Delete a token by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tokens", - "weight": 542, - "cookies": false, - "type": "", - "demo": "tokens\/delete.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "type": "string", - "x-example": "<TOKEN_ID>", - "in": "path" - } - ] - } - }, - "\/users": { - "get": { - "summary": "List users", - "operationId": "usersList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Users List", - "schema": { - "$ref": "#\/definitions\/userList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "users", - "weight": 71, - "cookies": false, - "type": "", - "demo": "users\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user", - "operationId": "usersCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "users", - "weight": 62, - "cookies": false, - "type": "", - "demo": "users\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "default": "", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId" - ] - } - } - ] - } - }, - "\/users\/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createArgon2User", - "group": "users", - "weight": 65, - "cookies": false, - "type": "", - "demo": "users\/create-argon-2-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Argon2.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBcryptUser", - "group": "users", - "weight": 63, - "cookies": false, - "type": "", - "demo": "users\/create-bcrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Bcrypt.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#\/definitions\/identityList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 79, - "cookies": false, - "type": "", - "demo": "users\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/users\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 103, - "cookies": false, - "type": "", - "demo": "users\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "\/users\/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMD5User", - "group": "users", - "weight": 64, - "cookies": false, - "type": "", - "demo": "users\/create-md-5-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using MD5.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPHPassUser", - "group": "users", - "weight": 67, - "cookies": false, - "type": "", - "demo": "users\/create-ph-pass-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using PHPass.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptUser", - "group": "users", - "weight": 68, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt.", - "default": null, - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" - ] - } - } - ] - } - }, - "\/users\/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptModifiedUser", - "group": "users", - "weight": 69, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-modified-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "default": null, - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "default": null, - "x-example": "<PASSWORD_SIGNER_KEY>" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } - ] - } - }, - "\/users\/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSHAUser", - "group": "users", - "weight": 66, - "cookies": false, - "type": "", - "demo": "users\/create-sha-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using SHA.", - "default": null, - "x-example": "password", - "format": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "default": "", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/usage": { - "get": { - "summary": "Get users usage stats", - "operationId": "usersGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. 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.\n", - "responses": { - "200": { - "description": "UsageUsers", - "schema": { - "$ref": "#\/definitions\/usageUsers" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 105, - "cookies": false, - "type": "", - "demo": "users\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/users\/{userId}": { - "get": { - "summary": "Get user", - "operationId": "usersGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get a user by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "users", - "weight": 72, - "cookies": false, - "type": "", - "demo": "users\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user", - "operationId": "usersDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "users", - "weight": 101, - "cookies": false, - "type": "", - "demo": "users\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/email": { - "patch": { - "summary": "Update email", - "operationId": "usersUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user email by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "users", - "weight": 86, - "cookies": false, - "type": "", - "demo": "users\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - } - }, - "required": [ - "email" - ] - } - } - ] - } - }, - "\/users\/{userId}\/impersonator": { - "patch": { - "summary": "Update user impersonator capability", - "operationId": "usersUpdateImpersonator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateImpersonator", - "group": "users", - "weight": 82, - "cookies": false, - "type": "", - "demo": "users\/update-impersonator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", - "default": null, - "x-example": false - } - }, - "required": [ - "impersonator" - ] - } - } - ] - } - }, - "\/users\/{userId}\/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#\/definitions\/jwt" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "sessions", - "weight": 104, - "cookies": false, - "type": "", - "demo": "users\/create-jwt.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "default": "", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } - ] - } - }, - "\/users\/{userId}\/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": "users", - "weight": 81, - "cookies": false, - "type": "", - "demo": "users\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - ] - } - }, - "\/users\/{userId}\/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user 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": 77, - "cookies": false, - "type": "", - "demo": "users\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user membership list by its unique ID.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#\/definitions\/membershipList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 76, - "cookies": false, - "type": "", - "demo": "users\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfa", - "group": "users", - "weight": 91, - "cookies": false, - "type": "", - "demo": "users\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - }, - "methods": [ - { - "name": "updateMfa", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - } - }, - { - "name": "updateMFA", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - ] - } - }, - "\/users\/{userId}\/mfa\/authenticators\/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 96, - "cookies": false, - "type": "", - "demo": "users\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#\/definitions\/mfaFactors" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 92, - "cookies": false, - "type": "", - "demo": "users\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 93, - "cookies": false, - "type": "", - "demo": "users\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "usersUpdateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 95, - "cookies": false, - "type": "", - "demo": "users\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 94, - "cookies": false, - "type": "", - "demo": "users\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/name": { - "patch": { - "summary": "Update name", - "operationId": "usersUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user name by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "users", - "weight": 84, - "cookies": false, - "type": "", - "demo": "users\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - } - }, - "\/users\/{userId}\/password": { - "patch": { - "summary": "Update password", - "operationId": "usersUpdatePassword", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user password by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "users", - "weight": 85, - "cookies": false, - "type": "", - "demo": "users\/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": null - } - }, - "required": [ - "password" - ] - } - } - ] - } - }, - "\/users\/{userId}\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "users", - "weight": 87, - "cookies": false, - "type": "", - "demo": "users\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "number" - ] - } - } - ] - } - }, - "\/users\/{userId}\/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "users", - "weight": 73, - "cookies": false, - "type": "", - "demo": "users\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user preferences", - "operationId": "usersUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "users", - "weight": 89, - "cookies": false, - "type": "", - "demo": "users\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/users\/{userId}\/sessions": { - "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#\/definitions\/sessionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 75, - "cookies": false, - "type": "", - "demo": "users\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.read", - "sessions.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 97, - "cookies": false, - "type": "", - "demo": "users\/create-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user sessions", - "operationId": "usersDeleteSessions", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete all user's sessions by using the user's unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 100, - "cookies": false, - "type": "", - "demo": "users\/delete-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/sessions\/{sessionId}": { - "delete": { - "summary": "Delete user session", - "operationId": "usersDeleteSession", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete a user sessions by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 99, - "cookies": false, - "type": "", - "demo": "users\/delete-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/status": { - "patch": { - "summary": "Update user status", - "operationId": "usersUpdateStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "users", - "weight": 80, - "cookies": false, - "type": "", - "demo": "users\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", - "default": null, - "x-example": false - } - }, - "required": [ - "status" - ] - } - } - ] - } - }, - "\/users\/{userId}\/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#\/definitions\/targetList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "targets", - "weight": 78, - "cookies": false, - "type": "", - "demo": "users\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTarget", - "group": "targets", - "weight": 70, - "cookies": false, - "type": "", - "demo": "users\/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TARGET_ID>" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "default": null, - "x-example": "email", - "enum": [ - "email", - "sms", - "push" - ], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "targetId", - "providerType", - "identifier" - ] - } - } - ] - } - }, - "\/users\/{userId}\/targets\/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTarget", - "group": "targets", - "weight": 74, - "cookies": false, - "type": "", - "demo": "users\/get-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTarget", - "group": "targets", - "weight": 90, - "cookies": false, - "type": "", - "demo": "users\/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": "", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTarget", - "group": "targets", - "weight": 102, - "cookies": false, - "type": "", - "demo": "users\/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createToken", - "group": "sessions", - "weight": 98, - "cookies": false, - "type": "", - "demo": "users\/create-token.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "default": 6, - "x-example": 4, - "format": "int32" - }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "default": 900, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/users\/{userId}\/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "users", - "weight": 88, - "cookies": false, - "type": "", - "demo": "users\/update-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "default": null, - "x-example": false - } - }, - "required": [ - "emailVerification" - ] - } - } - ] - } - }, - "\/users\/{userId}\/verification\/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "users", - "weight": 83, - "cookies": false, - "type": "", - "demo": "users\/update-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "default": null, - "x-example": false - } - }, - "required": [ - "phoneVerification" - ] - } - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/detections": { - "post": { - "summary": "Create repository detection", - "operationId": "vcsCreateRepositoryDetection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", - "responses": { - "200": { - "description": "DetectionRuntime, or DetectionFramework", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/detectionRuntime" - }, - { - "$ref": "#\/definitions\/detectionFramework" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "runtime": "#\/definitions\/detectionRuntime", - "framework": "#\/definitions\/detectionFramework" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRepositoryDetection", - "group": "repositories", - "weight": 570, - "cookies": false, - "type": "", - "demo": "vcs\/create-repository-detection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerRepositoryId": { - "type": "string", - "description": "Repository Id", - "default": null, - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "type": { - "type": "string", - "description": "Detector type. Must be one of the following: runtime, framework", - "default": null, - "x-example": "runtime", - "enum": [ - "runtime", - "framework" - ], - "x-enum-name": "VCSDetectionType", - "x-enum-keys": [] - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to Root Directory", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - } - }, - "required": [ - "providerRepositoryId", - "type" - ] - } - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { - "get": { - "summary": "List repositories", - "operationId": "vcsListRepositories", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", - "responses": { - "200": { - "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/providerRepositoryRuntimeList" - }, - { - "$ref": "#\/definitions\/providerRepositoryFrameworkList" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "runtime": "#\/definitions\/providerRepositoryRuntimeList", - "framework": "#\/definitions\/providerRepositoryFrameworkList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRepositories", - "group": "repositories", - "weight": 567, - "cookies": false, - "type": "", - "demo": "vcs\/list-repositories.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Detector type. Must be one of the following: runtime, framework", - "required": true, - "type": "string", - "x-example": "runtime", - "enum": [ - "runtime", - "framework" - ], - "x-enum-name": "VCSDetectionType", - "x-enum-keys": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "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" - } - ] - }, - "post": { - "summary": "Create repository", - "operationId": "vcsCreateRepository", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", - "responses": { - "200": { - "description": "ProviderRepository", - "schema": { - "$ref": "#\/definitions\/providerRepository" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRepository", - "group": "repositories", - "weight": 565, - "cookies": false, - "type": "", - "demo": "vcs\/create-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Repository name (slug)", - "default": null, - "x-example": "<NAME>" - }, - "private": { - "type": "boolean", - "description": "Mark repository public or private", - "default": null, - "x-example": false - } - }, - "required": [ - "name", - "private" - ] - } - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { - "get": { - "summary": "Get repository", - "operationId": "vcsGetRepository", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", - "responses": { - "200": { - "description": "ProviderRepository", - "schema": { - "$ref": "#\/definitions\/providerRepository" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRepository", - "group": "repositories", - "weight": 566, - "cookies": false, - "type": "", - "demo": "vcs\/get-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { - "get": { - "summary": "List repository branches", - "operationId": "vcsListRepositoryBranches", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", - "responses": { - "200": { - "description": "Branches List", - "schema": { - "$ref": "#\/definitions\/branchList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRepositoryBranches", - "group": "repositories", - "weight": 568, - "cookies": false, - "type": "", - "demo": "vcs\/list-repository-branches.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { - "get": { - "summary": "Get files and directories of a VCS repository", - "operationId": "vcsGetRepositoryContents", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", - "responses": { - "200": { - "description": "VCS Content List", - "schema": { - "$ref": "#\/definitions\/vcsContentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRepositoryContents", - "group": "repositories", - "weight": 569, - "cookies": false, - "type": "", - "demo": "vcs\/get-repository-contents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "providerRepositoryId", - "description": "Repository Id", - "required": true, - "type": "string", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "in": "path" - }, - { - "name": "providerRootDirectory", - "description": "Path to get contents of nested directory", - "required": false, - "type": "string", - "x-example": "<PROVIDER_ROOT_DIRECTORY>", - "default": "", - "in": "query" - }, - { - "name": "providerReference", - "description": "Git reference (branch, tag, commit) to get contents from", - "required": false, - "type": "string", - "x-example": "<PROVIDER_REFERENCE>", - "default": "", - "in": "query" - } - ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { - "patch": { - "summary": "Update external deployment (authorize)", - "operationId": "vcsUpdateExternalDeployments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateExternalDeployments", - "group": "repositories", - "weight": 561, - "cookies": false, - "type": "", - "demo": "vcs\/update-external-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - }, - { - "name": "repositoryId", - "description": "VCS Repository Id", - "required": true, - "type": "string", - "x-example": "<REPOSITORY_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerPullRequestId": { - "type": "string", - "description": "GitHub Pull Request Id", - "default": null, - "x-example": "<PROVIDER_PULL_REQUEST_ID>" - } - }, - "required": [ - "providerPullRequestId" - ] - } - } - ] - } - }, - "\/vcs\/installations": { - "get": { - "summary": "List installations", - "operationId": "vcsListInstallations", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", - "responses": { - "200": { - "description": "Installations List", - "schema": { - "$ref": "#\/definitions\/installationList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listInstallations", - "group": "installations", - "weight": 563, - "cookies": false, - "type": "", - "demo": "vcs\/list-installations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/vcs\/installations\/{installationId}": { - "get": { - "summary": "Get installation", - "operationId": "vcsGetInstallation", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vcs" - ], - "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", - "responses": { - "200": { - "description": "Installation", - "schema": { - "$ref": "#\/definitions\/installation" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInstallation", - "group": "installations", - "weight": 562, - "cookies": false, - "type": "", - "demo": "vcs\/get-installation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete installation", - "operationId": "vcsDeleteInstallation", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vcs" - ], - "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteInstallation", - "group": "installations", - "weight": 564, - "cookies": false, - "type": "", - "demo": "vcs\/delete-installation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "type": "string", - "x-example": "<INSTALLATION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb": { - "get": { - "summary": "List databases", - "operationId": "vectorsDBList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "vectorsdb", - "weight": 372, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "vectorsDBCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "vectorsdb", - "weight": 368, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/vectorsdb\/embeddings\/text": { - "post": { - "summary": "Create Text Embeddings", - "operationId": "vectorsDBCreateTextEmbeddings", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "200": { - "description": "Embedding list", - "schema": { - "$ref": "#\/definitions\/embeddingList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextEmbeddings", - "group": "documents", - "weight": 394, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-text-embeddings.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createTextEmbeddings", - "namespace": "vectorsDB", - "desc": "Create Text Embedding", - "auth": { - "Project": [] - }, - "parameters": [ - "texts", - "model" - ], - "required": [ - "texts" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/embeddingList" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-text-embeddings.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "texts": { - "type": "array", - "description": "Array of text to generate embeddings.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "model": { - "type": "string", - "description": "The embedding model to use for generating vector embeddings.", - "default": "embeddinggemma", - "x-example": "embeddinggemma", - "enum": [ - "embeddinggemma" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "required": [ - "texts" - ] - } - } - ] - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 399, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 395, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 396, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 397, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 398, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 400, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/vectorsdb\/usage": { - "get": { - "summary": "Get VectorsDB usage stats", - "operationId": "vectorsDBListUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageVectorsDBs", - "schema": { - "$ref": "#\/definitions\/usageVectorsDBs" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageVectorsDBs" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "vectorsdb\/list-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/vectorsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "vectorsDBGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "vectorsdb", - "weight": 369, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "vectorsDBUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "vectorsdb", - "weight": 370, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "vectorsDBDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "vectorsdb", - "weight": 371, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "vectorsDBListCollections", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "VectorsDB Collections List", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollectionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 379, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "vectorsDBCreateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "VectorsDB Collection", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 375, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "collectionId", - "name", - "dimension" - ] - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "vectorsDBGetCollection", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 376, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "vectorsDBUpdateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 377, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimensions.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "vectorsDBDeleteCollection", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 378, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 389, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 385, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "vectorsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "put": { - "summary": "Upsert documents", - "operationId": "vectorsDBUpsertDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 392, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "vectorsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - ] - }, - "patch": { - "summary": "Update documents", - "operationId": "vectorsDBUpdateDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 391, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete documents", - "operationId": "vectorsDBDeleteDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 393, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 388, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 387, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 386, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 390, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "vectorsDBListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#\/definitions\/indexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 384, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "vectorsDBCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 381, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "hnsw_euclidean", - "enum": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ], - "x-enum-name": "VectorsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "vectorsDBGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 382, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "vectorsDBDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 383, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "vectorsDBGetCollectionUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageCollection", - "schema": { - "$ref": "#\/definitions\/usageCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollectionUsage", - "group": null, - "weight": 380, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-collection-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/usage": { - "get": { - "summary": "Get VectorsDB usage stats", - "operationId": "vectorsDBGetUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageVectorsDB", - "schema": { - "$ref": "#\/definitions\/usageVectorsDB" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageVectorsDB" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "vectorsdb\/get-usage.md", - "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - } - ] - } - }, - "\/webhooks": { - "get": { - "summary": "List webhooks", - "operationId": "webhooksList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Webhooks List", - "schema": { - "$ref": "#\/definitions\/webhookList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "weight": 573, - "cookies": false, - "type": "", - "demo": "webhooks\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create webhook", - "operationId": "webhooksCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", - "responses": { - "201": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": null, - "weight": 572, - "cookies": false, - "type": "", - "demo": "webhooks\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "webhookId": { - "type": "string", - "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<WEBHOOK_ID>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": false, - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_PASSWORD>" - }, - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - } - }, - "required": [ - "webhookId", - "url", - "name", - "events" - ] - } - } - ] - } - }, - "\/webhooks\/{webhookId}": { - "get": { - "summary": "Get webhook", - "operationId": "webhooksGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 574, - "cookies": false, - "type": "", - "demo": "webhooks\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update webhook", - "operationId": "webhooksUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": null, - "weight": 576, - "cookies": false, - "type": "", - "demo": "webhooks\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "default": null, - "x-example": null - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": false, - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_PASSWORD>" - } - }, - "required": [ - "name", - "url", - "events" - ] - } - } - ] - }, - "delete": { - "summary": "Delete webhook", - "operationId": "webhooksDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "webhooks" - ], - "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 575, - "cookies": false, - "type": "", - "demo": "webhooks\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - } - ] - } - }, - "\/webhooks\/{webhookId}\/secret": { - "patch": { - "summary": "Update webhook secret key", - "operationId": "webhooksUpdateSecret", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSecret", - "group": null, - "weight": 577, - "cookies": false, - "type": "", - "demo": "webhooks\/update-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - } - } - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - } - ], - "definitions": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] - }, - "rowList": { - "description": "Rows List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rows that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "List of rows.", - "items": { - "type": "object", - "$ref": "#\/definitions\/row" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rows" - ], - "example": { - "total": 5, - "rows": "" - } - }, - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/document" - }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "type": "object", - "$ref": "#\/definitions\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "tableList": { - "description": "Tables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tables": { - "type": "array", - "description": "List of tables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/table" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tables" - ], - "example": { - "total": 5, - "tables": "" - } - }, - "collectionList": { - "description": "Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "type": "object", - "$ref": "#\/definitions\/collection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "type": "object", - "$ref": "#\/definitions\/database" - }, - "x-example": "" - } - }, - "required": [ - "total", - "databases" - ], - "example": { - "total": 5, - "databases": "" - } - }, - "indexList": { - "description": "Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/index" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "columnIndexList": { - "description": "Column Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/columnIndex" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "userList": { - "description": "Users List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of users that matched your query.", - "x-example": 5, - "format": "int32" - }, - "users": { - "type": "array", - "description": "List of users.", - "items": { - "type": "object", - "$ref": "#\/definitions\/user" - }, - "x-example": "" - } - }, - "required": [ - "total", - "users" - ], - "example": { - "total": 5, - "users": "" - } - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/session" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sessions" - ], - "example": { - "total": 5, - "sessions": "" - } - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "type": "object", - "$ref": "#\/definitions\/identity" - }, - "x-example": "" - } - }, - "required": [ - "total", - "identities" - ], - "example": { - "total": 5, - "identities": "" - } - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { - "type": "object", - "$ref": "#\/definitions\/log" - }, - "x-example": "" - } - }, - "required": [ - "total", - "logs" - ], - "example": { - "total": 5, - "logs": "" - } - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "type": "object", - "$ref": "#\/definitions\/file" - }, - "x-example": "" - } - }, - "required": [ - "total", - "files" - ], - "example": { - "total": 5, - "files": "" - } - }, - "bucketList": { - "description": "Buckets List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { - "type": "object", - "$ref": "#\/definitions\/bucket" - }, - "x-example": "" - } - }, - "required": [ - "total", - "buckets" - ], - "example": { - "total": 5, - "buckets": "" - } - }, - "resourceTokenList": { - "description": "Resource Tokens List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tokens that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tokens": { - "type": "array", - "description": "List of tokens.", - "items": { - "type": "object", - "$ref": "#\/definitions\/resourceToken" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tokens" - ], - "example": { - "total": 5, - "tokens": "" - } - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "type": "object", - "$ref": "#\/definitions\/team" - }, - "x-example": "" - } - }, - "required": [ - "total", - "teams" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { - "type": "object", - "$ref": "#\/definitions\/membership" - }, - "x-example": "" - } - }, - "required": [ - "total", - "memberships" - ], - "example": { - "total": 5, - "memberships": "" - } - }, - "siteList": { - "description": "Sites List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sites that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "List of sites.", - "items": { - "type": "object", - "$ref": "#\/definitions\/site" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sites" - ], - "example": { - "total": 5, - "sites": "" - } - }, - "templateSiteList": { - "description": "Site Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "type": "object", - "$ref": "#\/definitions\/templateSite" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "functionList": { - "description": "Functions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of functions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "List of functions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/function" - }, - "x-example": "" - } - }, - "required": [ - "total", - "functions" - ], - "example": { - "total": 5, - "functions": "" - } - }, - "templateFunctionList": { - "description": "Function Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "type": "object", - "$ref": "#\/definitions\/templateFunction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "installationList": { - "description": "Installations List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of installations that matched your query.", - "x-example": 5, - "format": "int32" - }, - "installations": { - "type": "array", - "description": "List of installations.", - "items": { - "type": "object", - "$ref": "#\/definitions\/installation" - }, - "x-example": "" - } - }, - "required": [ - "total", - "installations" - ], - "example": { - "total": 5, - "installations": "" - } - }, - "providerRepositoryFrameworkList": { - "description": "Framework Provider Repositories List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of frameworkProviderRepositories that matched your query.", - "x-example": 5, - "format": "int32" - }, - "frameworkProviderRepositories": { - "type": "array", - "description": "List of frameworkProviderRepositories.", - "items": { - "type": "object", - "$ref": "#\/definitions\/providerRepositoryFramework" - }, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Provider repository list type.", - "x-example": "framework" - } - }, - "required": [ - "total", - "frameworkProviderRepositories", - "type" - ], - "example": { - "total": 5, - "frameworkProviderRepositories": "", - "type": "framework" - } - }, - "providerRepositoryRuntimeList": { - "description": "Runtime Provider Repositories List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimeProviderRepositories that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimeProviderRepositories": { - "type": "array", - "description": "List of runtimeProviderRepositories.", - "items": { - "type": "object", - "$ref": "#\/definitions\/providerRepositoryRuntime" - }, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Provider repository list type.", - "x-example": "runtime" - } - }, - "required": [ - "total", - "runtimeProviderRepositories", - "type" - ], - "example": { - "total": 5, - "runtimeProviderRepositories": "", - "type": "runtime" - } - }, - "branchList": { - "description": "Branches List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of branches that matched your query.", - "x-example": 5, - "format": "int32" - }, - "branches": { - "type": "array", - "description": "List of branches.", - "items": { - "type": "object", - "$ref": "#\/definitions\/branch" - }, - "x-example": "" - } - }, - "required": [ - "total", - "branches" - ], - "example": { - "total": 5, - "branches": "" - } - }, - "frameworkList": { - "description": "Frameworks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of frameworks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "frameworks": { - "type": "array", - "description": "List of frameworks.", - "items": { - "type": "object", - "$ref": "#\/definitions\/framework" - }, - "x-example": "" - } - }, - "required": [ - "total", - "frameworks" - ], - "example": { - "total": 5, - "frameworks": "" - } - }, - "runtimeList": { - "description": "Runtimes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/runtime" - }, - "x-example": "" - } - }, - "required": [ - "total", - "runtimes" - ], - "example": { - "total": 5, - "runtimes": "" - } - }, - "deploymentList": { - "description": "Deployments List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments that matched your query.", - "x-example": 5, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { - "type": "object", - "$ref": "#\/definitions\/deployment" - }, - "x-example": "" - } - }, - "required": [ - "total", - "deployments" - ], - "example": { - "total": 5, - "deployments": "" - } - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/execution" - }, - "x-example": "" - } - }, - "required": [ - "total", - "executions" - ], - "example": { - "total": 5, - "executions": "" - } - }, - "projectList": { - "description": "Projects List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of projects that matched your query.", - "x-example": 5, - "format": "int32" - }, - "projects": { - "type": "array", - "description": "List of projects.", - "items": { - "type": "object", - "$ref": "#\/definitions\/project" - }, - "x-example": "" - } - }, - "required": [ - "total", - "projects" - ], - "example": { - "total": 5, - "projects": "" - } - }, - "webhookList": { - "description": "Webhooks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of webhooks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "webhooks": { - "type": "array", - "description": "List of webhooks.", - "items": { - "type": "object", - "$ref": "#\/definitions\/webhook" - }, - "x-example": "" - } - }, - "required": [ - "total", - "webhooks" - ], - "example": { - "total": 5, - "webhooks": "" - } - }, - "keyList": { - "description": "API Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of keys that matched your query.", - "x-example": 5, - "format": "int32" - }, - "keys": { - "type": "array", - "description": "List of keys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/key" - }, - "x-example": "" - } - }, - "required": [ - "total", - "keys" - ], - "example": { - "total": 5, - "keys": "" - } - }, - "devKeyList": { - "description": "Dev Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of devKeys that matched your query.", - "x-example": 5, - "format": "int32" - }, - "devKeys": { - "type": "array", - "description": "List of devKeys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/devKey" - }, - "x-example": "" - } - }, - "required": [ - "total", - "devKeys" - ], - "example": { - "total": 5, - "devKeys": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "type": "object", - "$ref": "#\/definitions\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "type": "object", - "$ref": "#\/definitions\/language" - }, - "x-example": "" - } - }, - "required": [ - "total", - "languages" - ], - "example": { - "total": 5, - "languages": "" - } - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "type": "object", - "$ref": "#\/definitions\/currency" - }, - "x-example": "" - } - }, - "required": [ - "total", - "currencies" - ], - "example": { - "total": 5, - "currencies": "" - } - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "type": "object", - "$ref": "#\/definitions\/phone" - }, - "x-example": "" - } - }, - "required": [ - "total", - "phones" - ], - "example": { - "total": 5, - "phones": "" - } - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/variable" - }, - "x-example": "" - } - }, - "required": [ - "total", - "variables" - ], - "example": { - "total": 5, - "variables": "" - } - }, - "mockNumberList": { - "description": "Mock Numbers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of mockNumbers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "mockNumbers": { - "type": "array", - "description": "List of mockNumbers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/mockNumber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "mockNumbers" - ], - "example": { - "total": 5, - "mockNumbers": "" - } - }, - "policyList": { - "description": "Policies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of policies in the given project.", - "x-example": 9, - "format": "int32" - }, - "policies": { - "type": "array", - "description": "List of policies.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/policyPasswordDictionary" - }, - { - "$ref": "#\/definitions\/policyPasswordHistory" - }, - { - "$ref": "#\/definitions\/policyPasswordPersonalData" - }, - { - "$ref": "#\/definitions\/policySessionAlert" - }, - { - "$ref": "#\/definitions\/policySessionDuration" - }, - { - "$ref": "#\/definitions\/policySessionInvalidation" - }, - { - "$ref": "#\/definitions\/policySessionLimit" - }, - { - "$ref": "#\/definitions\/policyUserLimit" - }, - { - "$ref": "#\/definitions\/policyMembershipPrivacy" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/definitions\/policyPasswordDictionary", - "password-history": "#\/definitions\/policyPasswordHistory", - "password-personal-data": "#\/definitions\/policyPasswordPersonalData", - "session-alert": "#\/definitions\/policySessionAlert", - "session-duration": "#\/definitions\/policySessionDuration", - "session-invalidation": "#\/definitions\/policySessionInvalidation", - "session-limit": "#\/definitions\/policySessionLimit", - "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "policies" - ], - "example": { - "total": 9, - "policies": "" - } - }, - "emailTemplateList": { - "description": "Email Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "type": "object", - "$ref": "#\/definitions\/emailTemplate" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "healthStatusList": { - "description": "Status List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of statuses that matched your query.", - "x-example": 5, - "format": "int32" - }, - "statuses": { - "type": "array", - "description": "List of statuses.", - "items": { - "type": "object", - "$ref": "#\/definitions\/healthStatus" - }, - "x-example": "" - } - }, - "required": [ - "total", - "statuses" - ], - "example": { - "total": 5, - "statuses": "" - } - }, - "proxyRuleList": { - "description": "Rule List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rules that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rules": { - "type": "array", - "description": "List of rules.", - "items": { - "type": "object", - "$ref": "#\/definitions\/proxyRule" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rules" - ], - "example": { - "total": 5, - "rules": "" - } - }, - "scheduleList": { - "description": "Schedules List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of schedules that matched your query.", - "x-example": 5, - "format": "int32" - }, - "schedules": { - "type": "array", - "description": "List of schedules.", - "items": { - "type": "object", - "$ref": "#\/definitions\/schedule" - }, - "x-example": "" - } - }, - "required": [ - "total", - "schedules" - ], - "example": { - "total": 5, - "schedules": "" - } - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/localeCode" - }, - "x-example": "" - } - }, - "required": [ - "total", - "localeCodes" - ], - "example": { - "total": 5, - "localeCodes": "" - } - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "type": "object", - "$ref": "#\/definitions\/message" - }, - "x-example": "" - } - }, - "required": [ - "total", - "messages" - ], - "example": { - "total": 5, - "messages": "" - } - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "type": "object", - "$ref": "#\/definitions\/topic" - }, - "x-example": "" - } - }, - "required": [ - "total", - "topics" - ], - "example": { - "total": 5, - "topics": "" - } - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/subscriber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "subscribers" - ], - "example": { - "total": 5, - "subscribers": "" - } - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - }, - "x-example": "" - } - }, - "required": [ - "total", - "targets" - ], - "example": { - "total": 5, - "targets": "" - } - }, - "transactionList": { - "description": "Transaction List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/transaction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "transactions" - ], - "example": { - "total": 5, - "transactions": "" - } - }, - "migrationList": { - "description": "Migrations List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of migrations that matched your query.", - "x-example": 5, - "format": "int32" - }, - "migrations": { - "type": "array", - "description": "List of migrations.", - "items": { - "type": "object", - "$ref": "#\/definitions\/migration" - }, - "x-example": "" - } - }, - "required": [ - "total", - "migrations" - ], - "example": { - "total": 5, - "migrations": "" - } - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "type": "object", - "$ref": "#\/definitions\/specification" - }, - "x-example": "" - } - }, - "required": [ - "total", - "specifications" - ], - "example": { - "total": 5, - "specifications": "" - } - }, - "vcsContentList": { - "description": "VCS Content List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of contents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "contents": { - "type": "array", - "description": "List of contents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/vcsContent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "contents" - ], - "example": { - "total": 5, - "contents": "" - } - }, - "vectorsdbCollectionList": { - "description": "VectorsDB Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "type": "object", - "$ref": "#\/definitions\/vectorsdbCollection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "embeddingList": { - "description": "Embedding list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of embeddings that matched your query.", - "x-example": 5, - "format": "int32" - }, - "embeddings": { - "type": "array", - "description": "List of embeddings.", - "items": { - "type": "object", - "$ref": "#\/definitions\/embedding" - }, - "x-example": "" - } - }, - "required": [ - "total", - "embeddings" - ], - "example": { - "total": 5, - "embeddings": "" - } - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "type": { - "type": "string", - "description": "Database type.", - "x-example": "legacy", - "enum": [ - "legacy", - "tablesdb", - "documentsdb", - "vectorsdb" - ] - } - }, - "required": [ - "$id", - "name", - "$createdAt", - "$updatedAt", - "enabled", - "type" - ], - "example": { - "$id": "5e5ea5c16897e", - "name": "My Database", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "enabled": false, - "type": "legacy" - } - }, - "embedding": { - "description": "Embedding", - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" - }, - "dimension": { - "type": "integer", - "description": "Number of dimensions for each embedding vector.", - "x-example": 768, - "format": "int32" - }, - "embedding": { - "type": "array", - "description": "Embedding vector values. If an error occurs, this will be an empty array.", - "items": { - "type": "number", - "format": "double" - }, - "x-example": [ - 0.01, - 0.02, - 0.03 - ] - }, - "error": { - "type": "string", - "description": "Error message if embedding generation fails. Empty string if no error.", - "x-example": "Error message" - } - }, - "required": [ - "model", - "dimension", - "embedding", - "error" - ], - "example": { - "model": "embeddinggemma", - "dimension": 768, - "embedding": [ - 0.01, - 0.02, - 0.03 - ], - "error": "Error message" - } - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/attributeBoolean" - }, - { - "$ref": "#\/definitions\/attributeInteger" - }, - { - "$ref": "#\/definitions\/attributeFloat" - }, - { - "$ref": "#\/definitions\/attributeEmail" - }, - { - "$ref": "#\/definitions\/attributeEnum" - }, - { - "$ref": "#\/definitions\/attributeUrl" - }, - { - "$ref": "#\/definitions\/attributeIp" - }, - { - "$ref": "#\/definitions\/attributeDatetime" - }, - { - "$ref": "#\/definitions\/attributeRelationship" - }, - { - "$ref": "#\/definitions\/attributePoint" - }, - { - "$ref": "#\/definitions\/attributeLine" - }, - { - "$ref": "#\/definitions\/attributePolygon" - }, - { - "$ref": "#\/definitions\/attributeVarchar" - }, - { - "$ref": "#\/definitions\/attributeText" - }, - { - "$ref": "#\/definitions\/attributeMediumtext" - }, - { - "$ref": "#\/definitions\/attributeLongtext" - }, - { - "$ref": "#\/definitions\/attributeString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/attributeBoolean", - "integer": "#\/definitions\/attributeInteger", - "double": "#\/definitions\/attributeFloat", - "string": "#\/definitions\/attributeString", - "datetime": "#\/definitions\/attributeDatetime", - "relationship": "#\/definitions\/attributeRelationship", - "point": "#\/definitions\/attributePoint", - "linestring": "#\/definitions\/attributeLine", - "polygon": "#\/definitions\/attributePolygon", - "varchar": "#\/definitions\/attributeVarchar", - "text": "#\/definitions\/attributeText", - "mediumtext": "#\/definitions\/attributeMediumtext", - "longtext": "#\/definitions\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/attributeBoolean": { - "type": "boolean" - }, - "#\/definitions\/attributeInteger": { - "type": "integer" - }, - "#\/definitions\/attributeFloat": { - "type": "double" - }, - "#\/definitions\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/attributeDatetime": { - "type": "datetime" - }, - "#\/definitions\/attributeRelationship": { - "type": "relationship" - }, - "#\/definitions\/attributePoint": { - "type": "point" - }, - "#\/definitions\/attributeLine": { - "type": "linestring" - }, - "#\/definitions\/attributePolygon": { - "type": "polygon" - }, - "#\/definitions\/attributeVarchar": { - "type": "varchar" - }, - "#\/definitions\/attributeText": { - "type": "text" - }, - "#\/definitions\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/attributeLongtext": { - "type": "longtext" - }, - "#\/definitions\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "attributeList": { - "description": "Attributes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" - }, - "attributes": { - "type": "array", - "description": "List of attributes.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/attributeBoolean" - }, - { - "$ref": "#\/definitions\/attributeInteger" - }, - { - "$ref": "#\/definitions\/attributeFloat" - }, - { - "$ref": "#\/definitions\/attributeEmail" - }, - { - "$ref": "#\/definitions\/attributeEnum" - }, - { - "$ref": "#\/definitions\/attributeUrl" - }, - { - "$ref": "#\/definitions\/attributeIp" - }, - { - "$ref": "#\/definitions\/attributeDatetime" - }, - { - "$ref": "#\/definitions\/attributeRelationship" - }, - { - "$ref": "#\/definitions\/attributePoint" - }, - { - "$ref": "#\/definitions\/attributeLine" - }, - { - "$ref": "#\/definitions\/attributePolygon" - }, - { - "$ref": "#\/definitions\/attributeVarchar" - }, - { - "$ref": "#\/definitions\/attributeText" - }, - { - "$ref": "#\/definitions\/attributeMediumtext" - }, - { - "$ref": "#\/definitions\/attributeLongtext" - }, - { - "$ref": "#\/definitions\/attributeString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/attributeBoolean", - "integer": "#\/definitions\/attributeInteger", - "double": "#\/definitions\/attributeFloat", - "string": "#\/definitions\/attributeString", - "datetime": "#\/definitions\/attributeDatetime", - "relationship": "#\/definitions\/attributeRelationship", - "point": "#\/definitions\/attributePoint", - "linestring": "#\/definitions\/attributeLine", - "polygon": "#\/definitions\/attributePolygon", - "varchar": "#\/definitions\/attributeVarchar", - "text": "#\/definitions\/attributeText", - "mediumtext": "#\/definitions\/attributeMediumtext", - "longtext": "#\/definitions\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/attributeBoolean": { - "type": "boolean" - }, - "#\/definitions\/attributeInteger": { - "type": "integer" - }, - "#\/definitions\/attributeFloat": { - "type": "double" - }, - "#\/definitions\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/attributeDatetime": { - "type": "datetime" - }, - "#\/definitions\/attributeRelationship": { - "type": "relationship" - }, - "#\/definitions\/attributePoint": { - "type": "point" - }, - "#\/definitions\/attributeLine": { - "type": "linestring" - }, - "#\/definitions\/attributePolygon": { - "type": "polygon" - }, - "#\/definitions\/attributeVarchar": { - "type": "varchar" - }, - "#\/definitions\/attributeText": { - "type": "text" - }, - "#\/definitions\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/attributeLongtext": { - "type": "longtext" - }, - "#\/definitions\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "attributes" - ], - "example": { - "total": 5, - "attributes": "" - } - }, - "attributeString": { - "description": "AttributeString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeInteger": { - "description": "AttributeInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "attributeFloat": { - "description": "AttributeFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "attributeBoolean": { - "description": "AttributeBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "attributeEmail": { - "description": "AttributeEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "attributeEnum": { - "description": "AttributeEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "attributeIp": { - "description": "AttributeIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "192.0.2.0", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "attributeUrl": { - "description": "AttributeURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http:\/\/example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "http:\/\/example.com" - } - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedCollection": "collection", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "attributePoint": { - "description": "AttributePoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - 0, - 0 - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "attributeLine": { - "description": "AttributeLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "attributePolygon": { - "description": "AttributePolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "attributeVarchar": { - "description": "AttributeVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeText": { - "description": "AttributeText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeMediumtext": { - "description": "AttributeMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeLongtext": { - "description": "AttributeLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "usageDocumentsDB": { - "description": "UsageDocumentsDB", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "documents": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "vectorsdbCollection": { - "description": "VectorsDB Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/attributeObject" - }, - { - "$ref": "#\/definitions\/attributeVector" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "object": "#\/definitions\/attributeObject", - "vector": "#\/definitions\/attributeVector" - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed", - "dimension" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500, - "dimension": 1536 - } - }, - "attributeObject": { - "description": "AttributeObject", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeVector": { - "description": "AttributeVector", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Vector dimensions.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 1536 - } - }, - "usageVectorsDBs": { - "description": "UsageVectorsDBs", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB databases.", - "x-example": 0, - "format": "int32" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage in bytes.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "Aggregated number of databases per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage in bytes per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "documents", - "storage", - "databasesReads", - "databasesWrites" - ], - "example": { - "range": "30d", - "databasesTotal": 0, - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "databases": [], - "collections": [], - "documents": [], - "storage": [], - "databasesReads": [], - "databasesWrites": [] - } - }, - "usageVectorsDB": { - "description": "UsageVectorsDB", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "documents": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "table": { - "description": "Table", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Table creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Table update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Table name.", - "x-example": "My Table" - }, - "enabled": { - "type": "boolean", - "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "rowSecurity": { - "type": "boolean", - "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "columns": { - "type": "array", - "description": "Table columns.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnPoint" - }, - { - "$ref": "#\/definitions\/columnLine" - }, - { - "$ref": "#\/definitions\/columnPolygon" - }, - { - "$ref": "#\/definitions\/columnVarchar" - }, - { - "$ref": "#\/definitions\/columnText" - }, - { - "$ref": "#\/definitions\/columnMediumtext" - }, - { - "$ref": "#\/definitions\/columnLongtext" - }, - { - "$ref": "#\/definitions\/columnString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/columnBoolean", - "integer": "#\/definitions\/columnInteger", - "double": "#\/definitions\/columnFloat", - "string": "#\/definitions\/columnString", - "datetime": "#\/definitions\/columnDatetime", - "relationship": "#\/definitions\/columnRelationship", - "point": "#\/definitions\/columnPoint", - "linestring": "#\/definitions\/columnLine", - "polygon": "#\/definitions\/columnPolygon", - "varchar": "#\/definitions\/columnVarchar", - "text": "#\/definitions\/columnText", - "mediumtext": "#\/definitions\/columnMediumtext", - "longtext": "#\/definitions\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/columnBoolean": { - "type": "boolean" - }, - "#\/definitions\/columnInteger": { - "type": "integer" - }, - "#\/definitions\/columnFloat": { - "type": "double" - }, - "#\/definitions\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/columnDatetime": { - "type": "datetime" - }, - "#\/definitions\/columnRelationship": { - "type": "relationship" - }, - "#\/definitions\/columnPoint": { - "type": "point" - }, - "#\/definitions\/columnLine": { - "type": "linestring" - }, - "#\/definitions\/columnPolygon": { - "type": "polygon" - }, - "#\/definitions\/columnVarchar": { - "type": "varchar" - }, - "#\/definitions\/columnText": { - "type": "text" - }, - "#\/definitions\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/columnLongtext": { - "type": "longtext" - }, - "#\/definitions\/columnString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Table indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/columnIndex" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum row size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used row size in bytes based on defined columns.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "rowSecurity", - "columns", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Table", - "enabled": false, - "rowSecurity": true, - "columns": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "columnList": { - "description": "Columns List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of columns in the given table.", - "x-example": 5, - "format": "int32" - }, - "columns": { - "type": "array", - "description": "List of columns.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnPoint" - }, - { - "$ref": "#\/definitions\/columnLine" - }, - { - "$ref": "#\/definitions\/columnPolygon" - }, - { - "$ref": "#\/definitions\/columnVarchar" - }, - { - "$ref": "#\/definitions\/columnText" - }, - { - "$ref": "#\/definitions\/columnMediumtext" - }, - { - "$ref": "#\/definitions\/columnLongtext" - }, - { - "$ref": "#\/definitions\/columnString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/columnBoolean", - "integer": "#\/definitions\/columnInteger", - "double": "#\/definitions\/columnFloat", - "string": "#\/definitions\/columnString", - "datetime": "#\/definitions\/columnDatetime", - "relationship": "#\/definitions\/columnRelationship", - "point": "#\/definitions\/columnPoint", - "linestring": "#\/definitions\/columnLine", - "polygon": "#\/definitions\/columnPolygon", - "varchar": "#\/definitions\/columnVarchar", - "text": "#\/definitions\/columnText", - "mediumtext": "#\/definitions\/columnMediumtext", - "longtext": "#\/definitions\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/columnBoolean": { - "type": "boolean" - }, - "#\/definitions\/columnInteger": { - "type": "integer" - }, - "#\/definitions\/columnFloat": { - "type": "double" - }, - "#\/definitions\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/columnDatetime": { - "type": "datetime" - }, - "#\/definitions\/columnRelationship": { - "type": "relationship" - }, - "#\/definitions\/columnPoint": { - "type": "point" - }, - "#\/definitions\/columnLine": { - "type": "linestring" - }, - "#\/definitions\/columnPolygon": { - "type": "polygon" - }, - "#\/definitions\/columnVarchar": { - "type": "varchar" - }, - "#\/definitions\/columnText": { - "type": "text" - }, - "#\/definitions\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/columnLongtext": { - "type": "longtext" - }, - "#\/definitions\/columnString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "columns" - ], - "example": { - "total": 5, - "columns": "" - } - }, - "columnString": { - "description": "ColumnString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnInteger": { - "description": "ColumnInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 10, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "columnFloat": { - "description": "ColumnFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 2.5, - "format": "double", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "columnBoolean": { - "description": "ColumnBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "columnEmail": { - "description": "ColumnEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default@example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "columnEnum": { - "description": "ColumnEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "element", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "columnIp": { - "description": "ColumnIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "192.0.2.0", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "columnUrl": { - "description": "ColumnURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "https:\/\/example.com" - } - }, - "columnDatetime": { - "description": "ColumnDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "columnRelationship": { - "description": "ColumnRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedTable": { - "type": "string", - "description": "The ID of the related table.", - "x-example": "table" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedTable", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedTable": "table", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "columnPoint": { - "description": "ColumnPoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - 0, - 0 - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "columnLine": { - "description": "ColumnLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "columnPolygon": { - "description": "ColumnPolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "columnVarchar": { - "description": "ColumnVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnText": { - "description": "ColumnText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnMediumtext": { - "description": "ColumnMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnLongtext": { - "description": "ColumnLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "index": { - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ] - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index attributes length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "attributes", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "attributes": [], - "lengths": [], - "orders": [] - } - }, - "columnIndex": { - "description": "Index", - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "columns": { - "type": "array", - "description": "Index columns.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index columns length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "columns", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "columns": [], - "lengths": [], - "orders": [] - } - }, - "row": { - "description": "Row", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] - } - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false - } - }, - "presence": { - "description": "Presence", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Presence sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Presence creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Presence update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userInternalId": { - "type": "string", - "description": "User internal ID.", - "x-example": "1" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "x-nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", - "required": [ - "$id", - "$sequence", - "$createdAt", - "$updatedAt", - "$permissions", - "userInternalId", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userInternalId": "1", - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ], - "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" - } - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "x-nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "x-nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/algoArgon2" - }, - { - "$ref": "#\/definitions\/algoScrypt" - }, - { - "$ref": "#\/definitions\/algoScryptModified" - }, - { - "$ref": "#\/definitions\/algoBcrypt" - }, - { - "$ref": "#\/definitions\/algoPhpass" - }, - { - "$ref": "#\/definitions\/algoSha" - }, - { - "$ref": "#\/definitions\/algoMd5" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/definitions\/algoArgon2", - "scrypt": "#\/definitions\/algoScrypt", - "scryptMod": "#\/definitions\/algoScryptModified", - "bcrypt": "#\/definitions\/algoBcrypt", - "phpass": "#\/definitions\/algoPhpass", - "sha": "#\/definitions\/algoSha", - "md5": "#\/definitions\/algoMd5" - } - } - }, - "x-nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/preferences" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "x-nullable": true - }, - "impersonatorUserId": { - "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" - } - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" - } - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": [ - "jwt" - ], - "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the European Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ], - "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" - } - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": [ - "code", - "name" - ], - "example": { - "code": "en-us", - "name": "US" - } - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true - }, - "compression": { - "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" - ], - "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" - } - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { - "type": "string" - }, - "x-example": [ - "jpg", - "png" - ] - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Image transformations are enabled.", - "x-example": false - }, - "totalSize": { - "type": "integer", - "description": "Total size of this bucket in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus", - "transformations", - "totalSize" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "fileSecurity": true, - "name": "Documents", - "enabled": false, - "maximumFileSize": 100, - "allowedFileExtensions": [ - "jpg", - "png" - ], - "compression": "gzip", - "encryption": false, - "antivirus": false, - "transformations": false, - "totalSize": 128 - } - }, - "resourceToken": { - "description": "ResourceToken", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "files" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "resourceId", - "resourceType", - "expire", - "secret", - "accessedAt" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", - "resourceType": "files", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "accessedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } - } - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": [ - "owner" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "roles": [ - "owner" - ] - } - }, - "site": { - "description": "Site", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Site ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Site creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Site update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Site name.", - "x-example": "My Site" - }, - "enabled": { - "type": "boolean", - "description": "Site enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "framework": { - "type": "string", - "description": "Site framework.", - "x-example": "react" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Site's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "deploymentScreenshotLight": { - "type": "string", - "description": "Screenshot of active deployment with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentScreenshotDark": { - "type": "string", - "description": "Screenshot of active deployment with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentId": { - "type": "string", - "description": "Site's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "vars": { - "type": "array", - "description": "Site variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/variable" - }, - "x-example": [] - }, - "timeout": { - "type": "integer", - "description": "Site request timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "The install command used to install the site dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "The build command used to build the site.", - "x-example": "npm run build" - }, - "startCommand": { - "type": "string", - "description": "Custom command to use when starting site runtime.", - "x-example": "node custom-server.mjs" - }, - "outputDirectory": { - "type": "string", - "description": "The directory where the site build output is located.", - "x-example": "build" - }, - "installationId": { - "type": "string", - "description": "Site VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": "sites\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for SSR executions.", - "x-example": "s-1vcpu-512mb" - }, - "buildRuntime": { - "type": "string", - "description": "Site build runtime.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework adapter.", - "x-example": "static" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "enabled", - "live", - "logging", - "framework", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "deploymentScreenshotLight", - "deploymentScreenshotDark", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "vars", - "timeout", - "installCommand", - "buildCommand", - "startCommand", - "outputDirectory", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification", - "buildRuntime", - "adapter", - "fallbackFile" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Site", - "enabled": false, - "live": false, - "logging": false, - "framework": "react", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "deploymentScreenshotLight": "5e5ea5c16897e", - "deploymentScreenshotDark": "5e5ea5c16897e", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "vars": [], - "timeout": 300, - "installCommand": "npm install", - "buildCommand": "npm run build", - "startCommand": "node custom-server.mjs", - "outputDirectory": "build", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "sites\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb", - "buildRuntime": "node-22", - "adapter": "static", - "fallbackFile": "index.html" - } - }, - "templateSite": { - "description": "Template Site", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Site Template ID.", - "x-example": "starter" - }, - "name": { - "type": "string", - "description": "Site Template Name.", - "x-example": "Starter site" - }, - "tagline": { - "type": "string", - "description": "Short description of template", - "x-example": "Minimal web app integrating with Appwrite." - }, - "demoUrl": { - "type": "string", - "description": "URL hosting a template demo.", - "x-example": "https:\/\/nextjs-starter.appwrite.network\/" - }, - "screenshotDark": { - "type": "string", - "description": "File URL with preview screenshot in dark theme preference.", - "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png" - }, - "screenshotLight": { - "type": "string", - "description": "File URL with preview screenshot in light theme preference.", - "x-example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png" - }, - "useCases": { - "type": "array", - "description": "Site use cases.", - "items": { - "type": "string" - }, - "x-example": "Starter" - }, - "frameworks": { - "type": "array", - "description": "List of frameworks that can be used with this template.", - "items": { - "type": "object", - "$ref": "#\/definitions\/templateFramework" - }, - "x-example": [] - }, - "vcsProvider": { - "type": "string", - "description": "VCS (Version Control System) Provider.", - "x-example": "github" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "templates" - }, - "providerOwner": { - "type": "string", - "description": "VCS (Version Control System) Owner.", - "x-example": "appwrite" - }, - "providerVersion": { - "type": "string", - "description": "VCS (Version Control System) branch version (tag).", - "x-example": "main" - }, - "variables": { - "type": "array", - "description": "Site variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/templateVariable" - }, - "x-example": [] - } - }, - "required": [ - "key", - "name", - "tagline", - "demoUrl", - "screenshotDark", - "screenshotLight", - "useCases", - "frameworks", - "vcsProvider", - "providerRepositoryId", - "providerOwner", - "providerVersion", - "variables" - ], - "example": { - "key": "starter", - "name": "Starter site", - "tagline": "Minimal web app integrating with Appwrite.", - "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", - "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", - "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", - "useCases": "Starter", - "frameworks": [], - "vcsProvider": "github", - "providerRepositoryId": "templates", - "providerOwner": "appwrite", - "providerVersion": "main", - "variables": [] - } - }, - "templateFramework": { - "description": "Template Framework", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Parent framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "installCommand": { - "type": "string", - "description": "The install command used to install the dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "The output directory to store the build output.", - "x-example": ".\/build" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": ".\/svelte-kit\/starter" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime used during build step of template.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework runtime", - "x-example": "ssr" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for SPA. Only relevant for static serve runtime.", - "x-example": "index.html" - } - }, - "required": [ - "key", - "name", - "installCommand", - "buildCommand", - "outputDirectory", - "providerRootDirectory", - "buildRuntime", - "adapter", - "fallbackFile" - ], - "example": { - "key": "sveltekit", - "name": "SvelteKit", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/build", - "providerRootDirectory": ".\/svelte-kit\/starter", - "buildRuntime": "node-22", - "adapter": "ssr", - "fallbackFile": "index.html" - } - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "runtime": { - "type": "string", - "description": "Function execution and build runtime.", - "x-example": "python-3.8" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentId": { - "type": "string", - "description": "Function's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "execute": "users", - "name": "My Function", - "enabled": false, - "live": false, - "logging": false, - "runtime": "python-3.8", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "scopes": "users.read", - "vars": [], - "events": "account.create", - "schedule": "5 4 * * *", - "timeout": 300, - "entrypoint": "index.js", - "commands": "npm install", - "version": "v2", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "functions\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb" - } - }, - "templateFunction": { - "description": "Template Function", - "type": "object", - "properties": { - "icon": { - "type": "string", - "description": "Function Template Icon.", - "x-example": "icon-lightning-bolt" - }, - "id": { - "type": "string", - "description": "Function Template ID.", - "x-example": "starter" - }, - "name": { - "type": "string", - "description": "Function Template Name.", - "x-example": "Starter function" - }, - "tagline": { - "type": "string", - "description": "Function Template Tagline.", - "x-example": "A simple function to get started." - }, - "permissions": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "any" - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "cron": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "0 0 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "useCases": { - "type": "array", - "description": "Function use cases.", - "items": { - "type": "string" - }, - "x-example": "Starter" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes that can be used with this template.", - "items": { - "type": "object", - "$ref": "#\/definitions\/templateRuntime" - }, - "x-example": [] - }, - "instructions": { - "type": "string", - "description": "Function Template Instructions.", - "x-example": "For documentation and instructions check out <link>." - }, - "vcsProvider": { - "type": "string", - "description": "VCS (Version Control System) Provider.", - "x-example": "github" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "templates" - }, - "providerOwner": { - "type": "string", - "description": "VCS (Version Control System) Owner.", - "x-example": "appwrite" - }, - "providerVersion": { - "type": "string", - "description": "VCS (Version Control System) branch version (tag).", - "x-example": "main" - }, - "variables": { - "type": "array", - "description": "Function variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/templateVariable" - }, - "x-example": [] - }, - "scopes": { - "type": "array", - "description": "Function scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - } - }, - "required": [ - "icon", - "id", - "name", - "tagline", - "permissions", - "events", - "cron", - "timeout", - "useCases", - "runtimes", - "instructions", - "vcsProvider", - "providerRepositoryId", - "providerOwner", - "providerVersion", - "variables", - "scopes" - ], - "example": { - "icon": "icon-lightning-bolt", - "id": "starter", - "name": "Starter function", - "tagline": "A simple function to get started.", - "permissions": "any", - "events": "account.create", - "cron": "0 0 * * *", - "timeout": 300, - "useCases": "Starter", - "runtimes": [], - "instructions": "For documentation and instructions check out <link>.", - "vcsProvider": "github", - "providerRepositoryId": "templates", - "providerOwner": "appwrite", - "providerVersion": "main", - "variables": [], - "scopes": "users.read" - } - }, - "templateRuntime": { - "description": "Template Runtime", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "node-19.0" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "node\/starter" - } - }, - "required": [ - "name", - "commands", - "entrypoint", - "providerRootDirectory" - ], - "example": { - "name": "node-19.0", - "commands": "npm install", - "entrypoint": "index.js", - "providerRootDirectory": "node\/starter" - } - }, - "templateVariable": { - "description": "Template Variable", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Variable Name.", - "x-example": "APPWRITE_DATABASE_ID" - }, - "description": { - "type": "string", - "description": "Variable Description.", - "x-example": "The ID of the Appwrite database that contains the collection to sync." - }, - "value": { - "type": "string", - "description": "Variable Value.", - "x-example": "512" - }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false - }, - "placeholder": { - "type": "string", - "description": "Variable Placeholder.", - "x-example": "64a55...7b912" - }, - "required": { - "type": "boolean", - "description": "Is the variable required?", - "x-example": false - }, - "type": { - "type": "string", - "description": "Variable Type.", - "x-example": "password" - } - }, - "required": [ - "name", - "description", - "value", - "secret", - "placeholder", - "required", - "type" - ], - "example": { - "name": "APPWRITE_DATABASE_ID", - "description": "The ID of the Appwrite database that contains the collection to sync.", - "value": "512", - "secret": false, - "placeholder": "64a55...7b912", - "required": false, - "type": "password" - } - }, - "installation": { - "description": "Installation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name.", - "x-example": "appwrite" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "5322" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "provider", - "organization", - "providerInstallationId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "provider": "github", - "organization": "appwrite", - "providerInstallationId": "5322" - } - }, - "providerRepository": { - "description": "ProviderRepository", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "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" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "108104697" - }, - "authorized": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository authorized for the installation?", - "x-example": true - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "string" - }, - "x-example": [ - "PORT", - "NODE_ENV" - ] - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "defaultBranch", - "providerInstallationId", - "authorized", - "pushedAt", - "variables" - ], - "example": { - "id": "5e5ea5c16897e", - "name": "appwrite", - "organization": "appwrite", - "provider": "github", - "private": true, - "defaultBranch": "main", - "providerInstallationId": "108104697", - "authorized": true, - "pushedAt": "datetime", - "variables": [ - "PORT", - "NODE_ENV" - ] - } - }, - "providerRepositoryFramework": { - "description": "ProviderRepositoryFramework", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "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" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "108104697" - }, - "authorized": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository authorized for the installation?", - "x-example": true - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "string" - }, - "x-example": [ - "PORT", - "NODE_ENV" - ] - }, - "framework": { - "type": "string", - "description": "Auto-detected framework. Empty if type is not \"framework\".", - "x-example": "nextjs" - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "defaultBranch", - "providerInstallationId", - "authorized", - "pushedAt", - "variables", - "framework" - ], - "example": { - "id": "5e5ea5c16897e", - "name": "appwrite", - "organization": "appwrite", - "provider": "github", - "private": true, - "defaultBranch": "main", - "providerInstallationId": "108104697", - "authorized": true, - "pushedAt": "datetime", - "variables": [ - "PORT", - "NODE_ENV" - ], - "framework": "nextjs" - } - }, - "providerRepositoryRuntime": { - "description": "ProviderRepositoryRuntime", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "VCS (Version Control System) repository ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "VCS (Version Control System) repository name.", - "x-example": "appwrite" - }, - "organization": { - "type": "string", - "description": "VCS (Version Control System) organization name", - "x-example": "appwrite" - }, - "provider": { - "type": "string", - "description": "VCS (Version Control System) provider name.", - "x-example": "github" - }, - "private": { - "type": "boolean", - "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" - }, - "providerInstallationId": { - "type": "string", - "description": "VCS (Version Control System) installation ID.", - "x-example": "108104697" - }, - "authorized": { - "type": "boolean", - "description": "Is VCS (Version Control System) repository authorized for the installation?", - "x-example": true - }, - "pushedAt": { - "type": "string", - "description": "Last commit date in ISO 8601 format.", - "x-example": "datetime" - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "string" - }, - "x-example": [ - "PORT", - "NODE_ENV" - ] - }, - "runtime": { - "type": "string", - "description": "Auto-detected runtime. Empty if type is not \"runtime\".", - "x-example": "node-22" - } - }, - "required": [ - "id", - "name", - "organization", - "provider", - "private", - "defaultBranch", - "providerInstallationId", - "authorized", - "pushedAt", - "variables", - "runtime" - ], - "example": { - "id": "5e5ea5c16897e", - "name": "appwrite", - "organization": "appwrite", - "provider": "github", - "private": true, - "defaultBranch": "main", - "providerInstallationId": "108104697", - "authorized": true, - "pushedAt": "datetime", - "variables": [ - "PORT", - "NODE_ENV" - ], - "runtime": "node-22" - } - }, - "detectionFramework": { - "description": "DetectionFramework", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Repository detection type.", - "x-example": "framework", - "enum": [ - "framework" - ] - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "object", - "$ref": "#\/definitions\/detectionVariable" - }, - "x-example": {}, - "x-nullable": true - }, - "framework": { - "type": "string", - "description": "Framework", - "x-example": "nuxt" - }, - "installCommand": { - "type": "string", - "description": "Site Install Command", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Site Build Command", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "Site Output Directory", - "x-example": "dist" - } - }, - "required": [ - "type", - "framework", - "installCommand", - "buildCommand", - "outputDirectory" - ], - "example": { - "type": "framework", - "variables": {}, - "framework": "nuxt", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": "dist" - } - }, - "detectionRuntime": { - "description": "DetectionRuntime", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Repository detection type.", - "x-example": "runtime", - "enum": [ - "runtime" - ] - }, - "variables": { - "type": "array", - "description": "Environment variables found in .env files", - "items": { - "type": "object", - "$ref": "#\/definitions\/detectionVariable" - }, - "x-example": {}, - "x-nullable": true - }, - "runtime": { - "type": "string", - "description": "Runtime", - "x-example": "node" - }, - "entrypoint": { - "type": "string", - "description": "Function Entrypoint", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "Function install and build commands", - "x-example": "npm install && npm run build" - } - }, - "required": [ - "type", - "runtime", - "entrypoint", - "commands" - ], - "example": { - "type": "runtime", - "variables": {}, - "runtime": "node", - "entrypoint": "index.js", - "commands": "npm install && npm run build" - } - }, - "detectionVariable": { - "description": "DetectionVariable", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of environment variable", - "x-example": "NODE_ENV" - }, - "value": { - "type": "string", - "description": "Value of environment variable", - "x-example": "production" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "NODE_ENV", - "value": "production" - } - }, - "vcsContent": { - "description": "VcsContents", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", - "x-example": 1523, - "format": "int32", - "x-nullable": true - }, - "isDirectory": { - "type": "boolean", - "description": "If a content is a directory. Directories can be used to check nested contents.", - "x-example": true, - "x-nullable": true - }, - "name": { - "type": "string", - "description": "Name of directory or file.", - "x-example": "Main.java" - } - }, - "required": [ - "name" - ], - "example": { - "size": 1523, - "isDirectory": true, - "name": "Main.java" - } - }, - "branch": { - "description": "Branch", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Branch Name.", - "x-example": "main" - } - }, - "required": [ - "name" - ], - "example": { - "name": "main" - } - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { - "type": "string" - }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ], - "example": { - "$id": "python-3.8", - "key": "python", - "name": "Python", - "version": "3.8", - "base": "python:3.8-alpine", - "image": "appwrite\\\/runtime-for-python:3.8", - "logo": "python.png", - "supports": "amd64" - } - }, - "framework": { - "description": "Framework", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "buildRuntime": { - "type": "string", - "description": "Default runtime version.", - "x-example": "node-22" - }, - "runtimes": { - "type": "array", - "description": "List of supported runtime versions.", - "items": { - "type": "string" - }, - "x-example": [ - "static-1", - "node-22" - ] - }, - "adapters": { - "type": "array", - "description": "List of supported adapters.", - "items": { - "type": "object", - "$ref": "#\/definitions\/frameworkAdapter" - }, - "x-example": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "required": [ - "key", - "name", - "buildRuntime", - "runtimes", - "adapters" - ], - "example": { - "key": "sveltekit", - "name": "SvelteKit", - "buildRuntime": "node-22", - "runtimes": [ - "static-1", - "node-22" - ], - "adapters": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "frameworkAdapter": { - "description": "Framework Adapter", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Adapter key.", - "x-example": "static" - }, - "installCommand": { - "type": "string", - "description": "Default command to download dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Default command to build site into output directory.", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "Default output directory of build.", - "x-example": ".\/dist" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "key", - "installCommand", - "buildCommand", - "outputDirectory", - "fallbackFile" - ], - "example": { - "key": "static", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/dist", - "fallbackFile": "index.html" - } - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "sourceSize": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output size in bytes.", - "x-example": 128, - "format": "int32" - }, - "totalSize": { - "type": "integer", - "description": "The total size in bytes (source and build output).", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "screenshotLight": { - "type": "string", - "description": "Screenshot with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "screenshotDark": { - "type": "string", - "description": "Screenshot with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", - "x-example": "ready", - "enum": [ - "waiting", - "processing", - "building", - "ready", - "canceled", - "failed" - ] - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildDuration": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https:\/\/github.com\/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "sourceSize", - "buildSize", - "totalSize", - "buildId", - "activate", - "screenshotLight", - "screenshotDark", - "status", - "buildLogs", - "buildDuration", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranch", - "providerBranchUrl" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "type": "vcs", - "resourceId": "5e5ea6g16897e", - "resourceType": "functions", - "entrypoint": "index.js", - "sourceSize": 128, - "buildSize": 128, - "totalSize": 128, - "buildId": "5e5ea5c16897e", - "activate": true, - "screenshotLight": "5e5ea5c16897e", - "screenshotDark": "5e5ea5c16897e", - "status": "ready", - "buildLogs": "Compiling source files...", - "buildDuration": 128, - "providerRepositoryName": "database", - "providerRepositoryOwner": "utopia", - "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerCommitHash": "7c3f25d", - "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", - "providerCommitAuthor": "Khushboo Verma", - "providerCommitMessage": "Update index.js", - "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", - "providerBranch": "0.7.x", - "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": [ - "any" - ] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#\/definitions\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#\/definitions\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Project creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Project update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Project name.", - "x-example": "New Project" - }, - "description": { - "type": "string", - "description": "Project description.", - "x-example": "This is a new project." - }, - "teamId": { - "type": "string", - "description": "Project team ID.", - "x-example": "1592981250" - }, - "logo": { - "type": "string", - "description": "Project logo file ID.", - "x-example": "5f5c451b403cb" - }, - "url": { - "type": "string", - "description": "Project website URL.", - "x-example": "5f5c451b403cb" - }, - "legalName": { - "type": "string", - "description": "Company legal name.", - "x-example": "Company LTD." - }, - "legalCountry": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", - "x-example": "US" - }, - "legalState": { - "type": "string", - "description": "State name.", - "x-example": "New York" - }, - "legalCity": { - "type": "string", - "description": "City name.", - "x-example": "New York City." - }, - "legalAddress": { - "type": "string", - "description": "Company Address.", - "x-example": "620 Eighth Avenue, New York, NY 10018" - }, - "legalTaxId": { - "type": "string", - "description": "Company Tax ID.", - "x-example": "131102020" - }, - "authDuration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 60, - "format": "int32" - }, - "authLimit": { - "type": "integer", - "description": "Max users allowed. 0 is unlimited.", - "x-example": 100, - "format": "int32" - }, - "authSessionsLimit": { - "type": "integer", - "description": "Max sessions allowed per user. 100 maximum.", - "x-example": 10, - "format": "int32" - }, - "authPasswordHistory": { - "type": "integer", - "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", - "x-example": 5, - "format": "int32" - }, - "authPasswordDictionary": { - "type": "boolean", - "description": "Whether or not to check user's password against most commonly used passwords.", - "x-example": true - }, - "authPersonalDataCheck": { - "type": "boolean", - "description": "Whether or not to check the user password for similarity with their personal data.", - "x-example": true - }, - "authDisposableEmails": { - "type": "boolean", - "description": "Whether or not to disallow disposable email addresses during signup and email updates.", - "x-example": true - }, - "authCanonicalEmails": { - "type": "boolean", - "description": "Whether or not to require canonical email addresses during signup and email updates.", - "x-example": true - }, - "authFreeEmails": { - "type": "boolean", - "description": "Whether or not to disallow free email addresses during signup and email updates.", - "x-example": true - }, - "authMockNumbers": { - "type": "array", - "description": "An array of mock numbers and their corresponding verification codes (OTPs).", - "items": { - "type": "object", - "$ref": "#\/definitions\/mockNumber" - }, - "x-example": [ - {} - ] - }, - "authSessionAlerts": { - "type": "boolean", - "description": "Whether or not to send session alert emails to users.", - "x-example": true - }, - "authMembershipsUserName": { - "type": "boolean", - "description": "Whether or not to show user names in the teams membership response.", - "x-example": true - }, - "authMembershipsUserEmail": { - "type": "boolean", - "description": "Whether or not to show user emails in the teams membership response.", - "x-example": true - }, - "authMembershipsMfa": { - "type": "boolean", - "description": "Whether or not to show user MFA status in the teams membership response.", - "x-example": true - }, - "authMembershipsUserId": { - "type": "boolean", - "description": "Whether or not to show user IDs in the teams membership response.", - "x-example": true - }, - "authMembershipsUserPhone": { - "type": "boolean", - "description": "Whether or not to show user phone numbers in the teams membership response.", - "x-example": true - }, - "authInvalidateSessions": { - "type": "boolean", - "description": "Whether or not all existing sessions should be invalidated on password change", - "x-example": true - }, - "oAuthProviders": { - "type": "array", - "description": "List of Auth Providers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/authProvider" - }, - "x-example": [ - {} - ] - }, - "platforms": { - "type": "array", - "description": "List of Platforms.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/platformWeb" - }, - { - "$ref": "#\/definitions\/platformApple" - }, - { - "$ref": "#\/definitions\/platformAndroid" - }, - { - "$ref": "#\/definitions\/platformWindows" - }, - { - "$ref": "#\/definitions\/platformLinux" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/definitions\/platformWeb", - "apple": "#\/definitions\/platformApple", - "android": "#\/definitions\/platformAndroid", - "windows": "#\/definitions\/platformWindows", - "linux": "#\/definitions\/platformLinux" - } - } - }, - "x-example": {} - }, - "webhooks": { - "type": "array", - "description": "List of Webhooks.", - "items": { - "type": "object", - "$ref": "#\/definitions\/webhook" - }, - "x-example": {} - }, - "keys": { - "type": "array", - "description": "List of API Keys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/key" - }, - "x-example": {} - }, - "devKeys": { - "type": "array", - "description": "List of dev keys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/devKey" - }, - "x-example": {} - }, - "smtpEnabled": { - "type": "boolean", - "description": "Status for custom SMTP", - "x-example": false - }, - "smtpSenderName": { - "type": "string", - "description": "SMTP sender name", - "x-example": "John Appwrite" - }, - "smtpSenderEmail": { - "type": "string", - "description": "SMTP sender email", - "x-example": "john@appwrite.io" - }, - "smtpReplyToName": { - "type": "string", - "description": "SMTP reply to name", - "x-example": "Support Team" - }, - "smtpReplyToEmail": { - "type": "string", - "description": "SMTP reply to email", - "x-example": "support@appwrite.io" - }, - "smtpHost": { - "type": "string", - "description": "SMTP server host name", - "x-example": "mail.appwrite.io" - }, - "smtpPort": { - "type": "integer", - "description": "SMTP server port", - "x-example": 25, - "format": "int32" - }, - "smtpUsername": { - "type": "string", - "description": "SMTP server username", - "x-example": "emailuser" - }, - "smtpPassword": { - "type": "string", - "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" - }, - "smtpSecure": { - "type": "string", - "description": "SMTP server secure protocol", - "x-example": "tls" - }, - "pingCount": { - "type": "integer", - "description": "Number of times the ping was received for this project.", - "x-example": 1, - "format": "int32" - }, - "pingedAt": { - "type": "string", - "description": "Last ping datetime in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "labels": { - "type": "array", - "description": "Labels for the project.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "status": { - "type": "string", - "description": "Project status.", - "x-example": "active" - }, - "authEmailPassword": { - "type": "boolean", - "description": "Email\/Password auth method status", - "x-example": true - }, - "authUsersAuthMagicURL": { - "type": "boolean", - "description": "Magic URL auth method status", - "x-example": true - }, - "authEmailOtp": { - "type": "boolean", - "description": "Email (OTP) auth method status", - "x-example": true - }, - "authAnonymous": { - "type": "boolean", - "description": "Anonymous auth method status", - "x-example": true - }, - "authInvites": { - "type": "boolean", - "description": "Invites auth method status", - "x-example": true - }, - "authJWT": { - "type": "boolean", - "description": "JWT auth method status", - "x-example": true - }, - "authPhone": { - "type": "boolean", - "description": "Phone auth method status", - "x-example": true - }, - "serviceStatusForAccount": { - "type": "boolean", - "description": "Account service status", - "x-example": true - }, - "serviceStatusForAvatars": { - "type": "boolean", - "description": "Avatars service status", - "x-example": true - }, - "serviceStatusForDatabases": { - "type": "boolean", - "description": "Databases (legacy) service status", - "x-example": true - }, - "serviceStatusForTablesdb": { - "type": "boolean", - "description": "TablesDB service status", - "x-example": true - }, - "serviceStatusForLocale": { - "type": "boolean", - "description": "Locale service status", - "x-example": true - }, - "serviceStatusForHealth": { - "type": "boolean", - "description": "Health service status", - "x-example": true - }, - "serviceStatusForProject": { - "type": "boolean", - "description": "Project service status", - "x-example": true - }, - "serviceStatusForStorage": { - "type": "boolean", - "description": "Storage service status", - "x-example": true - }, - "serviceStatusForTeams": { - "type": "boolean", - "description": "Teams service status", - "x-example": true - }, - "serviceStatusForUsers": { - "type": "boolean", - "description": "Users service status", - "x-example": true - }, - "serviceStatusForVcs": { - "type": "boolean", - "description": "VCS service status", - "x-example": true - }, - "serviceStatusForSites": { - "type": "boolean", - "description": "Sites service status", - "x-example": true - }, - "serviceStatusForFunctions": { - "type": "boolean", - "description": "Functions service status", - "x-example": true - }, - "serviceStatusForProxy": { - "type": "boolean", - "description": "Proxy service status", - "x-example": true - }, - "serviceStatusForGraphql": { - "type": "boolean", - "description": "GraphQL service status", - "x-example": true - }, - "serviceStatusForMigrations": { - "type": "boolean", - "description": "Migrations service status", - "x-example": true - }, - "serviceStatusForMessaging": { - "type": "boolean", - "description": "Messaging service status", - "x-example": true - }, - "protocolStatusForRest": { - "type": "boolean", - "description": "REST protocol status", - "x-example": true - }, - "protocolStatusForGraphql": { - "type": "boolean", - "description": "GraphQL protocol status", - "x-example": true - }, - "protocolStatusForWebsocket": { - "type": "boolean", - "description": "Websocket protocol status", - "x-example": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authDuration", - "authLimit", - "authSessionsLimit", - "authPasswordHistory", - "authPasswordDictionary", - "authPersonalDataCheck", - "authDisposableEmails", - "authCanonicalEmails", - "authFreeEmails", - "authMockNumbers", - "authSessionAlerts", - "authMembershipsUserName", - "authMembershipsUserEmail", - "authMembershipsMfa", - "authMembershipsUserId", - "authMembershipsUserPhone", - "authInvalidateSessions", - "oAuthProviders", - "platforms", - "webhooks", - "keys", - "devKeys", - "smtpEnabled", - "smtpSenderName", - "smtpSenderEmail", - "smtpReplyToName", - "smtpReplyToEmail", - "smtpHost", - "smtpPort", - "smtpUsername", - "smtpPassword", - "smtpSecure", - "pingCount", - "pingedAt", - "labels", - "status", - "authEmailPassword", - "authUsersAuthMagicURL", - "authEmailOtp", - "authAnonymous", - "authInvites", - "authJWT", - "authPhone", - "serviceStatusForAccount", - "serviceStatusForAvatars", - "serviceStatusForDatabases", - "serviceStatusForTablesdb", - "serviceStatusForLocale", - "serviceStatusForHealth", - "serviceStatusForProject", - "serviceStatusForStorage", - "serviceStatusForTeams", - "serviceStatusForUsers", - "serviceStatusForVcs", - "serviceStatusForSites", - "serviceStatusForFunctions", - "serviceStatusForProxy", - "serviceStatusForGraphql", - "serviceStatusForMigrations", - "serviceStatusForMessaging", - "protocolStatusForRest", - "protocolStatusForGraphql", - "protocolStatusForWebsocket" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "New Project", - "description": "This is a new project.", - "teamId": "1592981250", - "logo": "5f5c451b403cb", - "url": "5f5c451b403cb", - "legalName": "Company LTD.", - "legalCountry": "US", - "legalState": "New York", - "legalCity": "New York City.", - "legalAddress": "620 Eighth Avenue, New York, NY 10018", - "legalTaxId": "131102020", - "authDuration": 60, - "authLimit": 100, - "authSessionsLimit": 10, - "authPasswordHistory": 5, - "authPasswordDictionary": true, - "authPersonalDataCheck": true, - "authDisposableEmails": true, - "authCanonicalEmails": true, - "authFreeEmails": true, - "authMockNumbers": [ - {} - ], - "authSessionAlerts": true, - "authMembershipsUserName": true, - "authMembershipsUserEmail": true, - "authMembershipsMfa": true, - "authMembershipsUserId": true, - "authMembershipsUserPhone": true, - "authInvalidateSessions": true, - "oAuthProviders": [ - {} - ], - "platforms": {}, - "webhooks": {}, - "keys": {}, - "devKeys": {}, - "smtpEnabled": false, - "smtpSenderName": "John Appwrite", - "smtpSenderEmail": "john@appwrite.io", - "smtpReplyToName": "Support Team", - "smtpReplyToEmail": "support@appwrite.io", - "smtpHost": "mail.appwrite.io", - "smtpPort": 25, - "smtpUsername": "emailuser", - "smtpPassword": "", - "smtpSecure": "tls", - "pingCount": 1, - "pingedAt": "2020-10-15T06:38:00.000+00:00", - "labels": [ - "vip" - ], - "status": "active", - "authEmailPassword": true, - "authUsersAuthMagicURL": true, - "authEmailOtp": true, - "authAnonymous": true, - "authInvites": true, - "authJWT": true, - "authPhone": true, - "serviceStatusForAccount": true, - "serviceStatusForAvatars": true, - "serviceStatusForDatabases": true, - "serviceStatusForTablesdb": true, - "serviceStatusForLocale": true, - "serviceStatusForHealth": true, - "serviceStatusForProject": true, - "serviceStatusForStorage": true, - "serviceStatusForTeams": true, - "serviceStatusForUsers": true, - "serviceStatusForVcs": true, - "serviceStatusForSites": true, - "serviceStatusForFunctions": true, - "serviceStatusForProxy": true, - "serviceStatusForGraphql": true, - "serviceStatusForMigrations": true, - "serviceStatusForMessaging": true, - "protocolStatusForRest": true, - "protocolStatusForGraphql": true, - "protocolStatusForWebsocket": true - } - }, - "webhook": { - "description": "Webhook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Webhook ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Webhook creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Webhook update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Webhook name.", - "x-example": "My Webhook" - }, - "url": { - "type": "string", - "description": "Webhook URL endpoint.", - "x-example": "https:\/\/example.com\/webhook" - }, - "events": { - "type": "array", - "description": "Webhook trigger events.", - "items": { - "type": "string" - }, - "x-example": [ - "databases.tables.update", - "databases.collections.update" - ] - }, - "tls": { - "type": "boolean", - "description": "Indicates if SSL \/ TLS certificate verification is enabled.", - "x-example": true - }, - "authUsername": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "authPassword": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - }, - "secret": { - "type": "string", - "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", - "x-example": "ad3d581ca230e2b7059c545e5a" - }, - "enabled": { - "type": "boolean", - "description": "Indicates if this webhook is enabled.", - "x-example": true - }, - "logs": { - "type": "string", - "description": "Webhook error logs from the most recent failure.", - "x-example": "Failed to connect to remote server." - }, - "attempts": { - "type": "integer", - "description": "Number of consecutive failed webhook attempts.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "url", - "events", - "tls", - "authUsername", - "authPassword", - "secret", - "enabled", - "logs", - "attempts" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Webhook", - "url": "https:\/\/example.com\/webhook", - "events": [ - "databases.tables.update", - "databases.collections.update" - ], - "tls": true, - "authUsername": "username", - "authPassword": "password", - "secret": "ad3d581ca230e2b7059c545e5a", - "enabled": true, - "logs": "Failed to connect to remote server.", - "attempts": 10 - } - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "ephemeralKey": { - "description": "Ephemeral Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "devKey": { - "description": "DevKey", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "Dev API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Dev API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "mockNumber": { - "description": "Mock Number", - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", - "x-example": "+1612842323" - }, - "otp": { - "type": "string", - "description": "Mock OTP for the number. ", - "x-example": "123456" - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "number", - "otp", - "$createdAt", - "$updatedAt" - ], - "example": { - "number": "+1612842323", - "otp": "123456", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "oAuth2Github": { - "description": "OAuth2GitHub", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", - "x-example": "e4d87900000000540733" - }, - "clientSecret": { - "type": "string", - "description": "GitHub OAuth2 client secret.", - "x-example": "5e07c00000000000000000000000000000198bcc" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "e4d87900000000540733", - "clientSecret": "5e07c00000000000000000000000000000198bcc" - } - }, - "oAuth2Discord": { - "description": "OAuth2Discord", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Discord OAuth2 client ID.", - "x-example": "950722000000343754" - }, - "clientSecret": { - "type": "string", - "description": "Discord OAuth2 client secret.", - "x-example": "YmPXnM000000000000000000002zFg5D" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "950722000000343754", - "clientSecret": "YmPXnM000000000000000000002zFg5D" - } - }, - "oAuth2Figma": { - "description": "OAuth2Figma", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Figma OAuth2 client ID.", - "x-example": "byay5H0000000000VtiI40" - }, - "clientSecret": { - "type": "string", - "description": "Figma OAuth2 client secret.", - "x-example": "yEpOYn0000000000000000004iIsU5" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "byay5H0000000000VtiI40", - "clientSecret": "yEpOYn0000000000000000004iIsU5" - } - }, - "oAuth2Dropbox": { - "description": "OAuth2Dropbox", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appKey": { - "type": "string", - "description": "Dropbox OAuth2 app key.", - "x-example": "jl000000000009t" - }, - "appSecret": { - "type": "string", - "description": "Dropbox OAuth2 app secret.", - "x-example": "g200000000000vw" - } - }, - "required": [ - "$id", - "enabled", - "appKey", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appKey": "jl000000000009t", - "appSecret": "g200000000000vw" - } - }, - "oAuth2Dailymotion": { - "description": "OAuth2Dailymotion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Dailymotion OAuth2 API key.", - "x-example": "07a9000000000000067f" - }, - "apiSecret": { - "type": "string", - "description": "Dailymotion OAuth2 API secret.", - "x-example": "a399a90000000000000000000000000000d90639" - } - }, - "required": [ - "$id", - "enabled", - "apiKey", - "apiSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "apiKey": "07a9000000000000067f", - "apiSecret": "a399a90000000000000000000000000000d90639" - } - }, - "oAuth2Bitbucket": { - "description": "OAuth2Bitbucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "key": { - "type": "string", - "description": "Bitbucket OAuth2 key.", - "x-example": "Knt70000000000ByRc" - }, - "secret": { - "type": "string", - "description": "Bitbucket OAuth2 secret.", - "x-example": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "required": [ - "$id", - "enabled", - "key", - "secret" - ], - "example": { - "$id": "github", - "enabled": false, - "key": "Knt70000000000ByRc", - "secret": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "oAuth2Bitly": { - "description": "OAuth2Bitly", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Bitly OAuth2 client ID.", - "x-example": "d95151000000000000000000000000000067af9b" - }, - "clientSecret": { - "type": "string", - "description": "Bitly OAuth2 client secret.", - "x-example": "a13e250000000000000000000000000000d73095" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "d95151000000000000000000000000000067af9b", - "clientSecret": "a13e250000000000000000000000000000d73095" - } - }, - "oAuth2Box": { - "description": "OAuth2Box", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Box OAuth2 client ID.", - "x-example": "deglcs00000000000000000000x2og6y" - }, - "clientSecret": { - "type": "string", - "description": "Box OAuth2 client secret.", - "x-example": "OKM1f100000000000000000000eshEif" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "deglcs00000000000000000000x2og6y", - "clientSecret": "OKM1f100000000000000000000eshEif" - } - }, - "oAuth2Autodesk": { - "description": "OAuth2Autodesk", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Autodesk OAuth2 client ID.", - "x-example": "5zw90v00000000000000000000kVYXN7" - }, - "clientSecret": { - "type": "string", - "description": "Autodesk OAuth2 client secret.", - "x-example": "7I000000000000MW" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "5zw90v00000000000000000000kVYXN7", - "clientSecret": "7I000000000000MW" - } - }, - "oAuth2Google": { - "description": "OAuth2Google", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Google OAuth2 client ID.", - "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" - }, - "clientSecret": { - "type": "string", - "description": "Google OAuth2 client secret.", - "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "oAuth2Zoom": { - "description": "OAuth2Zoom", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoom OAuth2 client ID.", - "x-example": "QMAC00000000000000w0AQ" - }, - "clientSecret": { - "type": "string", - "description": "Zoom OAuth2 client secret.", - "x-example": "GAWsG4000000000000000000007U01ON" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "QMAC00000000000000w0AQ", - "clientSecret": "GAWsG4000000000000000000007U01ON" - } - }, - "oAuth2Zoho": { - "description": "OAuth2Zoho", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoho OAuth2 client ID.", - "x-example": "1000.83C178000000000000000000RPNX0B" - }, - "clientSecret": { - "type": "string", - "description": "Zoho OAuth2 client secret.", - "x-example": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "1000.83C178000000000000000000RPNX0B", - "clientSecret": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "oAuth2Yandex": { - "description": "OAuth2Yandex", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yandex OAuth2 client ID.", - "x-example": "6a8a6a0000000000000000000091483c" - }, - "clientSecret": { - "type": "string", - "description": "Yandex OAuth2 client secret.", - "x-example": "bbf98500000000000000000000c75a63" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6a8a6a0000000000000000000091483c", - "clientSecret": "bbf98500000000000000000000c75a63" - } - }, - "oAuth2X": { - "description": "OAuth2X", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "X OAuth2 customer key.", - "x-example": "slzZV0000000000000NFLaWT" - }, - "secretKey": { - "type": "string", - "description": "X OAuth2 secret key.", - "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "slzZV0000000000000NFLaWT", - "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "oAuth2WordPress": { - "description": "OAuth2WordPress", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "WordPress OAuth2 client ID.", - "x-example": "130005" - }, - "clientSecret": { - "type": "string", - "description": "WordPress OAuth2 client secret.", - "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "130005", - "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "oAuth2Twitch": { - "description": "OAuth2Twitch", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Twitch OAuth2 client ID.", - "x-example": "vvi0in000000000000000000ikmt9p" - }, - "clientSecret": { - "type": "string", - "description": "Twitch OAuth2 client secret.", - "x-example": "pmapue000000000000000000zylw3v" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "vvi0in000000000000000000ikmt9p", - "clientSecret": "pmapue000000000000000000zylw3v" - } - }, - "oAuth2Stripe": { - "description": "OAuth2Stripe", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Stripe OAuth2 client ID.", - "x-example": "ca_UKibXX0000000000000000000006byvR" - }, - "apiSecretKey": { - "type": "string", - "description": "Stripe OAuth2 API secret key.", - "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "apiSecretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "ca_UKibXX0000000000000000000006byvR", - "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "oAuth2Spotify": { - "description": "OAuth2Spotify", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Spotify OAuth2 client ID.", - "x-example": "6ec271000000000000000000009beace" - }, - "clientSecret": { - "type": "string", - "description": "Spotify OAuth2 client secret.", - "x-example": "db068a000000000000000000008b5b9f" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6ec271000000000000000000009beace", - "clientSecret": "db068a000000000000000000008b5b9f" - } - }, - "oAuth2Slack": { - "description": "OAuth2Slack", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Slack OAuth2 client ID.", - "x-example": "23000000089.15000000000023" - }, - "clientSecret": { - "type": "string", - "description": "Slack OAuth2 client secret.", - "x-example": "81656000000000000000000000f3d2fd" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "23000000089.15000000000023", - "clientSecret": "81656000000000000000000000f3d2fd" - } - }, - "oAuth2Podio": { - "description": "OAuth2Podio", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Podio OAuth2 client ID.", - "x-example": "appwrite-oauth-test-app" - }, - "clientSecret": { - "type": "string", - "description": "Podio OAuth2 client secret.", - "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-oauth-test-app", - "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "oAuth2Notion": { - "description": "OAuth2Notion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauthClientId": { - "type": "string", - "description": "Notion OAuth2 client ID.", - "x-example": "341d8700-0000-0000-0000-000000446ee3" - }, - "oauthClientSecret": { - "type": "string", - "description": "Notion OAuth2 client secret.", - "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "required": [ - "$id", - "enabled", - "oauthClientId", - "oauthClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", - "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "oAuth2Salesforce": { - "description": "OAuth2Salesforce", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "Salesforce OAuth2 consumer key.", - "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" - }, - "customerSecret": { - "type": "string", - "description": "Salesforce OAuth2 consumer secret.", - "x-example": "3w000000000000e2" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "customerSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "customerSecret": "3w000000000000e2" - } - }, - "oAuth2Yahoo": { - "description": "OAuth2Yahoo", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yahoo OAuth2 client ID.", - "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" - }, - "clientSecret": { - "type": "string", - "description": "Yahoo OAuth2 client secret.", - "x-example": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "clientSecret": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "oAuth2Linkedin": { - "description": "OAuth2Linkedin", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "LinkedIn OAuth2 client ID.", - "x-example": "770000000000dv" - }, - "primaryClientSecret": { - "type": "string", - "description": "LinkedIn OAuth2 primary client secret.", - "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "primaryClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "770000000000dv", - "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "oAuth2Disqus": { - "description": "OAuth2Disqus", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "publicKey": { - "type": "string", - "description": "Disqus OAuth2 public key.", - "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" - }, - "secretKey": { - "type": "string", - "description": "Disqus OAuth2 secret key.", - "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "required": [ - "$id", - "enabled", - "publicKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "oAuth2Amazon": { - "description": "OAuth2Amazon", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Amazon OAuth2 client ID.", - "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" - }, - "clientSecret": { - "type": "string", - "description": "Amazon OAuth2 client secret.", - "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "oAuth2Etsy": { - "description": "OAuth2Etsy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "keyString": { - "type": "string", - "description": "Etsy OAuth2 keystring.", - "x-example": "nsgzxh0000000000008j85a2" - }, - "sharedSecret": { - "type": "string", - "description": "Etsy OAuth2 shared secret.", - "x-example": "tp000000ru" - } - }, - "required": [ - "$id", - "enabled", - "keyString", - "sharedSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "keyString": "nsgzxh0000000000008j85a2", - "sharedSecret": "tp000000ru" - } - }, - "oAuth2Facebook": { - "description": "OAuth2Facebook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appId": { - "type": "string", - "description": "Facebook OAuth2 app ID.", - "x-example": "260600000007694" - }, - "appSecret": { - "type": "string", - "description": "Facebook OAuth2 app secret.", - "x-example": "2d0b2800000000000000000000d38af4" - } - }, - "required": [ - "$id", - "enabled", - "appId", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appId": "260600000007694", - "appSecret": "2d0b2800000000000000000000d38af4" - } - }, - "oAuth2Tradeshift": { - "description": "OAuth2Tradeshift", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauth2ClientId": { - "type": "string", - "description": "Tradeshift OAuth2 client ID.", - "x-example": "appwrite-test-org.appwrite-test-app" - }, - "oauth2ClientSecret": { - "type": "string", - "description": "Tradeshift OAuth2 client secret.", - "x-example": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "required": [ - "$id", - "enabled", - "oauth2ClientId", - "oauth2ClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauth2ClientId": "appwrite-test-org.appwrite-test-app", - "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "oAuth2Paypal": { - "description": "OAuth2Paypal", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "PayPal OAuth2 client ID.", - "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" - }, - "secretKey": { - "type": "string", - "description": "PayPal OAuth2 secret key.", - "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "oAuth2Gitlab": { - "description": "OAuth2Gitlab", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "GitLab OAuth2 application ID.", - "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" - }, - "secret": { - "type": "string", - "description": "GitLab OAuth2 secret.", - "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" - }, - "endpoint": { - "type": "string", - "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", - "x-example": "https:\/\/gitlab.com" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "secret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "endpoint": "https:\/\/gitlab.com" - } - }, - "oAuth2Authentik": { - "description": "OAuth2Authentik", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Authentik OAuth2 client ID.", - "x-example": "dTKOPa0000000000000000000000000000e7G8hv" - }, - "clientSecret": { - "type": "string", - "description": "Authentik OAuth2 client secret.", - "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" - }, - "endpoint": { - "type": "string", - "description": "Authentik OAuth2 endpoint domain.", - "x-example": "example.authentik.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dTKOPa0000000000000000000000000000e7G8hv", - "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "endpoint": "example.authentik.com" - } - }, - "oAuth2Auth0": { - "description": "OAuth2Auth0", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Auth0 OAuth2 client ID.", - "x-example": "OaOkIA000000000000000000005KLSYq" - }, - "clientSecret": { - "type": "string", - "description": "Auth0 OAuth2 client secret.", - "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" - }, - "endpoint": { - "type": "string", - "description": "Auth0 OAuth2 endpoint domain.", - "x-example": "example.us.auth0.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "OaOkIA000000000000000000005KLSYq", - "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "endpoint": "example.us.auth0.com" - } - }, - "oAuth2FusionAuth": { - "description": "OAuth2FusionAuth", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "FusionAuth OAuth2 client ID.", - "x-example": "b2222c00-0000-0000-0000-000000862097" - }, - "clientSecret": { - "type": "string", - "description": "FusionAuth OAuth2 client secret.", - "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" - }, - "endpoint": { - "type": "string", - "description": "FusionAuth OAuth2 endpoint domain.", - "x-example": "example.fusionauth.io" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "b2222c00-0000-0000-0000-000000862097", - "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", - "endpoint": "example.fusionauth.io" - } - }, - "oAuth2Keycloak": { - "description": "OAuth2Keycloak", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Keycloak OAuth2 client ID.", - "x-example": "appwrite-o0000000st-app" - }, - "clientSecret": { - "type": "string", - "description": "Keycloak OAuth2 client secret.", - "x-example": "jdjrJd00000000000000000000HUsaZO" - }, - "endpoint": { - "type": "string", - "description": "Keycloak OAuth2 endpoint domain.", - "x-example": "keycloak.example.com" - }, - "realmName": { - "type": "string", - "description": "Keycloak OAuth2 realm name.", - "x-example": "appwrite-realm" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint", - "realmName" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-o0000000st-app", - "clientSecret": "jdjrJd00000000000000000000HUsaZO", - "endpoint": "keycloak.example.com", - "realmName": "appwrite-realm" - } - }, - "oAuth2Oidc": { - "description": "OAuth2Oidc", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "OpenID Connect OAuth2 client ID.", - "x-example": "qibI2x0000000000000000000000000006L2YFoG" - }, - "clientSecret": { - "type": "string", - "description": "OpenID Connect OAuth2 client secret.", - "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", - "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/token" - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "wellKnownURL", - "authorizationURL", - "tokenUrl", - "userInfoUrl" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "qibI2x0000000000000000000000000006L2YFoG", - "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", - "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", - "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", - "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "oAuth2Okta": { - "description": "OAuth2Okta", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Okta OAuth2 client ID.", - "x-example": "0oa00000000000000698" - }, - "clientSecret": { - "type": "string", - "description": "Okta OAuth2 client secret.", - "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" - }, - "domain": { - "type": "string", - "description": "Okta OAuth2 domain.", - "x-example": "trial-6400025.okta.com" - }, - "authorizationServerId": { - "type": "string", - "description": "Okta OAuth2 authorization server ID.", - "x-example": "aus000000000000000h7z" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "domain", - "authorizationServerId" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "0oa00000000000000698", - "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "domain": "trial-6400025.okta.com", - "authorizationServerId": "aus000000000000000h7z" - } - }, - "oAuth2Kick": { - "description": "OAuth2Kick", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Kick OAuth2 client ID.", - "x-example": "01KQ7C00000000000001MFHS32" - }, - "clientSecret": { - "type": "string", - "description": "Kick OAuth2 client secret.", - "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "01KQ7C00000000000001MFHS32", - "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "oAuth2Apple": { - "description": "OAuth2Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "apple" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "serviceId": { - "type": "string", - "description": "Apple OAuth2 service ID.", - "x-example": "ip.appwrite.app.web" - }, - "keyId": { - "type": "string", - "description": "Apple OAuth2 key ID.", - "x-example": "P4000000N8" - }, - "teamId": { - "type": "string", - "description": "Apple OAuth2 team ID.", - "x-example": "D4000000R6" - }, - "p8File": { - "type": "string", - "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", - "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "required": [ - "$id", - "enabled", - "serviceId", - "keyId", - "teamId", - "p8File" - ], - "example": { - "$id": "apple", - "enabled": false, - "serviceId": "ip.appwrite.app.web", - "keyId": "P4000000N8", - "teamId": "D4000000R6", - "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "oAuth2Microsoft": { - "description": "OAuth2Microsoft", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "Microsoft OAuth2 application ID.", - "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" - }, - "applicationSecret": { - "type": "string", - "description": "Microsoft OAuth2 application secret.", - "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", - "x-example": "common" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "applicationSecret", - "tenant" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", - "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "tenant": "common" - } - }, - "oAuth2ProviderList": { - "description": "OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers in the given project.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of OAuth2 providers.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/oAuth2Github" - }, - { - "$ref": "#\/definitions\/oAuth2Discord" - }, - { - "$ref": "#\/definitions\/oAuth2Figma" - }, - { - "$ref": "#\/definitions\/oAuth2Dropbox" - }, - { - "$ref": "#\/definitions\/oAuth2Dailymotion" - }, - { - "$ref": "#\/definitions\/oAuth2Bitbucket" - }, - { - "$ref": "#\/definitions\/oAuth2Bitly" - }, - { - "$ref": "#\/definitions\/oAuth2Box" - }, - { - "$ref": "#\/definitions\/oAuth2Autodesk" - }, - { - "$ref": "#\/definitions\/oAuth2Google" - }, - { - "$ref": "#\/definitions\/oAuth2Zoom" - }, - { - "$ref": "#\/definitions\/oAuth2Zoho" - }, - { - "$ref": "#\/definitions\/oAuth2Yandex" - }, - { - "$ref": "#\/definitions\/oAuth2X" - }, - { - "$ref": "#\/definitions\/oAuth2WordPress" - }, - { - "$ref": "#\/definitions\/oAuth2Twitch" - }, - { - "$ref": "#\/definitions\/oAuth2Stripe" - }, - { - "$ref": "#\/definitions\/oAuth2Spotify" - }, - { - "$ref": "#\/definitions\/oAuth2Slack" - }, - { - "$ref": "#\/definitions\/oAuth2Podio" - }, - { - "$ref": "#\/definitions\/oAuth2Notion" - }, - { - "$ref": "#\/definitions\/oAuth2Salesforce" - }, - { - "$ref": "#\/definitions\/oAuth2Yahoo" - }, - { - "$ref": "#\/definitions\/oAuth2Linkedin" - }, - { - "$ref": "#\/definitions\/oAuth2Disqus" - }, - { - "$ref": "#\/definitions\/oAuth2Amazon" - }, - { - "$ref": "#\/definitions\/oAuth2Etsy" - }, - { - "$ref": "#\/definitions\/oAuth2Facebook" - }, - { - "$ref": "#\/definitions\/oAuth2Tradeshift" - }, - { - "$ref": "#\/definitions\/oAuth2Paypal" - }, - { - "$ref": "#\/definitions\/oAuth2Gitlab" - }, - { - "$ref": "#\/definitions\/oAuth2Authentik" - }, - { - "$ref": "#\/definitions\/oAuth2Auth0" - }, - { - "$ref": "#\/definitions\/oAuth2FusionAuth" - }, - { - "$ref": "#\/definitions\/oAuth2Keycloak" - }, - { - "$ref": "#\/definitions\/oAuth2Oidc" - }, - { - "$ref": "#\/definitions\/oAuth2Apple" - }, - { - "$ref": "#\/definitions\/oAuth2Okta" - }, - { - "$ref": "#\/definitions\/oAuth2Kick" - }, - { - "$ref": "#\/definitions\/oAuth2Microsoft" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/definitions\/oAuth2Github", - "discord": "#\/definitions\/oAuth2Discord", - "figma": "#\/definitions\/oAuth2Figma", - "dropbox": "#\/definitions\/oAuth2Dropbox", - "dailymotion": "#\/definitions\/oAuth2Dailymotion", - "bitbucket": "#\/definitions\/oAuth2Bitbucket", - "bitly": "#\/definitions\/oAuth2Bitly", - "box": "#\/definitions\/oAuth2Box", - "autodesk": "#\/definitions\/oAuth2Autodesk", - "google": "#\/definitions\/oAuth2Google", - "zoom": "#\/definitions\/oAuth2Zoom", - "zoho": "#\/definitions\/oAuth2Zoho", - "yandex": "#\/definitions\/oAuth2Yandex", - "x": "#\/definitions\/oAuth2X", - "wordpress": "#\/definitions\/oAuth2WordPress", - "twitch": "#\/definitions\/oAuth2Twitch", - "stripe": "#\/definitions\/oAuth2Stripe", - "spotify": "#\/definitions\/oAuth2Spotify", - "slack": "#\/definitions\/oAuth2Slack", - "podio": "#\/definitions\/oAuth2Podio", - "notion": "#\/definitions\/oAuth2Notion", - "salesforce": "#\/definitions\/oAuth2Salesforce", - "yahoo": "#\/definitions\/oAuth2Yahoo", - "linkedin": "#\/definitions\/oAuth2Linkedin", - "disqus": "#\/definitions\/oAuth2Disqus", - "amazon": "#\/definitions\/oAuth2Amazon", - "etsy": "#\/definitions\/oAuth2Etsy", - "facebook": "#\/definitions\/oAuth2Facebook", - "tradeshift": "#\/definitions\/oAuth2Tradeshift", - "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", - "paypal": "#\/definitions\/oAuth2Paypal", - "paypalSandbox": "#\/definitions\/oAuth2Paypal", - "gitlab": "#\/definitions\/oAuth2Gitlab", - "authentik": "#\/definitions\/oAuth2Authentik", - "auth0": "#\/definitions\/oAuth2Auth0", - "fusionauth": "#\/definitions\/oAuth2FusionAuth", - "keycloak": "#\/definitions\/oAuth2Keycloak", - "oidc": "#\/definitions\/oAuth2Oidc", - "apple": "#\/definitions\/oAuth2Apple", - "okta": "#\/definitions\/oAuth2Okta", - "kick": "#\/definitions\/oAuth2Kick", - "microsoft": "#\/definitions\/oAuth2Microsoft" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "policyPasswordDictionary": { - "description": "Policy Password Dictionary", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password dictionary policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyPasswordHistory": { - "description": "Policy Password History", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Password history length. A value of 0 means the policy is disabled.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 5 - } - }, - "policyPasswordPersonalData": { - "description": "Policy Password Personal Data", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password personal data policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionAlert": { - "description": "Policy Session Alert", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session alert policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionDuration": { - "description": "Policy Session Duration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "duration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 3600, - "format": "int32" - } - }, - "required": [ - "$id", - "duration" - ], - "example": { - "$id": "password-dictionary", - "duration": 3600 - } - }, - "policySessionInvalidation": { - "description": "Policy Session Invalidation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session invalidation policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionLimit": { - "description": "Policy Session Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 10 - } - }, - "policyUserLimit": { - "description": "Policy User Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", - "x-example": 100, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 100 - } - }, - "policyMembershipPrivacy": { - "description": "Policy Membership Privacy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "userId": { - "type": "boolean", - "description": "Whether user ID is visible in memberships.", - "x-example": true - }, - "userEmail": { - "type": "boolean", - "description": "Whether user email is visible in memberships.", - "x-example": true - }, - "userPhone": { - "type": "boolean", - "description": "Whether user phone is visible in memberships.", - "x-example": true - }, - "userName": { - "type": "boolean", - "description": "Whether user name is visible in memberships.", - "x-example": true - }, - "userMFA": { - "type": "boolean", - "description": "Whether user MFA status is visible in memberships.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "userEmail", - "userPhone", - "userName", - "userMFA" - ], - "example": { - "$id": "password-dictionary", - "userId": true, - "userEmail": true, - "userPhone": true, - "userName": true, - "userMFA": true - } - }, - "authProvider": { - "description": "AuthProvider", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Auth Provider.", - "x-example": "github" - }, - "name": { - "type": "string", - "description": "Auth Provider name.", - "x-example": "GitHub" - }, - "appId": { - "type": "string", - "description": "OAuth 2.0 application ID.", - "x-example": "259125845563242502" - }, - "secret": { - "type": "string", - "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Auth Provider is active and can be used to create session.", - "x-example": "" - } - }, - "required": [ - "key", - "name", - "appId", - "secret", - "enabled" - ], - "example": { - "key": "github", - "name": "GitHub", - "appId": "259125845563242502", - "secret": "", - "enabled": "" - } - }, - "platformWeb": { - "description": "Platform Web", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": "app.example.com" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "hostname", - "key" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "hostname": "app.example.com" - } - }, - "platformApple": { - "description": "Platform Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "bundleIdentifier" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "bundleIdentifier": "com.company.appname" - } - }, - "platformAndroid": { - "description": "Platform Android", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "applicationId": { - "type": "string", - "description": "Android application ID.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "applicationId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "applicationId": "com.company.appname" - } - }, - "platformWindows": { - "description": "Platform Windows", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageIdentifierName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageIdentifierName": "com.company.appname" - } - }, - "platformLinux": { - "description": "Platform Linux", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageName": { - "type": "string", - "description": "Linux package name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageName": "com.company.appname" - } - }, - "platformList": { - "description": "Platforms List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of platforms in the given project.", - "x-example": 5, - "format": "int32" - }, - "platforms": { - "type": "array", - "description": "List of platforms.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/platformWeb" - }, - { - "$ref": "#\/definitions\/platformApple" - }, - { - "$ref": "#\/definitions\/platformAndroid" - }, - { - "$ref": "#\/definitions\/platformWindows" - }, - { - "$ref": "#\/definitions\/platformLinux" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/definitions\/platformWeb", - "apple": "#\/definitions\/platformApple", - "android": "#\/definitions\/platformAndroid", - "windows": "#\/definitions\/platformWindows", - "linux": "#\/definitions\/platformLinux" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "platforms" - ], - "example": { - "total": 5, - "platforms": "" - } - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "secret", - "resourceType", - "resourceId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "API_KEY", - "value": "myPa$$word1", - "secret": false, - "resourceType": "function", - "resourceId": "myAwesomeFunction" - } - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", - "x-example": "online", - "enum": [ - "disabled", - "offline", - "online" - ] - } - }, - "required": [ - "version", - "status" - ], - "example": { - "version": "1.0.0", - "status": "online" - } - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": [ - "size" - ], - "example": { - "size": 8 - } - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values are: `pass`, `fail`", - "x-example": "pass", - "enum": [ - "pass", - "fail" - ], - "x-enum-name": "HealthCheckStatus" - } - }, - "required": [ - "name", - "ping", - "status" - ], - "example": { - "name": "database", - "ping": 128, - "status": "pass" - } - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "\/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ], - "example": { - "name": "\/CN=www.google.com", - "subjectSN": "", - "issuerOrganisation": "", - "validFrom": "1704200998", - "validTo": "1711458597", - "signatureTypeSN": "RSA-SHA256" - } - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": [ - "remoteTime", - "localTime", - "diff" - ], - "example": { - "remoteTime": 1639490751, - "localTime": 1639490844, - "diff": 93 - } - }, - "metric": { - "description": "Metric", - "type": "object", - "properties": { - "value": { - "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, - "format": "int32" - }, - "date": { - "type": "string", - "description": "The date at which this metric was aggregated in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "value", - "date" - ], - "example": { - "value": 1, - "date": "2020-10-15T06:38:00.000+00:00" - } - }, - "metricBreakdown": { - "description": "Metric Breakdown", - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c16897e", - "x-nullable": true - }, - "name": { - "type": "string", - "description": "Resource name.", - "x-example": "Documents" - }, - "value": { - "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, - "format": "int32" - }, - "estimate": { - "type": "number", - "description": "The estimated value of this metric at the end of the period.", - "x-example": 1, - "format": "double", - "x-nullable": true - } - }, - "required": [ - "name", - "value" - ], - "example": { - "resourceId": "5e5ea5c16897e", - "name": "Documents", - "value": 1, - "estimate": 1 - } - }, - "usageDatabases": { - "description": "UsageDatabases", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "tablesTotal": { - "type": "integer", - "description": "Total aggregated number of tables.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated number of total databases storage in bytes.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "Aggregated number of databases per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "tables": { - "type": "array", - "description": "Aggregated number of tables per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "rows": { - "type": "array", - "description": "Aggregated number of rows per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "An array of the aggregated number of databases storage in bytes per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "tablesTotal", - "documentsTotal", - "rowsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "tables", - "documents", - "rows", - "storage", - "databasesReads", - "databasesWrites" - ], - "example": { - "range": "30d", - "databasesTotal": 0, - "collectionsTotal": 0, - "tablesTotal": 0, - "documentsTotal": 0, - "rowsTotal": 0, - "storageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "databases": [], - "collections": [], - "tables": [], - "documents": [], - "rows": [], - "storage": [], - "databasesReads": [], - "databasesWrites": [] - } - }, - "usageDatabase": { - "description": "UsageDatabase", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "tablesTotal": { - "type": "integer", - "description": "Total aggregated number of tables.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated number of total storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "tables": { - "type": "array", - "description": "Aggregated number of tables per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "rows": { - "type": "array", - "description": "Aggregated number of rows per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "tablesTotal", - "documentsTotal", - "rowsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "tables", - "documents", - "rows", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "tablesTotal": 0, - "documentsTotal": 0, - "rowsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "tables": [], - "documents": [], - "rows": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "usageTable": { - "description": "UsageTable", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of of rows.", - "x-example": 0, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "Aggregated number of rows per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "rowsTotal", - "rows" - ], - "example": { - "range": "30d", - "rowsTotal": 0, - "rows": [] - } - }, - "usageCollection": { - "description": "UsageCollection", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of of documents.", - "x-example": 0, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "documentsTotal", - "documents" - ], - "example": { - "range": "30d", - "documentsTotal": 0, - "documents": [] - } - }, - "usageUsers": { - "description": "UsageUsers", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of statistics of users.", - "x-example": 0, - "format": "int32" - }, - "sessionsTotal": { - "type": "integer", - "description": "Total aggregated number of active sessions.", - "x-example": 0, - "format": "int32" - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "sessions": { - "type": "array", - "description": "Aggregated number of active sessions per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "usersTotal", - "sessionsTotal", - "users", - "sessions" - ], - "example": { - "range": "30d", - "usersTotal": 0, - "sessionsTotal": 0, - "users": [], - "sessions": [] - } - }, - "usagePresence": { - "description": "UsagePresence", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersOnlineTotal": { - "type": "integer", - "description": "Current total number of online users.", - "x-example": 0, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "Aggregated number of online users per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "usersOnlineTotal", - "presences" - ], - "example": { - "range": "30d", - "usersOnlineTotal": 0, - "presences": [] - } - }, - "usageStorage": { - "description": "StorageUsage", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets", - "x-example": 0, - "format": "int32" - }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of files.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of files storage (in bytes).", - "x-example": 0, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "Aggregated number of buckets per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "files": { - "type": "array", - "description": "Aggregated number of files per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated number of files storage (in bytes) per period .", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "bucketsTotal", - "filesTotal", - "filesStorageTotal", - "buckets", - "files", - "storage" - ], - "example": { - "range": "30d", - "bucketsTotal": 0, - "filesTotal": 0, - "filesStorageTotal": 0, - "buckets": [], - "files": [], - "storage": [] - } - }, - "usageBuckets": { - "description": "UsageBuckets", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files storage (in bytes).", - "x-example": 0, - "format": "int32" - }, - "files": { - "type": "array", - "description": "Aggregated number of bucket files per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated number of bucket storage files (in bytes) per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "imageTransformations": { - "type": "array", - "description": "Aggregated number of files transformations per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Total aggregated number of files transformations.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "range", - "filesTotal", - "filesStorageTotal", - "files", - "storage", - "imageTransformations", - "imageTransformationsTotal" - ], - "example": { - "range": "30d", - "filesTotal": 0, - "filesStorageTotal": 0, - "files": [], - "storage": [], - "imageTransformations": [], - "imageTransformationsTotal": 0 - } - }, - "usageFunctions": { - "description": "UsageFunctions", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "functionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions.", - "x-example": 0, - "format": "int32" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of functions deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions deployment storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of functions build.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of functions build storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions execution.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "Aggregated number of functions per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": 0 - }, - "deployments": { - "type": "array", - "description": "Aggregated number of functions deployment per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of functions deployment storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "builds": { - "type": "array", - "description": "Aggregated number of functions build per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of functions build storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of functions build compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of functions build mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of functions execution per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of functions execution compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of functions mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful function builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed function builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "functionsTotal", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "functions", - "deployments", - "deploymentsStorage", - "buildsSuccessTotal", - "buildsFailedTotal", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" - ], - "example": { - "range": "30d", - "functionsTotal": 0, - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "functions": 0, - "deployments": [], - "deploymentsStorage": [], - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] - } - }, - "usageFunction": { - "description": "UsageFunction", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeAverage": { - "type": "integer", - "description": "Average builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of function executions compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of function mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsSuccessTotal", - "buildsFailedTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsTimeAverage", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" - ], - "example": { - "range": "30d", - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsTimeAverage": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "deployments": [], - "deploymentsStorage": [], - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] - } - }, - "usageSites": { - "description": "UsageSites", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "sitesTotal": { - "type": "integer", - "description": "Total aggregated number of sites.", - "x-example": 0, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "Aggregated number of sites per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of sites deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of sites deployment storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of sites build.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of sites build storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of sites build compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of sites build mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of sites execution.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of sites execution compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of sites execution mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "requestsTotal": { - "type": "integer", - "description": "Total aggregated number of requests.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "inbound": { - "type": "array", - "description": "Aggregated number of inbound bandwidth per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "outbound": { - "type": "array", - "description": "Aggregated number of outbound bandwidth per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "deployments": { - "type": "array", - "description": "Aggregated number of sites deployment per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of sites deployment storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful site builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed site builds.", - "x-example": 0, - "format": "int32" - }, - "builds": { - "type": "array", - "description": "Aggregated number of sites build per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of sites build storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of sites build compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of sites build mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of sites execution per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of sites execution compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of sites mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful site builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed site builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "sitesTotal", - "sites", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "requestsTotal", - "requests", - "inboundTotal", - "inbound", - "outboundTotal", - "outbound", - "deployments", - "deploymentsStorage", - "buildsSuccessTotal", - "buildsFailedTotal", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" - ], - "example": { - "range": "30d", - "sitesTotal": 0, - "sites": [], - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "requestsTotal": 0, - "requests": [], - "inboundTotal": 0, - "inbound": [], - "outboundTotal": 0, - "outbound": [], - "deployments": [], - "deploymentsStorage": [], - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] - } - }, - "usageSite": { - "description": "UsageSite", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeAverage": { - "type": "integer", - "description": "Average builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of function executions compute time per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of function mbSeconds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed builds per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "requestsTotal": { - "type": "integer", - "description": "Total aggregated number of requests.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "inbound": { - "type": "array", - "description": "Aggregated number of inbound bandwidth per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound bandwidth.", - "x-example": 0, - "format": "int32" - }, - "outbound": { - "type": "array", - "description": "Aggregated number of outbound bandwidth per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsSuccessTotal", - "buildsFailedTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsTimeAverage", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed", - "requestsTotal", - "requests", - "inboundTotal", - "inbound", - "outboundTotal", - "outbound" - ], - "example": { - "range": "30d", - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsTimeAverage": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "deployments": [], - "deploymentsStorage": [], - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [], - "requestsTotal": 0, - "requests": [], - "inboundTotal": 0, - "inbound": [], - "outboundTotal": 0, - "outbound": [] - } - }, - "usageProject": { - "description": "UsageProject", - "type": "object", - "properties": { - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents in legacy\/tablesdb.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDocumentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents in documentsdb.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" - }, - "documentsdbTotal": { - "type": "integer", - "description": "Total aggregated number of documentsdb.", - "x-example": 0, - "format": "int32" - }, - "databasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of databases storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "documentsdbDatabasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of documentsdb databases storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of users.", - "x-example": 0, - "format": "int32" - }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of files storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "functionsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of builds storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of deployments storage size (in bytes).", - "x-example": 0, - "format": "int32" - }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of databases reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of databases writes.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDatabasesReadsTotal": { - "type": "integer", - "description": "Total number of documentsdb databases reads.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDatabasesWritesTotal": { - "type": "integer", - "description": "Total number of documentsdb databases writes.", - "x-example": 0, - "format": "int32" - }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "network": { - "type": "array", - "description": "Aggregated number of consumed bandwidth per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of executions per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "executionsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of executions by functions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "bucketsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of usage by buckets.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "databasesStorageBreakdown": { - "type": "array", - "description": "An array of the aggregated breakdown of storage usage by databases.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "executionsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "buildsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of build mbSeconds by functions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "functionsStorageBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of functions storage size (in bytes).", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "authPhoneTotal": { - "type": "integer", - "description": "Total aggregated number of phone auth.", - "x-example": 0, - "format": "int32" - }, - "authPhoneEstimate": { - "type": "number", - "description": "Estimated total aggregated cost of phone auth.", - "x-example": 0, - "format": "double" - }, - "authPhoneCountryBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of phone auth by country.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metricBreakdown" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documentsdbDatabasesReads": { - "type": "array", - "description": "An array of aggregated number of documentsdb database reads.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documentsdbDatabasesWrites": { - "type": "array", - "description": "An array of aggregated number of documentsdb database writes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "documentsdbDatabasesStorage": { - "type": "array", - "description": "An array of aggregated sum of documentsdb databases storage size (in bytes) per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "imageTransformations": { - "type": "array", - "description": "An array of aggregated number of image transformations.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Total aggregated number of image transformations.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB databases.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbCollectionsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB collections.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDocumentsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB documents.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesStorageTotal": { - "type": "integer", - "description": "Total aggregated VectorsDB storage (bytes).", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesReadsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB reads.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabasesWritesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB writes.", - "x-example": 0, - "format": "int32" - }, - "vectorsdbDatabases": { - "type": "array", - "description": "Aggregated VectorsDB databases per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "vectorsdbCollections": { - "type": "array", - "description": "Aggregated VectorsDB collections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "vectorsdbDocuments": { - "type": "array", - "description": "Aggregated VectorsDB documents per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "vectorsdbDatabasesStorage": { - "type": "array", - "description": "Aggregated VectorsDB storage per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "vectorsdbDatabasesReads": { - "type": "array", - "description": "Aggregated VectorsDB reads per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "vectorsdbDatabasesWrites": { - "type": "array", - "description": "Aggregated VectorsDB writes per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "embeddingsText": { - "type": "object", - "description": "Aggregated number of text embedding calls per period.", - "x-example": [], - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextTokens": { - "type": "object", - "description": "Aggregated number of tokens processed by text embeddings per period.", - "x-example": [], - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextDuration": { - "type": "object", - "description": "Aggregated duration spent generating text embeddings per period.", - "x-example": [], - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextErrors": { - "type": "object", - "description": "Aggregated number of errors while generating text embeddings per period.", - "x-example": [], - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextTotal": { - "type": "object", - "description": "Total aggregated number of text embedding calls.", - "x-example": 0, - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextTokensTotal": { - "type": "object", - "description": "Total aggregated number of tokens processed by text.", - "x-example": 0, - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextDurationTotal": { - "type": "object", - "description": "Total aggregated duration spent generating text embeddings.", - "x-example": 0, - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - }, - "embeddingsTextErrorsTotal": { - "type": "object", - "description": "Total aggregated number of errors while generating text embeddings.", - "x-example": 0, - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - } - } - }, - "required": [ - "executionsTotal", - "documentsTotal", - "documentsdbDocumentsTotal", - "rowsTotal", - "databasesTotal", - "documentsdbTotal", - "databasesStorageTotal", - "documentsdbDatabasesStorageTotal", - "usersTotal", - "filesStorageTotal", - "functionsStorageTotal", - "buildsStorageTotal", - "deploymentsStorageTotal", - "bucketsTotal", - "executionsMbSecondsTotal", - "buildsMbSecondsTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "documentsdbDatabasesReadsTotal", - "documentsdbDatabasesWritesTotal", - "requests", - "network", - "users", - "executions", - "executionsBreakdown", - "bucketsBreakdown", - "databasesStorageBreakdown", - "executionsMbSecondsBreakdown", - "buildsMbSecondsBreakdown", - "functionsStorageBreakdown", - "authPhoneTotal", - "authPhoneEstimate", - "authPhoneCountryBreakdown", - "databasesReads", - "databasesWrites", - "documentsdbDatabasesReads", - "documentsdbDatabasesWrites", - "documentsdbDatabasesStorage", - "imageTransformations", - "imageTransformationsTotal", - "vectorsdbDatabasesTotal", - "vectorsdbCollectionsTotal", - "vectorsdbDocumentsTotal", - "vectorsdbDatabasesStorageTotal", - "vectorsdbDatabasesReadsTotal", - "vectorsdbDatabasesWritesTotal", - "vectorsdbDatabases", - "vectorsdbCollections", - "vectorsdbDocuments", - "vectorsdbDatabasesStorage", - "vectorsdbDatabasesReads", - "vectorsdbDatabasesWrites", - "embeddingsText", - "embeddingsTextTokens", - "embeddingsTextDuration", - "embeddingsTextErrors", - "embeddingsTextTotal", - "embeddingsTextTokensTotal", - "embeddingsTextDurationTotal", - "embeddingsTextErrorsTotal" - ], - "example": { - "executionsTotal": 0, - "documentsTotal": 0, - "documentsdbDocumentsTotal": 0, - "rowsTotal": 0, - "databasesTotal": 0, - "documentsdbTotal": 0, - "databasesStorageTotal": 0, - "documentsdbDatabasesStorageTotal": 0, - "usersTotal": 0, - "filesStorageTotal": 0, - "functionsStorageTotal": 0, - "buildsStorageTotal": 0, - "deploymentsStorageTotal": 0, - "bucketsTotal": 0, - "executionsMbSecondsTotal": 0, - "buildsMbSecondsTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "documentsdbDatabasesReadsTotal": 0, - "documentsdbDatabasesWritesTotal": 0, - "requests": [], - "network": [], - "users": [], - "executions": [], - "executionsBreakdown": [], - "bucketsBreakdown": [], - "databasesStorageBreakdown": [], - "executionsMbSecondsBreakdown": [], - "buildsMbSecondsBreakdown": [], - "functionsStorageBreakdown": [], - "authPhoneTotal": 0, - "authPhoneEstimate": 0, - "authPhoneCountryBreakdown": [], - "databasesReads": [], - "databasesWrites": [], - "documentsdbDatabasesReads": [], - "documentsdbDatabasesWrites": [], - "documentsdbDatabasesStorage": [], - "imageTransformations": [], - "imageTransformationsTotal": 0, - "vectorsdbDatabasesTotal": 0, - "vectorsdbCollectionsTotal": 0, - "vectorsdbDocumentsTotal": 0, - "vectorsdbDatabasesStorageTotal": 0, - "vectorsdbDatabasesReadsTotal": 0, - "vectorsdbDatabasesWritesTotal": 0, - "vectorsdbDatabases": [], - "vectorsdbCollections": [], - "vectorsdbDocuments": [], - "vectorsdbDatabasesStorage": [], - "vectorsdbDatabasesReads": [], - "vectorsdbDatabasesWrites": [], - "embeddingsText": [], - "embeddingsTextTokens": [], - "embeddingsTextDuration": [], - "embeddingsTextErrors": [], - "embeddingsTextTotal": 0, - "embeddingsTextTokensTotal": 0, - "embeddingsTextDurationTotal": 0, - "embeddingsTextErrorsTotal": 0 - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application\/json" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "Content-Type", - "value": "application\/json" - } - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "memory", - "cpus", - "enabled", - "slug" - ], - "example": { - "memory": 512, - "cpus": 1, - "enabled": true, - "slug": "s-1vcpu-512mb" - } - }, - "proxyRule": { - "description": "Rule", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Rule ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Rule creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Rule update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": "appwrite.company.com" - }, - "type": { - "type": "string", - "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", - "x-example": "deployment" - }, - "trigger": { - "type": "string", - "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", - "x-example": "manual" - }, - "redirectUrl": { - "type": "string", - "description": "URL to redirect to. Used if type is \"redirect\"", - "x-example": "https:\/\/appwrite.io\/docs" - }, - "redirectStatusCode": { - "type": "integer", - "description": "Status code to apply during redirect. Used if type is \"redirect\"", - "x-example": 301, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "ID of deployment. Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" - }, - "deploymentResourceType": { - "type": "string", - "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function", - "enum": [ - "function", - "site" - ], - "x-nullable": true - }, - "deploymentResourceId": { - "type": "string", - "description": "ID deployment's resource. Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" - }, - "deploymentVcsProviderBranch": { - "type": "string", - "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "main" - }, - "status": { - "type": "string", - "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified", - "enum": [ - "created", - "verifying", - "verified", - "unverified" - ] - }, - "logs": { - "type": "string", - "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", - "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." - }, - "renewAt": { - "type": "string", - "description": "Certificate auto-renewal date in ISO 8601 format.", - "x-example": "datetime" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "domain", - "type", - "trigger", - "redirectUrl", - "redirectStatusCode", - "deploymentId", - "deploymentResourceId", - "deploymentVcsProviderBranch", - "status", - "logs", - "renewAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "domain": "appwrite.company.com", - "type": "deployment", - "trigger": "manual", - "redirectUrl": "https:\/\/appwrite.io\/docs", - "redirectStatusCode": 301, - "deploymentId": "n3u9feiwmf", - "deploymentResourceType": "function", - "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "main", - "status": "verified", - "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", - "renewAt": "datetime" - } - }, - "schedule": { - "description": "Schedule", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Schedule ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Schedule creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Schedule update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceType": { - "type": "string", - "description": "The resource type associated with this schedule.", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "The resource ID associated with this schedule.", - "x-example": "5e5ea5c16897e" - }, - "resourceUpdatedAt": { - "type": "string", - "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "projectId": { - "type": "string", - "description": "The project ID associated with this schedule.", - "x-example": "5e5ea5c16897e" - }, - "schedule": { - "type": "string", - "description": "The CRON schedule expression.", - "x-example": "5 4 * * *" - }, - "data": { - "type": "object", - "additionalProperties": true, - "description": "Schedule data used to store resource-specific context needed for execution.", - "x-example": [] - }, - "active": { - "type": "boolean", - "description": "Whether the schedule is active.", - "x-example": true - }, - "region": { - "type": "string", - "description": "The region where the schedule is deployed.", - "x-example": "fra" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "resourceType", - "resourceId", - "resourceUpdatedAt", - "projectId", - "schedule", - "data", - "active", - "region" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "resourceType": "function", - "resourceId": "5e5ea5c16897e", - "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", - "projectId": "5e5ea5c16897e", - "schedule": "5 4 * * *", - "data": [], - "active": true, - "region": "fra" - } - }, - "emailTemplate": { - "description": "EmailTemplate", - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Template type", - "x-example": "verification" - }, - "locale": { - "type": "string", - "description": "Template locale", - "x-example": "en_us" - }, - "message": { - "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." - }, - "senderName": { - "type": "string", - "description": "Name of the sender", - "x-example": "My User" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" - }, - "replyToName": { - "type": "string", - "description": "Reply to name", - "x-example": "Support Team" - }, - "subject": { - "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" - } - }, - "required": [ - "templateId", - "locale", - "message", - "senderName", - "senderEmail", - "replyToEmail", - "replyToName", - "subject" - ], - "example": { - "templateId": "verification", - "locale": "en_us", - "message": "Click on the link to verify your account.", - "senderName": "My User", - "senderEmail": "mail@appwrite.io", - "replyToEmail": "emails@appwrite.io", - "replyToName": "Support Team", - "subject": "Please verify your email address" - } - }, - "consoleVariables": { - "description": "Console Variables", - "type": "object", - "properties": { - "_APP_DOMAIN_TARGET_CNAME": { - "type": "string", - "description": "CNAME target for your Appwrite custom domains.", - "x-example": "appwrite.io" - }, - "_APP_DOMAIN_TARGET_A": { - "type": "string", - "description": "A target for your Appwrite custom domains.", - "x-example": "127.0.0.1" - }, - "_APP_COMPUTE_BUILD_TIMEOUT": { - "type": "integer", - "description": "Maximum build timeout in seconds.", - "x-example": 900, - "format": "int32" - }, - "_APP_DOMAIN_TARGET_AAAA": { - "type": "string", - "description": "AAAA target for your Appwrite custom domains.", - "x-example": "::1" - }, - "_APP_DOMAIN_TARGET_CAA": { - "type": "string", - "description": "CAA target for your Appwrite custom domains.", - "x-example": "digicert.com" - }, - "_APP_STORAGE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for file upload in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_COMPUTE_SIZE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for deployment in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_USAGE_STATS": { - "type": "string", - "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", - "x-example": "enabled" - }, - "_APP_VCS_ENABLED": { - "type": "boolean", - "description": "Defines if VCS (Version Control System) is enabled.", - "x-example": true - }, - "_APP_DOMAIN_ENABLED": { - "type": "boolean", - "description": "Defines if main domain is configured. If so, custom domains can be created.", - "x-example": true - }, - "_APP_ASSISTANT_ENABLED": { - "type": "boolean", - "description": "Defines if AI assistant is enabled.", - "x-example": true - }, - "_APP_DOMAIN_SITES": { - "type": "string", - "description": "A comma separated list of domains to use for site URLs.", - "x-example": "sites.localhost,sites.example.com" - }, - "_APP_DOMAIN_FUNCTIONS": { - "type": "string", - "description": "A domain to use for function URLs.", - "x-example": "functions.localhost" - }, - "_APP_OPTIONS_FORCE_HTTPS": { - "type": "string", - "description": "Defines if HTTPS is enforced for all requests.", - "x-example": "enabled" - }, - "_APP_DOMAINS_NAMESERVERS": { - "type": "string", - "description": "Comma-separated list of nameservers.", - "x-example": "ns1.example.com,ns2.example.com" - }, - "_APP_DB_ADAPTER": { - "type": "string", - "description": "Database adapter in use.", - "x-example": "mysql" - }, - "supportForRelationships": { - "type": "boolean", - "description": "Whether the database adapter supports relationships.", - "x-example": true - }, - "supportForOperators": { - "type": "boolean", - "description": "Whether the database adapter supports operators.", - "x-example": true - }, - "supportForSpatials": { - "type": "boolean", - "description": "Whether the database adapter supports spatial attributes.", - "x-example": true - }, - "supportForSpatialIndexNull": { - "type": "boolean", - "description": "Whether the database adapter supports spatial indexes on nullable columns.", - "x-example": false - }, - "supportForFulltextWildcard": { - "type": "boolean", - "description": "Whether the database adapter supports fulltext wildcard search.", - "x-example": true - }, - "supportForMultipleFulltextIndexes": { - "type": "boolean", - "description": "Whether the database adapter supports multiple fulltext indexes per collection.", - "x-example": true - }, - "supportForAttributeResizing": { - "type": "boolean", - "description": "Whether the database adapter supports resizing attributes.", - "x-example": true - }, - "supportForSchemas": { - "type": "boolean", - "description": "Whether the database adapter supports fixed schemas with row width limits.", - "x-example": true - }, - "maxIndexLength": { - "type": "integer", - "description": "Maximum index length supported by the database adapter.", - "x-example": 768, - "format": "int32" - }, - "supportForIntegerIds": { - "type": "boolean", - "description": "Whether the database adapter uses integer sequence IDs.", - "x-example": true - } - }, - "required": [ - "_APP_DOMAIN_TARGET_CNAME", - "_APP_DOMAIN_TARGET_A", - "_APP_COMPUTE_BUILD_TIMEOUT", - "_APP_DOMAIN_TARGET_AAAA", - "_APP_DOMAIN_TARGET_CAA", - "_APP_STORAGE_LIMIT", - "_APP_COMPUTE_SIZE_LIMIT", - "_APP_USAGE_STATS", - "_APP_VCS_ENABLED", - "_APP_DOMAIN_ENABLED", - "_APP_ASSISTANT_ENABLED", - "_APP_DOMAIN_SITES", - "_APP_DOMAIN_FUNCTIONS", - "_APP_OPTIONS_FORCE_HTTPS", - "_APP_DOMAINS_NAMESERVERS", - "_APP_DB_ADAPTER", - "supportForRelationships", - "supportForOperators", - "supportForSpatials", - "supportForSpatialIndexNull", - "supportForFulltextWildcard", - "supportForMultipleFulltextIndexes", - "supportForAttributeResizing", - "supportForSchemas", - "maxIndexLength", - "supportForIntegerIds" - ], - "example": { - "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", - "_APP_DOMAIN_TARGET_A": "127.0.0.1", - "_APP_COMPUTE_BUILD_TIMEOUT": 900, - "_APP_DOMAIN_TARGET_AAAA": "::1", - "_APP_DOMAIN_TARGET_CAA": "digicert.com", - "_APP_STORAGE_LIMIT": "30000000", - "_APP_COMPUTE_SIZE_LIMIT": "30000000", - "_APP_USAGE_STATS": "enabled", - "_APP_VCS_ENABLED": true, - "_APP_DOMAIN_ENABLED": true, - "_APP_ASSISTANT_ENABLED": true, - "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", - "_APP_DOMAIN_FUNCTIONS": "functions.localhost", - "_APP_OPTIONS_FORCE_HTTPS": "enabled", - "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", - "_APP_DB_ADAPTER": "mysql", - "supportForRelationships": true, - "supportForOperators": true, - "supportForSpatials": true, - "supportForSpatialIndexNull": false, - "supportForFulltextWildcard": true, - "supportForMultipleFulltextIndexes": true, - "supportForAttributeResizing": true, - "supportForSchemas": true, - "maxIndexLength": 768, - "supportForIntegerIds": true - } - }, - "consoleOAuth2ProviderParameter": { - "description": "Console OAuth2 Provider Parameter", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", - "x-example": "clientId" - }, - "name": { - "type": "string", - "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", - "x-example": "Client ID or App ID" - }, - "example": { - "type": "string", - "description": "Example value for this parameter.", - "x-example": "e4d87900000000540733" - }, - "hint": { - "type": "string", - "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", - "x-example": "Example of wrong value: 370006" - } - }, - "required": [ - "$id", - "name", - "example", - "hint" - ], - "example": { - "$id": "clientId", - "name": "Client ID or App ID", - "example": "e4d87900000000540733", - "hint": "Example of wrong value: 370006" - } - }, - "consoleOAuth2Provider": { - "description": "Console OAuth2 Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "parameters": { - "type": "array", - "description": "List of parameters required to configure this OAuth2 provider.", - "items": { - "type": "object", - "$ref": "#\/definitions\/consoleOAuth2ProviderParameter" - }, - "x-example": "" - } - }, - "required": [ - "$id", - "parameters" - ], - "example": { - "$id": "github", - "parameters": "" - } - }, - "consoleOAuth2ProviderList": { - "description": "Console OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers exposed by the server.", - "x-example": 5, - "format": "int32" - }, - "oAuth2Providers": { - "type": "array", - "description": "List of OAuth2 providers, each with the parameters required to configure it.", - "items": { - "type": "object", - "$ref": "#\/definitions\/consoleOAuth2Provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "oAuth2Providers" - ], - "example": { - "total": 5, - "oAuth2Providers": "" - } - }, - "consoleKeyScope": { - "description": "Console Key Scope", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Scope ID.", - "x-example": "users.read" - }, - "description": { - "type": "string", - "description": "Scope description.", - "x-example": "Access to read your project's users" - }, - "category": { - "type": "string", - "description": "Scope category.", - "x-example": "Auth" - }, - "deprecated": { - "type": "boolean", - "description": "Scope is deprecated.", - "x-example": true - } - }, - "required": [ - "$id", - "description", - "category", - "deprecated" - ], - "example": { - "$id": "users.read", - "description": "Access to read your project's users", - "category": "Auth", - "deprecated": true - } - }, - "consoleKeyScopeList": { - "description": "Console Key Scopes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of key scopes exposed by the server.", - "x-example": 5, - "format": "int32" - }, - "scopes": { - "type": "array", - "description": "List of key scopes, each with its ID and description.", - "items": { - "type": "object", - "$ref": "#\/definitions\/consoleKeyScope" - }, - "x-example": "" - } - }, - "required": [ - "total", - "scopes" - ], - "example": { - "total": 5, - "scopes": "" - } - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": [ - "totp", - "phone", - "email", - "recoveryCode" - ], - "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true - } - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "additionalProperties": true, - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Mailgun", - "provider": "mailgun", - "enabled": true, - "type": "sms", - "credentials": { - "key": "123456789" - }, - "options": { - "from": "sender-email@mydomain" - } - } - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "x-nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "additionalProperties": true, - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "processing", - "enum": [ - "draft", - "processing", - "scheduled", - "sent", - "failed" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "topics": [ - "5e5ea5c16897e" - ], - "users": [ - "5e5ea5c16897e" - ], - "targets": [ - "5e5ea5c16897e" - ], - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "deliveredAt": "2020-10-15T06:38:00.000+00:00", - "deliveryErrors": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "deliveredTotal": 1, - "data": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - }, - "status": "processing" - } - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "events", - "emailTotal": 100, - "smsTotal": 100, - "pushTotal": 100, - "subscribe": "users" - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" - }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" - } - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "x-nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false - } - }, - "migration": { - "description": "Migration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Migration ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Migration creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Migration status ( pending, processing, failed, completed ) ", - "x-example": "pending" - }, - "stage": { - "type": "string", - "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", - "x-example": "init" - }, - "source": { - "type": "string", - "description": "A string containing the type of source of the migration.", - "x-example": "Appwrite" - }, - "destination": { - "type": "string", - "description": "A string containing the type of destination of the migration.", - "x-example": "Appwrite" - }, - "resources": { - "type": "array", - "description": "Resources to migrate.", - "items": { - "type": "string" - }, - "x-example": [ - "user" - ] - }, - "resourceId": { - "type": "string", - "description": "Id of the resource to migrate.", - "x-example": "databaseId:collectionId" - }, - "statusCounters": { - "type": "object", - "additionalProperties": true, - "description": "A group of counters that represent the total progress of the migration.", - "x-example": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}" - }, - "resourceData": { - "type": "object", - "additionalProperties": true, - "description": "An array of objects containing the report data of the resources that were migrated.", - "x-example": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]" - }, - "errors": { - "type": "array", - "description": "All errors that occurred during the migration process.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Migration options used during the migration process.", - "x-example": "{\"bucketId\": \"exports\", \"notify\": false}" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "stage", - "source", - "destination", - "resources", - "resourceId", - "statusCounters", - "resourceData", - "errors", - "options" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "stage": "init", - "source": "Appwrite", - "destination": "Appwrite", - "resources": [ - "user" - ], - "resourceId": "databaseId:collectionId", - "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", - "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", - "errors": [], - "options": "{\"bucketId\": \"exports\", \"notify\": false}" - } - }, - "migrationReport": { - "description": "Migration Report", - "type": "object", - "properties": { - "user": { - "type": "integer", - "description": "Number of users to be migrated.", - "x-example": 20, - "format": "int32" - }, - "team": { - "type": "integer", - "description": "Number of teams to be migrated.", - "x-example": 20, - "format": "int32" - }, - "database": { - "type": "integer", - "description": "Number of databases to be migrated.", - "x-example": 20, - "format": "int32" - }, - "row": { - "type": "integer", - "description": "Number of rows to be migrated.", - "x-example": 20, - "format": "int32" - }, - "file": { - "type": "integer", - "description": "Number of files to be migrated.", - "x-example": 20, - "format": "int32" - }, - "bucket": { - "type": "integer", - "description": "Number of buckets to be migrated.", - "x-example": 20, - "format": "int32" - }, - "function": { - "type": "integer", - "description": "Number of functions to be migrated.", - "x-example": 20, - "format": "int32" - }, - "site": { - "type": "integer", - "description": "Number of sites to be migrated.", - "x-example": 5, - "format": "int32" - }, - "provider": { - "type": "integer", - "description": "Number of providers to be migrated.", - "x-example": 5, - "format": "int32" - }, - "topic": { - "type": "integer", - "description": "Number of topics to be migrated.", - "x-example": 10, - "format": "int32" - }, - "subscriber": { - "type": "integer", - "description": "Number of subscribers to be migrated.", - "x-example": 100, - "format": "int32" - }, - "message": { - "type": "integer", - "description": "Number of messages to be migrated.", - "x-example": 50, - "format": "int32" - }, - "size": { - "type": "integer", - "description": "Size of files to be migrated in mb.", - "x-example": 30000, - "format": "int32" - }, - "version": { - "type": "string", - "description": "Version of the Appwrite instance to be migrated.", - "x-example": "1.4.0" - } - }, - "required": [ - "user", - "team", - "database", - "row", - "file", - "bucket", - "function", - "site", - "provider", - "topic", - "subscriber", - "message", - "size", - "version" - ], - "example": { - "user": 20, - "team": 20, - "database": 20, - "row": 20, - "file": 20, - "bucket": 20, - "function": 20, - "site": 5, - "provider": 5, - "topic": 10, - "subscriber": 100, - "message": 50, - "size": 30000, - "version": "1.4.0" - } - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https:\/\/appwrite.io\/docs" - } -} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json deleted file mode 100644 index 3d066900c9..0000000000 --- a/app/config/specs/swagger2-latest-server.json +++ /dev/null @@ -1,68959 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.9.3", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", - "termsOfService": "https:\/\/appwrite.io\/policy\/terms", - "contact": { - "name": "Appwrite Team", - "url": "https:\/\/appwrite.io\/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" - } - }, - "host": "cloud.appwrite.io", - "x-host-docs": "<REGION>.cloud.appwrite.io", - "basePath": "\/v1", - "schemes": [ - "https" - ], - "consumes": [ - "application\/json", - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "securityDefinitions": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_PROJECT_ID>" - } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_API_KEY>" - } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { - "demo": "<YOUR_JWT>" - } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { - "demo": "en" - } - }, - "Session": { - "type": "apiKey", - "name": "X-Appwrite-Session", - "description": "The user session to authenticate with", - "in": "header" - }, - "ForwardedUserAgent": { - "type": "apiKey", - "name": "X-Forwarded-User-Agent", - "description": "The user agent string of the client that made the request", - "in": "header" - }, - "ImpersonateUserId": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Id", - "description": "Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserEmail": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Email", - "description": "Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - }, - "ImpersonateUserPhone": { - "type": "apiKey", - "name": "X-Appwrite-Impersonate-User-Phone", - "description": "Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.", - "in": "header" - } - }, - "paths": { - "\/account": { - "get": { - "summary": "Get account", - "operationId": "accountGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the currently logged in user.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "account", - "weight": 9, - "cookies": false, - "type": "", - "demo": "account\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create account", - "operationId": "accountCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "account", - "weight": 8, - "cookies": false, - "type": "", - "demo": "account\/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "account", - "weight": 34, - "cookies": false, - "type": "", - "demo": "account\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/identities": { - "get": { - "summary": "List identities", - "operationId": "accountListIdentities", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of identities for the currently logged in user.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#\/definitions\/identityList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/account\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#\/definitions\/jwt" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "tokens", - "weight": 29, - "cookies": false, - "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } - ] - } - }, - "\/account\/logs": { - "get": { - "summary": "List logs", - "operationId": "accountListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 31, - "cookies": false, - "type": "", - "demo": "account\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Enable or disable MFA on an account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMFA", - "group": "mfa", - "weight": 166, - "cookies": false, - "type": "", - "demo": "account\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - ] - } - }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "responses": { - "200": { - "description": "MFAType", - "schema": { - "$ref": "#\/definitions\/mfaType" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", - "weight": 168, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", - "weight": 169, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - ] - }, - "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete an authenticator for a user by ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 170, - "cookies": false, - "type": "", - "demo": "account\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/account\/mfa\/challenges": { - "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Challenge", - "schema": { - "$ref": "#\/definitions\/mfaChallenge" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", - "weight": 174, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "default": null, - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [] - } - }, - "required": [ - "factor" - ] - } - } - ] - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", - "weight": 175, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } - }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "default": null, - "x-example": "<CHALLENGE_ID>" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "challengeId", - "otp" - ] - } - } - ] - } - }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#\/definitions\/mfaFactors" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 167, - "cookies": false, - "type": "", - "demo": "account\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 173, - "cookies": false, - "type": "", - "demo": "account\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 171, - "cookies": false, - "type": "", - "demo": "account\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 172, - "cookies": false, - "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "weight": 32, - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "account", - "weight": 33, - "cookies": false, - "type": "", - "demo": "account\/update-password.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": null - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - ] - } - }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "account", - "weight": 35, - "cookies": false, - "type": "", - "demo": "account\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - ] - } - }, - "\/account\/prefs": { - "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the preferences as a key-value object for the currently logged in user.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "account", - "weight": 30, - "cookies": false, - "type": "", - "demo": "account\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "account", - "weight": 36, - "cookies": false, - "type": "", - "demo": "account\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRecovery", - "group": "recovery", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - ] - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", - "weight": 39, - "cookies": false, - "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "<SECRET>" - }, - "password": { - "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "default": null, - "x-example": null - } - }, - "required": [ - "userId", - "secret", - "password" - ] - } - } - ] - } - }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#\/definitions\/sessionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 11, - "cookies": false, - "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 12, - "cookies": false, - "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", - "weight": 17, - "cookies": false, - "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", - "weight": 16, - "cookies": false, - "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } - ] - } - }, - "\/account\/sessions\/magic-url": { - "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", - "weight": 26, - "cookies": false, - "type": "", - "demo": "account\/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "weight": 27, - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 18, - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/sessions\/{sessionId}": { - "get": { - "summary": "Get session", - "operationId": "accountGetSession", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSession", - "group": "sessions", - "weight": 13, - "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSession", - "group": "sessions", - "weight": 15, - "cookies": false, - "type": "", - "demo": "account\/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "account" - ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 14, - "cookies": false, - "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "account", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/tokens\/email": { - "post": { - "summary": "Create email token (OTP)", - "operationId": "accountCreateEmailToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailToken", - "group": "tokens", - "weight": 25, - "cookies": false, - "type": "", - "demo": "account\/create-email-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - ] - } - }, - "\/account\/tokens\/magic-url": { - "post": { - "summary": "Create magic URL token", - "operationId": "accountCreateMagicURLToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMagicURLToken", - "group": "tokens", - "weight": 24, - "cookies": false, - "type": "", - "demo": "account\/create-magic-url-token.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "phrase": { - "type": "boolean", - "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", - "default": false, - "x-example": false - } - }, - "required": [ - "userId", - "email" - ] - } - } - ] - } - }, - "\/account\/tokens\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 token", - "operationId": "accountCreateOAuth2Token", - "consumes": [], - "produces": [ - "text\/html" - ], - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "301": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Token", - "group": "tokens", - "weight": 23, - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-token.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/account\/tokens\/phone": { - "post": { - "summary": "Create phone token", - "operationId": "accountCreatePhoneToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneToken", - "group": "tokens", - "weight": 28, - "cookies": false, - "type": "", - "demo": "account\/create-phone-token.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},phone:{param-phone}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "default": null, - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "userId", - "phone" - ] - } - } - ] - } - }, - "\/account\/verifications\/email": { - "post": { - "summary": "Create email verification", - "operationId": "accountCreateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailVerification", - "group": "verification", - "weight": 40, - "cookies": false, - "type": "", - "demo": "account\/create-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", - "methods": [ - { - "name": "createEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-email-verification.md", - "public": true - }, - { - "name": "createVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "url" - ], - "required": [ - "url" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "demo": "account\/create-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createEmailVerification" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url" - } - }, - "required": [ - "url" - ] - } - } - ] - }, - "put": { - "summary": "Update email verification (confirmation)", - "operationId": "accountUpdateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "verification", - "weight": 41, - "cookies": false, - "type": "", - "demo": "account\/update-email-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", - "methods": [ - { - "name": "updateEmailVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-email-verification.md", - "public": true - }, - { - "name": "updateVerification", - "namespace": "account", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "userId", - "secret" - ], - "required": [ - "userId", - "secret" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/token" - } - ], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "demo": "account\/update-verification.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateEmailVerification" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/account\/verifications\/phone": { - "post": { - "summary": "Create phone verification", - "operationId": "accountCreatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPhoneVerification", - "group": "verification", - "weight": 42, - "cookies": false, - "type": "", - "demo": "account\/create-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": [ - "url:{url},userId:{userId}", - "url:{url},ip:{ip}" - ], - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - }, - "put": { - "summary": "Update phone verification (confirmation)", - "operationId": "accountUpdatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "account" - ], - "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "verification", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account\/update-phone-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "userId:{param-userId}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBrowser", - "group": null, - "weight": 177, - "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCreditCard", - "group": null, - "weight": 176, - "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", - "required": true, - "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFavicon", - "group": null, - "weight": 180, - "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - } - ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFlag", - "group": null, - "weight": 178, - "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - } - ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getImage", - "group": null, - "weight": 179, - "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "\/avatars\/initials": { - "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getInitials", - "group": null, - "weight": 182, - "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "", - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - } - ] - } - }, - "\/avatars\/qr": { - "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQR", - "group": null, - "weight": 181, - "cookies": false, - "type": "location", - "demo": "avatars\/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "<TEXT>", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "\/avatars\/screenshots": { - "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", - "consumes": [], - "produces": [ - "image\/png" - ], - "tags": [ - "avatars" - ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getScreenshot", - "group": null, - "weight": 183, - "cookies": false, - "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to capture.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "type": "object", - "default": [], - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", - "in": "query" - }, - { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "1920", - "default": 1280, - "in": "query" - }, - { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "1080", - "default": 720, - "in": "query" - }, - { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": "2", - "default": 1, - "in": "query" - }, - { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "light", - "in": "query" - }, - { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "", - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "type": "boolean", - "x-example": "true", - "default": false, - "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "en-US", - "default": "", - "in": "query" - }, - { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", - "required": false, - "type": "string", - "x-example": "america\/new_york", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ], - "x-enum-name": null, - "x-enum-keys": [], - "default": "", - "in": "query" - }, - { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0, - "in": "query" - }, - { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0, - "in": "query" - }, - { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, - "type": "number", - "format": "float", - "x-example": "100", - "default": 0, - "in": "query" - }, - { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, - "type": "boolean", - "x-example": "true", - "default": false, - "in": "query" - }, - { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [], - "in": "query" - }, - { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0, - "in": "query" - }, - { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1, - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "", - "in": "query" - } - ] - } - }, - "\/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "list", - "group": "databases", - "weight": 191, - "cookies": false, - "type": "", - "demo": "databases\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - }, - "methods": [ - { - "name": "list", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search", - "total" - ], - "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.", - "demo": "databases\/list.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "databasesCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "create", - "group": "databases", - "weight": 187, - "cookies": false, - "type": "", - "demo": "databases\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - }, - "methods": [ - { - "name": "create", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n", - "demo": "databases\/create.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 259, - "cookies": false, - "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 255, - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 256, - "cookies": false, - "type": "", - "demo": "databases\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 257, - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 258, - "cookies": false, - "type": "", - "demo": "databases\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 260, - "cookies": false, - "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "get", - "group": "databases", - "weight": 188, - "cookies": false, - "type": "", - "demo": "databases\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - }, - "methods": [ - { - "name": "get", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/get.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "update", - "group": "databases", - "weight": 189, - "cookies": false, - "type": "", - "demo": "databases\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - }, - "methods": [ - { - "name": "update", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID.", - "demo": "databases\/update.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "delete", - "group": "databases", - "weight": 190, - "cookies": false, - "type": "", - "demo": "databases\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - }, - "methods": [ - { - "name": "delete", - "namespace": "databases", - "desc": "", - "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.", - "demo": "databases\/delete.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "schema": { - "$ref": "#\/definitions\/collectionList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 199, - "cookies": false, - "type": "", - "demo": "databases\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTables" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collections", - "operationId": "databasesCreateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 195, - "cookies": false, - "type": "", - "demo": "databases\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 196, - "cookies": false, - "type": "", - "demo": "databases\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 197, - "cookies": false, - "type": "", - "demo": "databases\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 198, - "cookies": false, - "type": "", - "demo": "databases\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List attributes in the collection.", - "responses": { - "200": { - "description": "Attributes List", - "schema": { - "$ref": "#\/definitions\/attributeList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listAttributes", - "group": "attributes", - "weight": 216, - "cookies": false, - "type": "", - "demo": "databases\/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listColumns" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a boolean attribute.\n", - "responses": { - "202": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#\/definitions\/attributeBoolean" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createBooleanAttribute", - "group": "attributes", - "weight": 217, - "cookies": false, - "type": "", - "demo": "databases\/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createBooleanColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeBoolean", - "schema": { - "$ref": "#\/definitions\/attributeBoolean" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateBooleanAttribute", - "group": "attributes", - "weight": 218, - "cookies": false, - "type": "", - "demo": "databases\/update-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateBooleanColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#\/definitions\/attributeDatetime" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDatetimeAttribute", - "group": "attributes", - "weight": 219, - "cookies": false, - "type": "", - "demo": "databases\/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createDatetimeColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { - "patch": { - "summary": "Update datetime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "schema": { - "$ref": "#\/definitions\/attributeDatetime" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "group": "attributes", - "weight": 220, - "cookies": false, - "type": "", - "demo": "databases\/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateDatetimeColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { - "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create an email attribute.\n", - "responses": { - "202": { - "description": "AttributeEmail", - "schema": { - "$ref": "#\/definitions\/attributeEmail" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEmailAttribute", - "group": "attributes", - "weight": 221, - "cookies": false, - "type": "", - "demo": "databases\/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEmailColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEmail", - "schema": { - "$ref": "#\/definitions\/attributeEmail" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEmailAttribute", - "group": "attributes", - "weight": 222, - "cookies": false, - "type": "", - "demo": "databases\/update-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEmailColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", - "responses": { - "202": { - "description": "AttributeEnum", - "schema": { - "$ref": "#\/definitions\/attributeEnum" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEnumAttribute", - "group": "attributes", - "weight": 223, - "cookies": false, - "type": "", - "demo": "databases\/create-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEnumColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeEnum", - "schema": { - "$ref": "#\/definitions\/attributeEnum" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateEnumAttribute", - "group": "attributes", - "weight": 224, - "cookies": false, - "type": "", - "demo": "databases\/update-enum-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEnumColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeFloat", - "schema": { - "$ref": "#\/definitions\/attributeFloat" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFloatAttribute", - "group": "attributes", - "weight": 225, - "cookies": false, - "type": "", - "demo": "databases\/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createFloatColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeFloat", - "schema": { - "$ref": "#\/definitions\/attributeFloat" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFloatAttribute", - "group": "attributes", - "weight": 226, - "cookies": false, - "type": "", - "demo": "databases\/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateFloatColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeInteger", - "schema": { - "$ref": "#\/definitions\/attributeInteger" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIntegerAttribute", - "group": "attributes", - "weight": 227, - "cookies": false, - "type": "", - "demo": "databases\/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIntegerColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeInteger", - "schema": { - "$ref": "#\/definitions\/attributeInteger" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIntegerAttribute", - "group": "attributes", - "weight": 228, - "cookies": false, - "type": "", - "demo": "databases\/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIntegerColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create IP address attribute.\n", - "responses": { - "202": { - "description": "AttributeIP", - "schema": { - "$ref": "#\/definitions\/attributeIp" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIpAttribute", - "group": "attributes", - "weight": 229, - "cookies": false, - "type": "", - "demo": "databases\/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIpColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { - "patch": { - "summary": "Update IP address attribute", - "operationId": "databasesUpdateIpAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeIP", - "schema": { - "$ref": "#\/definitions\/attributeIp" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateIpAttribute", - "group": "attributes", - "weight": 230, - "cookies": false, - "type": "", - "demo": "databases\/update-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIpColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { - "post": { - "summary": "Create line attribute", - "operationId": "databasesCreateLineAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a geometric line attribute.", - "responses": { - "202": { - "description": "AttributeLine", - "schema": { - "$ref": "#\/definitions\/attributeLine" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createLineAttribute", - "group": "attributes", - "weight": 231, - "cookies": false, - "type": "", - "demo": "databases\/create-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createLineColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { - "patch": { - "summary": "Update line attribute", - "operationId": "databasesUpdateLineAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeLine", - "schema": { - "$ref": "#\/definitions\/attributeLine" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateLineAttribute", - "group": "attributes", - "weight": 232, - "cookies": false, - "type": "", - "demo": "databases\/update-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateLineColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { - "post": { - "summary": "Create longtext attribute", - "operationId": "databasesCreateLongtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a longtext attribute.\n", - "responses": { - "202": { - "description": "AttributeLongtext", - "schema": { - "$ref": "#\/definitions\/attributeLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextAttribute", - "group": "attributes", - "weight": 249, - "cookies": false, - "type": "", - "demo": "databases\/create-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { - "patch": { - "summary": "Update longtext attribute", - "operationId": "databasesUpdateLongtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeLongtext", - "schema": { - "$ref": "#\/definitions\/attributeLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextAttribute", - "group": "attributes", - "weight": 250, - "cookies": false, - "type": "", - "demo": "databases\/update-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { - "post": { - "summary": "Create mediumtext attribute", - "operationId": "databasesCreateMediumtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a mediumtext attribute.\n", - "responses": { - "202": { - "description": "AttributeMediumtext", - "schema": { - "$ref": "#\/definitions\/attributeMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextAttribute", - "group": "attributes", - "weight": 247, - "cookies": false, - "type": "", - "demo": "databases\/create-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext attribute", - "operationId": "databasesUpdateMediumtextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeMediumtext", - "schema": { - "$ref": "#\/definitions\/attributeMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextAttribute", - "group": "attributes", - "weight": 248, - "cookies": false, - "type": "", - "demo": "databases\/update-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { - "post": { - "summary": "Create point attribute", - "operationId": "databasesCreatePointAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a geometric point attribute.", - "responses": { - "202": { - "description": "AttributePoint", - "schema": { - "$ref": "#\/definitions\/attributePoint" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPointAttribute", - "group": "attributes", - "weight": 233, - "cookies": false, - "type": "", - "demo": "databases\/create-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPointColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { - "patch": { - "summary": "Update point attribute", - "operationId": "databasesUpdatePointAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePoint", - "schema": { - "$ref": "#\/definitions\/attributePoint" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePointAttribute", - "group": "attributes", - "weight": 234, - "cookies": false, - "type": "", - "demo": "databases\/update-point-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePointColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { - "post": { - "summary": "Create polygon attribute", - "operationId": "databasesCreatePolygonAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a geometric polygon attribute.", - "responses": { - "202": { - "description": "AttributePolygon", - "schema": { - "$ref": "#\/definitions\/attributePolygon" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createPolygonAttribute", - "group": "attributes", - "weight": 235, - "cookies": false, - "type": "", - "demo": "databases\/create-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPolygonColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { - "patch": { - "summary": "Update polygon attribute", - "operationId": "databasesUpdatePolygonAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributePolygon", - "schema": { - "$ref": "#\/definitions\/attributePolygon" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updatePolygonAttribute", - "group": "attributes", - "weight": 236, - "cookies": false, - "type": "", - "demo": "databases\/update-polygon-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePolygonColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { - "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "202": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#\/definitions\/attributeRelationship" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createRelationshipAttribute", - "group": "attributes", - "weight": 237, - "cookies": false, - "type": "", - "demo": "databases\/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRelationshipColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID.", - "default": null, - "x-example": "<RELATED_COLLECTION_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedCollectionId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", - "responses": { - "200": { - "description": "AttributeRelationship", - "schema": { - "$ref": "#\/definitions\/attributeRelationship" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateRelationshipAttribute", - "group": "attributes", - "weight": 238, - "cookies": false, - "type": "", - "demo": "databases\/update-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRelationshipColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a string attribute.\n", - "responses": { - "202": { - "description": "AttributeString", - "schema": { - "$ref": "#\/definitions\/attributeString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringAttribute", - "group": "attributes", - "weight": 239, - "cookies": false, - "type": "", - "demo": "databases\/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createStringColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeString", - "schema": { - "$ref": "#\/definitions\/attributeString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringAttribute", - "group": "attributes", - "weight": 240, - "cookies": false, - "type": "", - "demo": "databases\/update-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateStringColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { - "post": { - "summary": "Create text attribute", - "operationId": "databasesCreateTextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a text attribute.\n", - "responses": { - "202": { - "description": "AttributeText", - "schema": { - "$ref": "#\/definitions\/attributeText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextAttribute", - "group": "attributes", - "weight": 245, - "cookies": false, - "type": "", - "demo": "databases\/create-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { - "patch": { - "summary": "Update text attribute", - "operationId": "databasesUpdateTextAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeText", - "schema": { - "$ref": "#\/definitions\/attributeText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextAttribute", - "group": "attributes", - "weight": 246, - "cookies": false, - "type": "", - "demo": "databases\/update-text-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a URL attribute.\n", - "responses": { - "202": { - "description": "AttributeURL", - "schema": { - "$ref": "#\/definitions\/attributeUrl" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createUrlAttribute", - "group": "attributes", - "weight": 241, - "cookies": false, - "type": "", - "demo": "databases\/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createUrlColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeURL", - "schema": { - "$ref": "#\/definitions\/attributeUrl" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateUrlAttribute", - "group": "attributes", - "weight": 242, - "cookies": false, - "type": "", - "demo": "databases\/update-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateUrlColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { - "post": { - "summary": "Create varchar attribute", - "operationId": "databasesCreateVarcharAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a varchar attribute.\n", - "responses": { - "202": { - "description": "AttributeVarchar", - "schema": { - "$ref": "#\/definitions\/attributeVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharAttribute", - "group": "attributes", - "weight": 243, - "cookies": false, - "type": "", - "demo": "databases\/create-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { - "patch": { - "summary": "Update varchar attribute", - "operationId": "databasesUpdateVarcharAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", - "responses": { - "200": { - "description": "AttributeVarchar", - "schema": { - "$ref": "#\/definitions\/attributeVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharAttribute", - "group": "attributes", - "weight": 244, - "cookies": false, - "type": "", - "demo": "databases\/update-varchar-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar attribute.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get attribute by ID.", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/attributeBoolean" - }, - { - "$ref": "#\/definitions\/attributeInteger" - }, - { - "$ref": "#\/definitions\/attributeFloat" - }, - { - "$ref": "#\/definitions\/attributeEmail" - }, - { - "$ref": "#\/definitions\/attributeEnum" - }, - { - "$ref": "#\/definitions\/attributeUrl" - }, - { - "$ref": "#\/definitions\/attributeIp" - }, - { - "$ref": "#\/definitions\/attributeDatetime" - }, - { - "$ref": "#\/definitions\/attributeRelationship" - }, - { - "$ref": "#\/definitions\/attributeString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/attributeBoolean", - "integer": "#\/definitions\/attributeInteger", - "double": "#\/definitions\/attributeFloat", - "string": "#\/definitions\/attributeString", - "datetime": "#\/definitions\/attributeDatetime", - "relationship": "#\/definitions\/attributeRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/attributeBoolean": { - "type": "boolean" - }, - "#\/definitions\/attributeInteger": { - "type": "integer" - }, - "#\/definitions\/attributeFloat": { - "type": "double" - }, - "#\/definitions\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/attributeDatetime": { - "type": "datetime" - }, - "#\/definitions\/attributeRelationship": { - "type": "relationship" - }, - "#\/definitions\/attributeString": { - "type": "string" - } - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getAttribute", - "group": "attributes", - "weight": 214, - "cookies": false, - "type": "", - "demo": "databases\/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteAttribute", - "group": "attributes", - "weight": 215, - "cookies": false, - "type": "", - "demo": "databases\/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 210, - "cookies": false, - "type": "", - "demo": "databases\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 202, - "cookies": false, - "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - }, - { - "name": "createDocuments", - "namespace": "databases", - "desc": "Create documents", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRows" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "put": { - "summary": "Upsert documents", - "operationId": "databasesUpsertDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 207, - "cookies": false, - "type": "", - "demo": "databases\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - }, - "methods": [ - { - "name": "upsertDocuments", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "demo": "databases\/upsert-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - } - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "documents" - ] - } - } - ] - }, - "patch": { - "summary": "Update documents", - "operationId": "databasesUpdateDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 205, - "cookies": false, - "type": "", - "demo": "databases\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRows" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete documents", - "operationId": "databasesDeleteDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 209, - "cookies": false, - "type": "", - "demo": "databases\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRows" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 203, - "cookies": false, - "type": "", - "demo": "databases\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 206, - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 204, - "cookies": false, - "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 208, - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Decrement a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 213, - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Increment a specific attribute of a document by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 212, - "cookies": false, - "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#\/definitions\/indexList" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 254, - "cookies": false, - "type": "", - "demo": "databases\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listIndexes" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 251, - "cookies": false, - "type": "", - "demo": "databases\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIndex" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "DatabasesIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get an index by its unique ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 252, - "cookies": false, - "type": "", - "demo": "databases\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getIndex" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "databases" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 253, - "cookies": false, - "type": "", - "demo": "databases\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteIndex" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/documentsdb": { - "get": { - "summary": "List databases", - "operationId": "documentsDBList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "documentsdb", - "weight": 338, - "cookies": false, - "type": "", - "demo": "documentsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "documentsDBCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "documentsdb", - "weight": 334, - "cookies": false, - "type": "", - "demo": "documentsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 366, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 362, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 363, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 364, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 365, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 367, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "documentsDBGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "documentsdb", - "weight": 335, - "cookies": false, - "type": "", - "demo": "documentsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "documentsDBUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "documentsdb", - "weight": 336, - "cookies": false, - "type": "", - "demo": "documentsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "documentsDBDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "documentsdb", - "weight": 337, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "documentsDBListCollections", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Collections List", - "schema": { - "$ref": "#\/definitions\/collectionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 345, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "documentsDBCreateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 341, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "collectionId", - "name" - ] - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "documentsDBGetCollection", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 342, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "documentsDBUpdateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { - "$ref": "#\/definitions\/collection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 343, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "documentsDBDeleteCollection", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 344, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 359, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 351, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "put": { - "summary": "Upsert documents", - "operationId": "documentsDBUpsertDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 356, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "documentsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - ] - }, - "patch": { - "summary": "Update documents", - "operationId": "documentsDBUpdateDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 354, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete documents", - "operationId": "documentsDBDeleteDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 358, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 352, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 355, - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 353, - "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 357, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 361, - "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 360, - "cookies": false, - "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "documentsDBListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#\/definitions\/indexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 350, - "cookies": false, - "type": "", - "demo": "documentsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "documentsDBCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 347, - "cookies": false, - "type": "", - "demo": "documentsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "DocumentsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "documentsDBGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "documentsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 348, - "cookies": false, - "type": "", - "demo": "documentsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "documentsDBDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "documentsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 349, - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/functions": { - "get": { - "summary": "List functions", - "operationId": "functionsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "schema": { - "$ref": "#\/definitions\/functionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "functions", - "weight": 422, - "cookies": false, - "type": "", - "demo": "functions\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create function", - "operationId": "functionsCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", - "responses": { - "201": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "functions", - "weight": 419, - "cookies": false, - "type": "", - "demo": "functions\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "functionId": { - "type": "string", - "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<FUNCTION_ID>" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "default": 15, - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "functionId", - "name", - "runtime" - ] - } - } - ] - } - }, - "\/functions\/runtimes": { - "get": { - "summary": "List runtimes", - "operationId": "functionsListRuntimes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all runtimes that are currently active on your instance.", - "responses": { - "200": { - "description": "Runtimes List", - "schema": { - "$ref": "#\/definitions\/runtimeList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRuntimes", - "group": "runtimes", - "weight": 424, - "cookies": false, - "type": "", - "demo": "functions\/list-runtimes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "functionsListSpecifications", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "List allowed function specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "schema": { - "$ref": "#\/definitions\/specificationList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "runtimes", - "weight": 425, - "cookies": false, - "type": "", - "demo": "functions\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/{functionId}": { - "get": { - "summary": "Get function", - "operationId": "functionsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "functions", - "weight": 420, - "cookies": false, - "type": "", - "demo": "functions\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update function", - "operationId": "functionsUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Update function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "functions", - "weight": 421, - "cookies": false, - "type": "", - "demo": "functions\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": "", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "execute": { - "type": "array", - "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1, - "format": "int32" - }, - "enabled": { - "type": "boolean", - "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "default": null, - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the function deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete function", - "operationId": "functionsDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a function by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "functions", - "weight": 423, - "cookies": false, - "type": "", - "demo": "functions\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployment": { - "patch": { - "summary": "Update function's deployment", - "operationId": "functionsUpdateFunctionDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", - "responses": { - "200": { - "description": "Function", - "schema": { - "$ref": "#\/definitions\/function" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFunctionDeployment", - "group": "functions", - "weight": 428, - "cookies": false, - "type": "", - "demo": "functions\/update-function-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "functionsListDeployments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { - "$ref": "#\/definitions\/deploymentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 429, - "cookies": false, - "type": "", - "demo": "functions\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "functionsCreateDeployment", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 426, - "cookies": false, - "type": "upload", - "demo": "functions\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "entrypoint", - "description": "Entrypoint File.", - "required": false, - "type": "string", - "x-example": "<ENTRYPOINT>", - "in": "formData" - }, - { - "name": "commands", - "description": "Build Commands.", - "required": false, - "type": "string", - "x-example": "<COMMANDS>", - "in": "formData" - }, - { - "name": "code", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "activate", - "description": "Automatically activate the deployment when it is finished building.", - "required": true, - "type": "boolean", - "x-example": false, - "in": "formData" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "functionsCreateDuplicateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 434, - "cookies": false, - "type": "", - "demo": "functions\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - }, - "buildId": { - "type": "string", - "description": "Build unique ID.", - "default": "", - "x-example": "<BUILD_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "functionsCreateTemplateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 431, - "cookies": false, - "type": "", - "demo": "functions\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "default": null, - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "default": null, - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "default": null, - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "default": null, - "x-example": "commit", - "enum": [ - "commit", - "branch", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "functionsCreateVcsDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 432, - "cookies": false, - "type": "", - "demo": "functions\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "default": null, - "x-example": "branch", - "enum": [ - "branch", - "commit" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "functionsGetDeployment", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 427, - "cookies": false, - "type": "", - "demo": "functions\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "functionsDeleteDeployment", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a code deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 430, - "cookies": false, - "type": "", - "demo": "functions\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "functionsGetDeploymentDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "functions" - ], - "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 433, - "cookies": false, - "type": "location", - "demo": "functions\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source", - "in": "query" - } - ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "functionsUpdateDeploymentStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 435, - "cookies": false, - "type": "", - "demo": "functions\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/executions": { - "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#\/definitions\/executionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listExecutions", - "group": "executions", - "weight": 438, - "cookies": false, - "type": "", - "demo": "functions\/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "consumes": [ - "application\/json" - ], - "produces": [ - "multipart\/form-data" - ], - "tags": [ - "functions" - ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createExecution", - "group": "executions", - "weight": 436, - "cookies": false, - "type": "", - "demo": "functions\/create-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "<BODY>" - }, - "async": { - "type": "boolean", - "description": "Execute code in the background. Default value is false.", - "default": false, - "x-example": false - }, - "path": { - "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "default": "\/", - "x-example": "<PATH>" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "default": "POST", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "default": null, - "x-example": "<SCHEDULED_AT>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getExecution", - "group": "executions", - "weight": 437, - "cookies": false, - "type": "", - "demo": "functions\/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a function execution by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteExecution", - "group": "executions", - "weight": 439, - "cookies": false, - "type": "", - "demo": "functions\/delete-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "<EXECUTION_ID>", - "in": "path" - } - ] - } - }, - "\/functions\/{functionId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a list of all variables of a specific function.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#\/definitions\/variableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 444, - "cookies": false, - "type": "", - "demo": "functions\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 442, - "cookies": false, - "type": "", - "demo": "functions\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - ] - } - }, - "\/functions\/{functionId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 443, - "cookies": false, - "type": "", - "demo": "functions\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "functions" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 445, - "cookies": false, - "type": "", - "demo": "functions\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "functions" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 446, - "cookies": false, - "type": "", - "demo": "functions\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "type": "string", - "x-example": "<FUNCTION_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#\/definitions\/any" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "query", - "group": "graphql", - "weight": 117, - "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - ] - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "graphql" - ], - "description": "Execute a GraphQL mutation.", - "responses": { - "200": { - "description": "Any", - "schema": { - "$ref": "#\/definitions\/any" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "mutation", - "group": "graphql", - "weight": 116, - "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - ] - } - }, - "\/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite HTTP server is up and responsive.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#\/definitions\/healthStatus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "health", - "weight": 449, - "cookies": false, - "type": "", - "demo": "health\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/anti-virus": { - "get": { - "summary": "Get antivirus", - "operationId": "healthGetAntivirus", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Antivirus", - "schema": { - "$ref": "#\/definitions\/healthAntivirus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAntivirus", - "group": "health", - "weight": 458, - "cookies": false, - "type": "", - "demo": "health\/get-antivirus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/cache": { - "get": { - "summary": "Get cache", - "operationId": "healthGetCache", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "schema": { - "$ref": "#\/definitions\/healthStatusList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCache", - "group": "health", - "weight": 452, - "cookies": false, - "type": "", - "demo": "health\/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/certificate": { - "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the SSL certificate for a domain", - "responses": { - "200": { - "description": "Health Certificate", - "schema": { - "$ref": "#\/definitions\/healthCertificate" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCertificate", - "group": "health", - "weight": 455, - "cookies": false, - "type": "", - "demo": "health\/get-certificate.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "type": "string", - "in": "query" - } - ] - } - }, - "\/health\/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite database servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "schema": { - "$ref": "#\/definitions\/healthStatusList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDB", - "group": "health", - "weight": 451, - "cookies": false, - "type": "", - "demo": "health\/get-db.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", - "responses": { - "200": { - "description": "Status List", - "schema": { - "$ref": "#\/definitions\/healthStatusList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPubSub", - "group": "health", - "weight": 453, - "cookies": false, - "type": "", - "demo": "health\/get-pub-sub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/queue\/audits": { - "get": { - "summary": "Get audits queue", - "operationId": "healthGetQueueAudits", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueAudits", - "group": "queue", - "weight": 459, - "cookies": false, - "type": "", - "demo": "health\/get-queue-audits.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueBuilds", - "group": "queue", - "weight": 463, - "cookies": false, - "type": "", - "demo": "health\/get-queue-builds.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/certificates": { - "get": { - "summary": "Get certificates queue", - "operationId": "healthGetQueueCertificates", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueCertificates", - "group": "queue", - "weight": 462, - "cookies": false, - "type": "", - "demo": "health\/get-queue-certificates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDatabases", - "group": "queue", - "weight": 464, - "cookies": false, - "type": "", - "demo": "health\/get-queue-databases.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, - "type": "string", - "x-example": "<NAME>", - "default": "database_db_main", - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueDeletes", - "group": "queue", - "weight": 465, - "cookies": false, - "type": "", - "demo": "health\/get-queue-deletes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/failed\/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Returns the amount of failed jobs in a given queue.\n", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFailedJobs", - "group": "queue", - "weight": 472, - "cookies": false, - "type": "", - "demo": "health\/get-failed-jobs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "name", - "description": "The name of the queue", - "required": true, - "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueFunctions", - "group": "queue", - "weight": 469, - "cookies": false, - "type": "", - "demo": "health\/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/logs": { - "get": { - "summary": "Get logs queue", - "operationId": "healthGetQueueLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueLogs", - "group": "queue", - "weight": 461, - "cookies": false, - "type": "", - "demo": "health\/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMails", - "group": "queue", - "weight": 466, - "cookies": false, - "type": "", - "demo": "health\/get-queue-mails.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMessaging", - "group": "queue", - "weight": 467, - "cookies": false, - "type": "", - "demo": "health\/get-queue-messaging.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/migrations": { - "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueMigrations", - "group": "queue", - "weight": 468, - "cookies": false, - "type": "", - "demo": "health\/get-queue-migrations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-resources": { - "get": { - "summary": "Get stats resources queue", - "operationId": "healthGetQueueStatsResources", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueStatsResources", - "group": "queue", - "weight": 470, - "cookies": false, - "type": "", - "demo": "health\/get-queue-stats-resources.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/stats-usage": { - "get": { - "summary": "Get stats usage queue", - "operationId": "healthGetQueueUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueUsage", - "group": "queue", - "weight": 471, - "cookies": false, - "type": "", - "demo": "health\/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/queue\/webhooks": { - "get": { - "summary": "Get webhooks queue", - "operationId": "healthGetQueueWebhooks", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueWebhooks", - "group": "queue", - "weight": 460, - "cookies": false, - "type": "", - "demo": "health\/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, - "\/health\/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#\/definitions\/healthStatus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorage", - "group": "storage", - "weight": 457, - "cookies": false, - "type": "", - "demo": "health\/get-storage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/storage\/local": { - "get": { - "summary": "Get local storage", - "operationId": "healthGetStorageLocal", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite local storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { - "$ref": "#\/definitions\/healthStatus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorageLocal", - "group": "storage", - "weight": 456, - "cookies": false, - "type": "", - "demo": "health\/get-storage-local.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/time": { - "get": { - "summary": "Get time", - "operationId": "healthGetTime", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", - "responses": { - "200": { - "description": "Health Time", - "schema": { - "$ref": "#\/definitions\/healthTime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTime", - "group": "health", - "weight": 454, - "cookies": false, - "type": "", - "demo": "health\/get-time.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "schema": { - "$ref": "#\/definitions\/locale" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 49, - "cookies": false, - "type": "", - "demo": "locale\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", - "responses": { - "200": { - "description": "Locale codes list", - "schema": { - "$ref": "#\/definitions\/localeCodeList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCodes", - "group": null, - "weight": 50, - "cookies": false, - "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "schema": { - "$ref": "#\/definitions\/continentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listContinents", - "group": null, - "weight": 54, - "cookies": false, - "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountries", - "group": null, - "weight": 51, - "cookies": false, - "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesEU", - "group": null, - "weight": 52, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "schema": { - "$ref": "#\/definitions\/phoneList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCountriesPhones", - "group": null, - "weight": 53, - "cookies": false, - "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "schema": { - "$ref": "#\/definitions\/currencyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCurrencies", - "group": null, - "weight": 55, - "cookies": false, - "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "locale" - ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "schema": { - "$ref": "#\/definitions\/languageList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, - "weight": 56, - "cookies": false, - "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ] - } - }, - "\/messaging\/messages": { - "get": { - "summary": "List messages", - "operationId": "messagingListMessages", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all messages from the current Appwrite project.", - "responses": { - "200": { - "description": "Message list", - "schema": { - "$ref": "#\/definitions\/messageList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessages", - "group": "messages", - "weight": 158, - "cookies": false, - "type": "", - "demo": "messaging\/list-messages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new email message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmail", - "group": "messages", - "weight": 155, - "cookies": false, - "type": "", - "demo": "messaging\/create-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<MESSAGE_ID>" - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "subject", - "content" - ] - } - } - ] - } - }, - "\/messaging\/messages\/email\/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "messages", - "weight": 162, - "cookies": false, - "type": "", - "demo": "messaging\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "default": null, - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false, - "x-nullable": true - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": null, - "x-example": false, - "x-nullable": true - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "\/messaging\/messages\/push": { - "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new push notification.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPush", - "group": "messages", - "weight": 157, - "cookies": false, - "type": "", - "demo": "messaging\/create-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<MESSAGE_ID>" - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": "", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": "", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": "", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": "", - "x-example": "<ID1:ID2>" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "default": "", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "default": "", - "x-example": "<SOUND>" - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<COLOR>" - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "default": -1, - "x-example": null, - "format": "int32" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": false, - "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "default": "high", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [] - } - }, - "required": [ - "messageId" - ] - } - } - ] - } - }, - "\/messaging\/messages\/push\/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePush", - "group": "messages", - "weight": 164, - "cookies": false, - "type": "", - "demo": "messaging\/update-push.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": null, - "x-example": "<TITLE>", - "x-nullable": true - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": null, - "x-example": "<BODY>", - "x-nullable": true - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": null, - "x-example": "<ACTION>", - "x-nullable": true - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": null, - "x-example": "<ID1:ID2>", - "x-nullable": true - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "default": null, - "x-example": "<ICON>", - "x-nullable": true - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "default": null, - "x-example": "<SOUND>", - "x-nullable": true - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<COLOR>", - "x-nullable": true - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "default": null, - "x-example": "<TAG>", - "x-nullable": true - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "default": null, - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "default": null, - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [], - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/messages\/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new SMS message.", - "responses": { - "201": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSms", - "group": "messages", - "weight": 156, - "cookies": false, - "type": "", - "demo": "messaging\/create-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - }, - "methods": [ - { - "name": "createSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - } - }, - { - "name": "createSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<MESSAGE_ID>" - }, - "content": { - "type": "string", - "description": "SMS Content.", - "default": null, - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "messageId", - "content" - ] - } - } - ] - } - }, - "\/messaging\/messages\/sms\/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSms", - "group": "messages", - "weight": 163, - "cookies": false, - "type": "", - "demo": "messaging\/update-sms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - }, - "methods": [ - { - "name": "updateSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - } - }, - { - "name": "updateSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": null, - "x-example": null, - "x-nullable": true, - "items": { - "type": "string" - } - }, - "content": { - "type": "string", - "description": "Email Content.", - "default": null, - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": null, - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/messages\/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a message by its unique ID.\n", - "responses": { - "200": { - "description": "Message", - "schema": { - "$ref": "#\/definitions\/message" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMessage", - "group": "messages", - "weight": 161, - "cookies": false, - "type": "", - "demo": "messaging\/get-message.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "messages", - "weight": 165, - "cookies": false, - "type": "", - "demo": "messaging\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the message activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMessageLogs", - "group": "logs", - "weight": 159, - "cookies": false, - "type": "", - "demo": "messaging\/list-message-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/messages\/{messageId}\/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of the targets associated with a message.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#\/definitions\/targetList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "messages", - "weight": 160, - "cookies": false, - "type": "", - "demo": "messaging\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "type": "string", - "x-example": "<MESSAGE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all providers from the current Appwrite project.", - "responses": { - "200": { - "description": "Provider list", - "schema": { - "$ref": "#\/definitions\/providerList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviders", - "group": "providers", - "weight": 129, - "cookies": false, - "type": "", - "demo": "messaging\/list-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/providers\/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Apple Push Notification service provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createApnsProvider", - "group": "providers", - "weight": 128, - "cookies": false, - "type": "", - "demo": "messaging\/create-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - }, - "methods": [ - { - "name": "createApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - } - }, - { - "name": "createAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/apns\/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateApnsProvider", - "group": "providers", - "weight": 142, - "cookies": false, - "type": "", - "demo": "messaging\/update-apns-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - }, - "methods": [ - { - "name": "updateApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - } - }, - { - "name": "updateAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/providers\/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createFcmProvider", - "group": "providers", - "weight": 127, - "cookies": false, - "type": "", - "demo": "messaging\/create-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - }, - "methods": [ - { - "name": "createFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - } - }, - { - "name": "createFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/fcm\/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateFcmProvider", - "group": "providers", - "weight": 141, - "cookies": false, - "type": "", - "demo": "messaging\/update-fcm-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - }, - "methods": [ - { - "name": "updateFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - } - }, - { - "name": "updateFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/providers\/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Mailgun provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMailgunProvider", - "group": "providers", - "weight": 118, - "cookies": false, - "type": "", - "demo": "messaging\/create-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/mailgun\/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Mailgun provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMailgunProvider", - "group": "providers", - "weight": 132, - "cookies": false, - "type": "", - "demo": "messaging\/update-mailgun-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", - "weight": 122, - "cookies": false, - "type": "", - "demo": "messaging\/create-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/msg91\/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", - "weight": 136, - "cookies": false, - "type": "", - "demo": "messaging\/update-msg-91-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/resend": { - "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Resend provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createResendProvider", - "group": "providers", - "weight": 120, - "cookies": false, - "type": "", - "demo": "messaging\/create-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/resend\/{providerId}": { - "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Resend provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateResendProvider", - "group": "providers", - "weight": 134, - "cookies": false, - "type": "", - "demo": "messaging\/update-resend-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Sendgrid provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSendgridProvider", - "group": "providers", - "weight": 119, - "cookies": false, - "type": "", - "demo": "messaging\/create-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/sendgrid\/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Sendgrid provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSendgridProvider", - "group": "providers", - "weight": 133, - "cookies": false, - "type": "", - "demo": "messaging\/update-sendgrid-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new SMTP provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createSmtpProvider", - "group": "providers", - "weight": 121, - "cookies": false, - "type": "", - "demo": "messaging\/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - }, - "methods": [ - { - "name": "createSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - } - }, - { - "name": "createSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": null, - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "default": 587, - "x-example": 1, - "format": "int32" - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "default": "", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": true, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name", - "host" - ] - } - } - ] - } - }, - "\/messaging\/providers\/smtp\/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a SMTP provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateSmtpProvider", - "group": "providers", - "weight": 135, - "cookies": false, - "type": "", - "demo": "messaging\/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - }, - "methods": [ - { - "name": "updateSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - } - }, - { - "name": "updateSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": "", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "<PASSWORD>" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "default": "", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/messaging\/providers\/telesign": { - "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Telesign provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTelesignProvider", - "group": "providers", - "weight": 123, - "cookies": false, - "type": "", - "demo": "messaging\/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/telesign\/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Telesign provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTelesignProvider", - "group": "providers", - "weight": 137, - "cookies": false, - "type": "", - "demo": "messaging\/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/textmagic": { - "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Textmagic provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextmagicProvider", - "group": "providers", - "weight": 124, - "cookies": false, - "type": "", - "demo": "messaging\/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/textmagic\/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Textmagic provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextmagicProvider", - "group": "providers", - "weight": 138, - "cookies": false, - "type": "", - "demo": "messaging\/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Twilio provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTwilioProvider", - "group": "providers", - "weight": 125, - "cookies": false, - "type": "", - "demo": "messaging\/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/twilio\/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Twilio provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTwilioProvider", - "group": "providers", - "weight": 139, - "cookies": false, - "type": "", - "demo": "messaging\/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new Vonage provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVonageProvider", - "group": "providers", - "weight": 126, - "cookies": false, - "type": "", - "demo": "messaging\/create-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Provider name.", - "default": null, - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/vonage\/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a Vonage provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVonageProvider", - "group": "providers", - "weight": 140, - "cookies": false, - "type": "", - "demo": "messaging\/update-vonage-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a provider by its unique ID.\n", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getProvider", - "group": "providers", - "weight": 131, - "cookies": false, - "type": "", - "demo": "messaging\/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a provider by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteProvider", - "group": "providers", - "weight": 143, - "cookies": false, - "type": "", - "demo": "messaging\/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - } - ] - } - }, - "\/messaging\/providers\/{providerId}\/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the provider activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listProviderLogs", - "group": "providers", - "weight": 130, - "cookies": false, - "type": "", - "demo": "messaging\/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "<PROVIDER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/subscribers\/{subscriberId}\/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscriberLogs", - "group": "subscribers", - "weight": 152, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/topics": { - "get": { - "summary": "List topics", - "operationId": "messagingListTopics", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all topics from the current Appwrite project.", - "responses": { - "200": { - "description": "Topic list", - "schema": { - "$ref": "#\/definitions\/topicList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopics", - "group": "topics", - "weight": 145, - "cookies": false, - "type": "", - "demo": "messaging\/list-topics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new topic.", - "responses": { - "201": { - "description": "Topic", - "schema": { - "$ref": "#\/definitions\/topic" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTopic", - "group": "topics", - "weight": 144, - "cookies": false, - "type": "", - "demo": "messaging\/create-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "default": null, - "x-example": "<TOPIC_ID>" - }, - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [ - "users" - ], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": [ - "topicId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/topics\/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#\/definitions\/topic" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTopic", - "group": "topics", - "weight": 147, - "cookies": false, - "type": "", - "demo": "messaging\/get-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a topic by its unique ID.\n", - "responses": { - "200": { - "description": "Topic", - "schema": { - "$ref": "#\/definitions\/topic" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTopic", - "group": "topics", - "weight": 148, - "cookies": false, - "type": "", - "demo": "messaging\/update-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Topic Name.", - "default": null, - "x-example": "<NAME>", - "x-nullable": true - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": null, - "x-example": "[\"any\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a topic by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTopic", - "group": "topics", - "weight": 149, - "cookies": false, - "type": "", - "demo": "messaging\/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", - "weight": 146, - "cookies": false, - "type": "", - "demo": "messaging\/list-topic-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a list of all subscribers from the current Appwrite project.", - "responses": { - "200": { - "description": "Subscriber list", - "schema": { - "$ref": "#\/definitions\/subscriberList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", - "weight": 151, - "cookies": false, - "type": "", - "demo": "messaging\/list-subscribers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new subscriber.", - "responses": { - "201": { - "description": "Subscriber", - "schema": { - "$ref": "#\/definitions\/subscriber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", - "weight": 150, - "cookies": false, - "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "default": null, - "x-example": "<SUBSCRIBER_ID>" - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "default": null, - "x-example": "<TARGET_ID>" - } - }, - "required": [ - "subscriberId", - "targetId" - ] - } - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Get a subscriber by its unique ID.\n", - "responses": { - "200": { - "description": "Subscriber", - "schema": { - "$ref": "#\/definitions\/subscriber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", - "weight": 153, - "cookies": false, - "type": "", - "demo": "messaging\/get-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "weight": 154, - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [], - "JWT": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "<TOPIC_ID>", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "<SUBSCRIBER_ID>", - "in": "path" - } - ] - } - }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesListPresences", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "List presence logs.", - "responses": { - "200": { - "description": "Presences List", - "schema": { - "$ref": "#\/definitions\/presenceList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPresences", - "group": "presences", - "weight": 416, - "cookies": false, - "type": "", - "demo": "presences\/list-presences.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGetPresence", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Get a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPresence", - "group": "presences", - "weight": 415, - "cookies": false, - "type": "", - "demo": "presences\/get-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsertPresence", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Create or update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertPresence", - "group": "presences", - "weight": 413, - "cookies": false, - "type": "", - "demo": "presences\/upsert-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "upsertPresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "userId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/presence" - } - ], - "description": "", - "demo": "presences\/upsert-presence.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "default": null, - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": [], - "x-example": "{}" - } - }, - "required": [ - "status" - ] - } - } - ] - }, - "patch": { - "summary": "Update presence", - "operationId": "presencesUpdatePresence", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "presences" - ], - "description": "Update a presence log by its unique ID.", - "responses": { - "200": { - "description": "Presence", - "schema": { - "$ref": "#\/definitions\/presence" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePresence", - "group": "presences", - "weight": 417, - "cookies": false, - "type": "", - "demo": "presences\/update-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "client" - ], - "packaging": false, - "public": true, - "methods": [ - { - "name": "updatePresence", - "namespace": "presences", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "expiresAt", - "metadata", - "permissions" - ], - "required": [ - "presenceId", - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/presence" - } - ], - "description": "", - "demo": "presences\/update-presence.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Presence status.", - "default": null, - "x-example": "<STATUS>", - "x-nullable": true - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry datetime.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDeletePresence", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "presences" - ], - "description": "Delete a presence log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePresence", - "group": "presences", - "weight": 418, - "cookies": false, - "type": "", - "demo": "presences\/delete-presence.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "type": "string", - "x-example": "<PRESENCE_ID>", - "in": "path" - } - ] - } - }, - "\/project": { - "delete": { - "summary": "Delete project", - "operationId": "projectDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 594, - "cookies": false, - "type": "", - "demo": "project\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/auth-methods\/{methodId}": { - "patch": { - "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", - "operationId": "projectUpdateAuthMethod", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAuthMethod", - "group": null, - "weight": 643, - "cookies": false, - "type": "", - "demo": "project\/update-auth-method.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "methodId", - "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", - "required": true, - "type": "string", - "x-example": "email-password", - "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Auth method status.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/keys": { - "get": { - "summary": "List project keys", - "operationId": "projectListKeys", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all API keys from the current project.", - "responses": { - "200": { - "description": "API Keys List", - "schema": { - "$ref": "#\/definitions\/keyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listKeys", - "group": "keys", - "weight": 610, - "cookies": false, - "type": "", - "demo": "project\/list-keys.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project key", - "operationId": "projectCreateKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", - "responses": { - "201": { - "description": "Key", - "schema": { - "$ref": "#\/definitions\/key" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createKey", - "group": "keys", - "weight": 608, - "cookies": false, - "type": "", - "demo": "project\/create-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<KEY_ID>" - }, - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "keyId", - "name", - "scopes" - ] - } - } - ] - } - }, - "\/project\/keys\/ephemeral": { - "post": { - "summary": "Create ephemeral project key", - "operationId": "projectCreateEphemeralKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", - "responses": { - "201": { - "description": "Ephemeral Key", - "schema": { - "$ref": "#\/definitions\/ephemeralKey" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEphemeralKey", - "group": "keys", - "weight": 609, - "cookies": false, - "type": "", - "demo": "project\/create-ephemeral-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "duration": { - "type": "integer", - "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", - "default": null, - "x-example": 1, - "format": "int32" - } - }, - "required": [ - "scopes", - "duration" - ] - } - } - ] - } - }, - "\/project\/keys\/{keyId}": { - "get": { - "summary": "Get project key", - "operationId": "projectGetKey", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a key by its unique ID. ", - "responses": { - "200": { - "description": "Key", - "schema": { - "$ref": "#\/definitions\/key" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getKey", - "group": "keys", - "weight": 611, - "cookies": false, - "type": "", - "demo": "project\/get-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update project key", - "operationId": "projectUpdateKey", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", - "responses": { - "200": { - "description": "Key", - "schema": { - "$ref": "#\/definitions\/key" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateKey", - "group": "keys", - "weight": 613, - "cookies": false, - "type": "", - "demo": "project\/update-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "rules.read", - "rules.write", - "presences.read", - "presences.write" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "name", - "scopes" - ] - } - } - ] - }, - "delete": { - "summary": "Delete project key", - "operationId": "projectDeleteKey", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteKey", - "group": "keys", - "weight": 612, - "cookies": false, - "type": "", - "demo": "project\/delete-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "type": "string", - "x-example": "<KEY_ID>", - "in": "path" - } - ] - } - }, - "\/project\/labels": { - "put": { - "summary": "Update project labels", - "operationId": "projectUpdateLabels", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": null, - "weight": 595, - "cookies": false, - "type": "", - "demo": "project\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - ] - } - }, - "\/project\/mock-phones": { - "get": { - "summary": "List project mock phones", - "operationId": "projectListMockPhones", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", - "responses": { - "200": { - "description": "Mock Numbers List", - "schema": { - "$ref": "#\/definitions\/mockNumberList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMockPhones", - "group": "mocks", - "weight": 628, - "cookies": false, - "type": "", - "demo": "project\/list-mock-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project mock phone", - "operationId": "projectCreateMockPhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", - "responses": { - "201": { - "description": "Mock Number", - "schema": { - "$ref": "#\/definitions\/mockNumber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMockPhone", - "group": "mocks", - "weight": 627, - "cookies": false, - "type": "", - "demo": "project\/create-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - }, - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "number", - "otp" - ] - } - } - ] - } - }, - "\/project\/mock-phones\/{number}": { - "get": { - "summary": "Get project mock phone", - "operationId": "projectGetMockPhone", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "schema": { - "$ref": "#\/definitions\/mockNumber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMockPhone", - "group": "mocks", - "weight": 629, - "cookies": false, - "type": "", - "demo": "project\/get-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" - } - ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", - "responses": { - "200": { - "description": "Mock Number", - "schema": { - "$ref": "#\/definitions\/mockNumber" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMockPhone", - "group": "mocks", - "weight": 630, - "cookies": false, - "type": "", - "demo": "project\/update-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "default": null, - "x-example": "<OTP>" - } - }, - "required": [ - "otp" - ] - } - } - ] - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMockPhone", - "group": "mocks", - "weight": 631, - "cookies": false, - "type": "", - "demo": "project\/delete-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" - } - ] - } - }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2 Providers List", - "schema": { - "$ref": "#\/definitions\/oAuth2ProviderList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listOAuth2Providers", - "group": "oauth2", - "weight": 644, - "cookies": false, - "type": "", - "demo": "project\/list-o-auth-2-providers.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/project\/oauth2\/amazon": { - "patch": { - "summary": "Update project OAuth2 Amazon", - "operationId": "projectUpdateOAuth2Amazon", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Amazon configuration.", - "responses": { - "200": { - "description": "OAuth2Amazon", - "schema": { - "$ref": "#\/definitions\/oAuth2Amazon" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Amazon", - "group": "oauth2", - "weight": 671, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-amazon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/apple": { - "patch": { - "summary": "Update project OAuth2 Apple", - "operationId": "projectUpdateOAuth2Apple", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Apple configuration.", - "responses": { - "200": { - "description": "OAuth2Apple", - "schema": { - "$ref": "#\/definitions\/oAuth2Apple" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Apple", - "group": "oauth2", - "weight": 686, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-apple.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "serviceId": { - "type": "string", - "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", - "default": null, - "x-example": "<SERVICE_ID>", - "x-nullable": true - }, - "keyId": { - "type": "string", - "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", - "default": null, - "x-example": "<KEY_ID>", - "x-nullable": true - }, - "teamId": { - "type": "string", - "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", - "default": null, - "x-example": "<TEAM_ID>", - "x-nullable": true - }, - "p8File": { - "type": "string", - "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", - "default": null, - "x-example": "<P8_FILE>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/auth0": { - "patch": { - "summary": "Update project OAuth2 Auth0", - "operationId": "projectUpdateOAuth2Auth0", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Auth0 configuration.", - "responses": { - "200": { - "description": "OAuth2Auth0", - "schema": { - "$ref": "#\/definitions\/oAuth2Auth0" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Auth0", - "group": "oauth2", - "weight": 680, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-auth-0.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Auth0 instance. For example: example.us.auth0.com", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/authentik": { - "patch": { - "summary": "Update project OAuth2 Authentik", - "operationId": "projectUpdateOAuth2Authentik", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Authentik configuration.", - "responses": { - "200": { - "description": "OAuth2Authentik", - "schema": { - "$ref": "#\/definitions\/oAuth2Authentik" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Authentik", - "group": "oauth2", - "weight": 679, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-authentik.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Authentik instance. For example: example.authentik.com", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/autodesk": { - "patch": { - "summary": "Update project OAuth2 Autodesk", - "operationId": "projectUpdateOAuth2Autodesk", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Autodesk configuration.", - "responses": { - "200": { - "description": "OAuth2Autodesk", - "schema": { - "$ref": "#\/definitions\/oAuth2Autodesk" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Autodesk", - "group": "oauth2", - "weight": 654, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-autodesk.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/bitbucket": { - "patch": { - "summary": "Update project OAuth2 Bitbucket", - "operationId": "projectUpdateOAuth2Bitbucket", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitbucket configuration.", - "responses": { - "200": { - "description": "OAuth2Bitbucket", - "schema": { - "$ref": "#\/definitions\/oAuth2Bitbucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitbucket", - "group": "oauth2", - "weight": 651, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitbucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", - "default": null, - "x-example": "<KEY>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/bitly": { - "patch": { - "summary": "Update project OAuth2 Bitly", - "operationId": "projectUpdateOAuth2Bitly", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Bitly configuration.", - "responses": { - "200": { - "description": "OAuth2Bitly", - "schema": { - "$ref": "#\/definitions\/oAuth2Bitly" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Bitly", - "group": "oauth2", - "weight": 652, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-bitly.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/box": { - "patch": { - "summary": "Update project OAuth2 Box", - "operationId": "projectUpdateOAuth2Box", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Box configuration.", - "responses": { - "200": { - "description": "OAuth2Box", - "schema": { - "$ref": "#\/definitions\/oAuth2Box" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Box", - "group": "oauth2", - "weight": 653, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-box.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/dailymotion": { - "patch": { - "summary": "Update project OAuth2 Dailymotion", - "operationId": "projectUpdateOAuth2Dailymotion", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dailymotion configuration.", - "responses": { - "200": { - "description": "OAuth2Dailymotion", - "schema": { - "$ref": "#\/definitions\/oAuth2Dailymotion" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dailymotion", - "group": "oauth2", - "weight": 650, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dailymotion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", - "default": null, - "x-example": "<API_KEY>", - "x-nullable": true - }, - "apiSecret": { - "type": "string", - "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", - "default": null, - "x-example": "<API_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/discord": { - "patch": { - "summary": "Update project OAuth2 Discord", - "operationId": "projectUpdateOAuth2Discord", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Discord configuration.", - "responses": { - "200": { - "description": "OAuth2Discord", - "schema": { - "$ref": "#\/definitions\/oAuth2Discord" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Discord", - "group": "oauth2", - "weight": 647, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-discord.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/disqus": { - "patch": { - "summary": "Update project OAuth2 Disqus", - "operationId": "projectUpdateOAuth2Disqus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Disqus configuration.", - "responses": { - "200": { - "description": "OAuth2Disqus", - "schema": { - "$ref": "#\/definitions\/oAuth2Disqus" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Disqus", - "group": "oauth2", - "weight": 670, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-disqus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "publicKey": { - "type": "string", - "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "default": null, - "x-example": "<PUBLIC_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/dropbox": { - "patch": { - "summary": "Update project OAuth2 Dropbox", - "operationId": "projectUpdateOAuth2Dropbox", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Dropbox configuration.", - "responses": { - "200": { - "description": "OAuth2Dropbox", - "schema": { - "$ref": "#\/definitions\/oAuth2Dropbox" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Dropbox", - "group": "oauth2", - "weight": 649, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-dropbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "appKey": { - "type": "string", - "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", - "default": null, - "x-example": "<APP_KEY>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", - "default": null, - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/etsy": { - "patch": { - "summary": "Update project OAuth2 Etsy", - "operationId": "projectUpdateOAuth2Etsy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Etsy configuration.", - "responses": { - "200": { - "description": "OAuth2Etsy", - "schema": { - "$ref": "#\/definitions\/oAuth2Etsy" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Etsy", - "group": "oauth2", - "weight": 672, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-etsy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "keyString": { - "type": "string", - "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", - "default": null, - "x-example": "<KEY_STRING>", - "x-nullable": true - }, - "sharedSecret": { - "type": "string", - "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", - "default": null, - "x-example": "<SHARED_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/facebook": { - "patch": { - "summary": "Update project OAuth2 Facebook", - "operationId": "projectUpdateOAuth2Facebook", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Facebook configuration.", - "responses": { - "200": { - "description": "OAuth2Facebook", - "schema": { - "$ref": "#\/definitions\/oAuth2Facebook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Facebook", - "group": "oauth2", - "weight": 673, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-facebook.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "appId": { - "type": "string", - "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", - "default": null, - "x-example": "<APP_ID>", - "x-nullable": true - }, - "appSecret": { - "type": "string", - "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", - "default": null, - "x-example": "<APP_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/figma": { - "patch": { - "summary": "Update project OAuth2 Figma", - "operationId": "projectUpdateOAuth2Figma", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Figma configuration.", - "responses": { - "200": { - "description": "OAuth2Figma", - "schema": { - "$ref": "#\/definitions\/oAuth2Figma" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Figma", - "group": "oauth2", - "weight": 648, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-figma.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/fusionauth": { - "patch": { - "summary": "Update project OAuth2 FusionAuth", - "operationId": "projectUpdateOAuth2FusionAuth", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 FusionAuth configuration.", - "responses": { - "200": { - "description": "OAuth2FusionAuth", - "schema": { - "$ref": "#\/definitions\/oAuth2FusionAuth" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2FusionAuth", - "group": "oauth2", - "weight": 681, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-fusion-auth.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/github": { - "patch": { - "summary": "Update project OAuth2 GitHub", - "operationId": "projectUpdateOAuth2GitHub", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 GitHub configuration.", - "responses": { - "200": { - "description": "OAuth2GitHub", - "schema": { - "$ref": "#\/definitions\/oAuth2Github" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2GitHub", - "group": "oauth2", - "weight": 646, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-git-hub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/gitlab": { - "patch": { - "summary": "Update project OAuth2 Gitlab", - "operationId": "projectUpdateOAuth2Gitlab", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Gitlab configuration.", - "responses": { - "200": { - "description": "OAuth2Gitlab", - "schema": { - "$ref": "#\/definitions\/oAuth2Gitlab" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Gitlab", - "group": "oauth2", - "weight": 678, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-gitlab.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "default": null, - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "secret": { - "type": "string", - "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/google": { - "patch": { - "summary": "Update project OAuth2 Google", - "operationId": "projectUpdateOAuth2Google", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Google configuration.", - "responses": { - "200": { - "description": "OAuth2Google", - "schema": { - "$ref": "#\/definitions\/oAuth2Google" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Google", - "group": "oauth2", - "weight": 655, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-google.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/keycloak": { - "patch": { - "summary": "Update project OAuth2 Keycloak", - "operationId": "projectUpdateOAuth2Keycloak", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Keycloak configuration.", - "responses": { - "200": { - "description": "OAuth2Keycloak", - "schema": { - "$ref": "#\/definitions\/oAuth2Keycloak" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Keycloak", - "group": "oauth2", - "weight": 682, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-keycloak.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of Keycloak instance. For example: keycloak.example.com", - "default": null, - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "realmName": { - "type": "string", - "description": "Keycloak realm name. For example: appwrite-realm", - "default": null, - "x-example": "<REALM_NAME>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/kick": { - "patch": { - "summary": "Update project OAuth2 Kick", - "operationId": "projectUpdateOAuth2Kick", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Kick configuration.", - "responses": { - "200": { - "description": "OAuth2Kick", - "schema": { - "$ref": "#\/definitions\/oAuth2Kick" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Kick", - "group": "oauth2", - "weight": 685, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-kick.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/linkedin": { - "patch": { - "summary": "Update project OAuth2 Linkedin", - "operationId": "projectUpdateOAuth2Linkedin", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Linkedin configuration.", - "responses": { - "200": { - "description": "OAuth2Linkedin", - "schema": { - "$ref": "#\/definitions\/oAuth2Linkedin" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Linkedin", - "group": "oauth2", - "weight": 669, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-linkedin.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "primaryClientSecret": { - "type": "string", - "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", - "default": null, - "x-example": "<PRIMARY_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/microsoft": { - "patch": { - "summary": "Update project OAuth2 Microsoft", - "operationId": "projectUpdateOAuth2Microsoft", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Microsoft configuration.", - "responses": { - "200": { - "description": "OAuth2Microsoft", - "schema": { - "$ref": "#\/definitions\/oAuth2Microsoft" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Microsoft", - "group": "oauth2", - "weight": 687, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-microsoft.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string", - "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", - "default": null, - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "applicationSecret": { - "type": "string", - "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "default": null, - "x-example": "<APPLICATION_SECRET>", - "x-nullable": true - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", - "default": null, - "x-example": "<TENANT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/notion": { - "patch": { - "summary": "Update project OAuth2 Notion", - "operationId": "projectUpdateOAuth2Notion", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Notion configuration.", - "responses": { - "200": { - "description": "OAuth2Notion", - "schema": { - "$ref": "#\/definitions\/oAuth2Notion" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Notion", - "group": "oauth2", - "weight": 666, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-notion.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "oauthClientId": { - "type": "string", - "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", - "default": null, - "x-example": "<OAUTH_CLIENT_ID>", - "x-nullable": true - }, - "oauthClientSecret": { - "type": "string", - "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", - "default": null, - "x-example": "<OAUTH_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/oidc": { - "patch": { - "summary": "Update project OAuth2 Oidc", - "operationId": "projectUpdateOAuth2Oidc", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Oidc configuration.", - "responses": { - "200": { - "description": "OAuth2Oidc", - "schema": { - "$ref": "#\/definitions\/oAuth2Oidc" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Oidc", - "group": "oauth2", - "weight": 683, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-oidc.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/okta": { - "patch": { - "summary": "Update project OAuth2 Okta", - "operationId": "projectUpdateOAuth2Okta", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Okta configuration.", - "responses": { - "200": { - "description": "OAuth2Okta", - "schema": { - "$ref": "#\/definitions\/oAuth2Okta" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Okta", - "group": "oauth2", - "weight": 684, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-okta.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "domain": { - "type": "string", - "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", - "default": null, - "x-example": null, - "x-nullable": true - }, - "authorizationServerId": { - "type": "string", - "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", - "default": null, - "x-example": "<AUTHORIZATION_SERVER_ID>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/paypal": { - "patch": { - "summary": "Update project OAuth2 Paypal", - "operationId": "projectUpdateOAuth2Paypal", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Paypal configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "schema": { - "$ref": "#\/definitions\/oAuth2Paypal" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Paypal", - "group": "oauth2", - "weight": 676, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/paypalSandbox": { - "patch": { - "summary": "Update project OAuth2 PaypalSandbox", - "operationId": "projectUpdateOAuth2PaypalSandbox", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 PaypalSandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Paypal", - "schema": { - "$ref": "#\/definitions\/oAuth2Paypal" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2PaypalSandbox", - "group": "oauth2", - "weight": 677, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-paypal-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/podio": { - "patch": { - "summary": "Update project OAuth2 Podio", - "operationId": "projectUpdateOAuth2Podio", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Podio configuration.", - "responses": { - "200": { - "description": "OAuth2Podio", - "schema": { - "$ref": "#\/definitions\/oAuth2Podio" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Podio", - "group": "oauth2", - "weight": 665, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-podio.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/salesforce": { - "patch": { - "summary": "Update project OAuth2 Salesforce", - "operationId": "projectUpdateOAuth2Salesforce", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Salesforce configuration.", - "responses": { - "200": { - "description": "OAuth2Salesforce", - "schema": { - "$ref": "#\/definitions\/oAuth2Salesforce" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Salesforce", - "group": "oauth2", - "weight": 667, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-salesforce.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "default": null, - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "customerSecret": { - "type": "string", - "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", - "default": null, - "x-example": "<CUSTOMER_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/slack": { - "patch": { - "summary": "Update project OAuth2 Slack", - "operationId": "projectUpdateOAuth2Slack", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Slack configuration.", - "responses": { - "200": { - "description": "OAuth2Slack", - "schema": { - "$ref": "#\/definitions\/oAuth2Slack" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Slack", - "group": "oauth2", - "weight": 664, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-slack.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/spotify": { - "patch": { - "summary": "Update project OAuth2 Spotify", - "operationId": "projectUpdateOAuth2Spotify", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Spotify configuration.", - "responses": { - "200": { - "description": "OAuth2Spotify", - "schema": { - "$ref": "#\/definitions\/oAuth2Spotify" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Spotify", - "group": "oauth2", - "weight": 663, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-spotify.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/stripe": { - "patch": { - "summary": "Update project OAuth2 Stripe", - "operationId": "projectUpdateOAuth2Stripe", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Stripe configuration.", - "responses": { - "200": { - "description": "OAuth2Stripe", - "schema": { - "$ref": "#\/definitions\/oAuth2Stripe" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Stripe", - "group": "oauth2", - "weight": 662, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-stripe.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "apiSecretKey": { - "type": "string", - "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", - "default": null, - "x-example": "<API_SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/tradeshift": { - "patch": { - "summary": "Update project OAuth2 Tradeshift", - "operationId": "projectUpdateOAuth2Tradeshift", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "schema": { - "$ref": "#\/definitions\/oAuth2Tradeshift" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Tradeshift", - "group": "oauth2", - "weight": 674, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "default": null, - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "default": null, - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/tradeshiftBox": { - "patch": { - "summary": "Update project OAuth2 Tradeshift Sandbox", - "operationId": "projectUpdateOAuth2TradeshiftSandbox", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", - "responses": { - "200": { - "description": "OAuth2Tradeshift", - "schema": { - "$ref": "#\/definitions\/oAuth2Tradeshift" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2TradeshiftSandbox", - "group": "oauth2", - "weight": 675, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "default": null, - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "default": null, - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/twitch": { - "patch": { - "summary": "Update project OAuth2 Twitch", - "operationId": "projectUpdateOAuth2Twitch", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Twitch configuration.", - "responses": { - "200": { - "description": "OAuth2Twitch", - "schema": { - "$ref": "#\/definitions\/oAuth2Twitch" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Twitch", - "group": "oauth2", - "weight": 661, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-twitch.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/wordpress": { - "patch": { - "summary": "Update project OAuth2 WordPress", - "operationId": "projectUpdateOAuth2WordPress", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 WordPress configuration.", - "responses": { - "200": { - "description": "OAuth2WordPress", - "schema": { - "$ref": "#\/definitions\/oAuth2WordPress" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2WordPress", - "group": "oauth2", - "weight": 660, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-word-press.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/x": { - "patch": { - "summary": "Update project OAuth2 X", - "operationId": "projectUpdateOAuth2X", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 X configuration.", - "responses": { - "200": { - "description": "OAuth2X", - "schema": { - "$ref": "#\/definitions\/oAuth2X" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2X", - "group": "oauth2", - "weight": 659, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2x.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "customerKey": { - "type": "string", - "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", - "default": null, - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", - "default": null, - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/yahoo": { - "patch": { - "summary": "Update project OAuth2 Yahoo", - "operationId": "projectUpdateOAuth2Yahoo", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yahoo configuration.", - "responses": { - "200": { - "description": "OAuth2Yahoo", - "schema": { - "$ref": "#\/definitions\/oAuth2Yahoo" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yahoo", - "group": "oauth2", - "weight": 668, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yahoo.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/yandex": { - "patch": { - "summary": "Update project OAuth2 Yandex", - "operationId": "projectUpdateOAuth2Yandex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Yandex configuration.", - "responses": { - "200": { - "description": "OAuth2Yandex", - "schema": { - "$ref": "#\/definitions\/oAuth2Yandex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Yandex", - "group": "oauth2", - "weight": 658, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-yandex.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/zoho": { - "patch": { - "summary": "Update project OAuth2 Zoho", - "operationId": "projectUpdateOAuth2Zoho", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoho configuration.", - "responses": { - "200": { - "description": "OAuth2Zoho", - "schema": { - "$ref": "#\/definitions\/oAuth2Zoho" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoho", - "group": "oauth2", - "weight": 657, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoho.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/zoom": { - "patch": { - "summary": "Update project OAuth2 Zoom", - "operationId": "projectUpdateOAuth2Zoom", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the project OAuth2 Zoom configuration.", - "responses": { - "200": { - "description": "OAuth2Zoom", - "schema": { - "$ref": "#\/definitions\/oAuth2Zoom" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateOAuth2Zoom", - "group": "oauth2", - "weight": 656, - "cookies": false, - "type": "", - "demo": "project\/update-o-auth-2-zoom.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", - "default": null, - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", - "default": null, - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/oauth2\/{provider}": { - "get": { - "summary": "Get project OAuth2 provider", - "operationId": "projectGetOAuth2Provider", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", - "responses": { - "200": { - "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/oAuth2Github" - }, - { - "$ref": "#\/definitions\/oAuth2Discord" - }, - { - "$ref": "#\/definitions\/oAuth2Figma" - }, - { - "$ref": "#\/definitions\/oAuth2Dropbox" - }, - { - "$ref": "#\/definitions\/oAuth2Dailymotion" - }, - { - "$ref": "#\/definitions\/oAuth2Bitbucket" - }, - { - "$ref": "#\/definitions\/oAuth2Bitly" - }, - { - "$ref": "#\/definitions\/oAuth2Box" - }, - { - "$ref": "#\/definitions\/oAuth2Autodesk" - }, - { - "$ref": "#\/definitions\/oAuth2Google" - }, - { - "$ref": "#\/definitions\/oAuth2Zoom" - }, - { - "$ref": "#\/definitions\/oAuth2Zoho" - }, - { - "$ref": "#\/definitions\/oAuth2Yandex" - }, - { - "$ref": "#\/definitions\/oAuth2X" - }, - { - "$ref": "#\/definitions\/oAuth2WordPress" - }, - { - "$ref": "#\/definitions\/oAuth2Twitch" - }, - { - "$ref": "#\/definitions\/oAuth2Stripe" - }, - { - "$ref": "#\/definitions\/oAuth2Spotify" - }, - { - "$ref": "#\/definitions\/oAuth2Slack" - }, - { - "$ref": "#\/definitions\/oAuth2Podio" - }, - { - "$ref": "#\/definitions\/oAuth2Notion" - }, - { - "$ref": "#\/definitions\/oAuth2Salesforce" - }, - { - "$ref": "#\/definitions\/oAuth2Yahoo" - }, - { - "$ref": "#\/definitions\/oAuth2Linkedin" - }, - { - "$ref": "#\/definitions\/oAuth2Disqus" - }, - { - "$ref": "#\/definitions\/oAuth2Amazon" - }, - { - "$ref": "#\/definitions\/oAuth2Etsy" - }, - { - "$ref": "#\/definitions\/oAuth2Facebook" - }, - { - "$ref": "#\/definitions\/oAuth2Tradeshift" - }, - { - "$ref": "#\/definitions\/oAuth2Paypal" - }, - { - "$ref": "#\/definitions\/oAuth2Gitlab" - }, - { - "$ref": "#\/definitions\/oAuth2Authentik" - }, - { - "$ref": "#\/definitions\/oAuth2Auth0" - }, - { - "$ref": "#\/definitions\/oAuth2FusionAuth" - }, - { - "$ref": "#\/definitions\/oAuth2Keycloak" - }, - { - "$ref": "#\/definitions\/oAuth2Oidc" - }, - { - "$ref": "#\/definitions\/oAuth2Apple" - }, - { - "$ref": "#\/definitions\/oAuth2Okta" - }, - { - "$ref": "#\/definitions\/oAuth2Kick" - }, - { - "$ref": "#\/definitions\/oAuth2Microsoft" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/definitions\/oAuth2Github", - "discord": "#\/definitions\/oAuth2Discord", - "figma": "#\/definitions\/oAuth2Figma", - "dropbox": "#\/definitions\/oAuth2Dropbox", - "dailymotion": "#\/definitions\/oAuth2Dailymotion", - "bitbucket": "#\/definitions\/oAuth2Bitbucket", - "bitly": "#\/definitions\/oAuth2Bitly", - "box": "#\/definitions\/oAuth2Box", - "autodesk": "#\/definitions\/oAuth2Autodesk", - "google": "#\/definitions\/oAuth2Google", - "zoom": "#\/definitions\/oAuth2Zoom", - "zoho": "#\/definitions\/oAuth2Zoho", - "yandex": "#\/definitions\/oAuth2Yandex", - "x": "#\/definitions\/oAuth2X", - "wordpress": "#\/definitions\/oAuth2WordPress", - "twitch": "#\/definitions\/oAuth2Twitch", - "stripe": "#\/definitions\/oAuth2Stripe", - "spotify": "#\/definitions\/oAuth2Spotify", - "slack": "#\/definitions\/oAuth2Slack", - "podio": "#\/definitions\/oAuth2Podio", - "notion": "#\/definitions\/oAuth2Notion", - "salesforce": "#\/definitions\/oAuth2Salesforce", - "yahoo": "#\/definitions\/oAuth2Yahoo", - "linkedin": "#\/definitions\/oAuth2Linkedin", - "disqus": "#\/definitions\/oAuth2Disqus", - "amazon": "#\/definitions\/oAuth2Amazon", - "etsy": "#\/definitions\/oAuth2Etsy", - "facebook": "#\/definitions\/oAuth2Facebook", - "tradeshift": "#\/definitions\/oAuth2Tradeshift", - "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", - "paypal": "#\/definitions\/oAuth2Paypal", - "paypalSandbox": "#\/definitions\/oAuth2Paypal", - "gitlab": "#\/definitions\/oAuth2Gitlab", - "authentik": "#\/definitions\/oAuth2Authentik", - "auth0": "#\/definitions\/oAuth2Auth0", - "fusionauth": "#\/definitions\/oAuth2FusionAuth", - "keycloak": "#\/definitions\/oAuth2Keycloak", - "oidc": "#\/definitions\/oAuth2Oidc", - "apple": "#\/definitions\/oAuth2Apple", - "okta": "#\/definitions\/oAuth2Okta", - "kick": "#\/definitions\/oAuth2Kick", - "microsoft": "#\/definitions\/oAuth2Microsoft" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getOAuth2Provider", - "group": "oauth2", - "weight": 645, - "cookies": false, - "type": "", - "demo": "project\/get-o-auth-2-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 provider key. For example: github, google, apple.", - "required": true, - "type": "string", - "x-example": "<PROVIDER>", - "in": "path" - } - ] - } - }, - "\/project\/platforms": { - "get": { - "summary": "List project platforms", - "operationId": "projectListPlatforms", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", - "responses": { - "200": { - "description": "Platforms List", - "schema": { - "$ref": "#\/definitions\/platformList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPlatforms", - "group": "platforms", - "weight": 626, - "cookies": false, - "type": "", - "demo": "project\/list-platforms.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/project\/platforms\/android": { - "post": { - "summary": "Create project Android platform", - "operationId": "projectCreateAndroidPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Android", - "schema": { - "$ref": "#\/definitions\/platformAndroid" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createAndroidPlatform", - "group": "platforms", - "weight": 622, - "cookies": false, - "type": "", - "demo": "project\/create-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "default": null, - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "platformId", - "name", - "applicationId" - ] - } - } - ] - } - }, - "\/project\/platforms\/android\/{platformId}": { - "put": { - "summary": "Update project Android platform", - "operationId": "projectUpdateAndroidPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", - "responses": { - "200": { - "description": "Platform Android", - "schema": { - "$ref": "#\/definitions\/platformAndroid" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateAndroidPlatform", - "group": "platforms", - "weight": 617, - "cookies": false, - "type": "", - "demo": "project\/update-android-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "default": null, - "x-example": "<APPLICATION_ID>" - } - }, - "required": [ - "name", - "applicationId" - ] - } - } - ] - } - }, - "\/project\/platforms\/apple": { - "post": { - "summary": "Create project Apple platform", - "operationId": "projectCreateApplePlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Apple", - "schema": { - "$ref": "#\/definitions\/platformApple" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createApplePlatform", - "group": "platforms", - "weight": 621, - "cookies": false, - "type": "", - "demo": "project\/create-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "default": null, - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "platformId", - "name", - "bundleIdentifier" - ] - } - } - ] - } - }, - "\/project\/platforms\/apple\/{platformId}": { - "put": { - "summary": "Update project Apple platform", - "operationId": "projectUpdateApplePlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", - "responses": { - "200": { - "description": "Platform Apple", - "schema": { - "$ref": "#\/definitions\/platformApple" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateApplePlatform", - "group": "platforms", - "weight": 616, - "cookies": false, - "type": "", - "demo": "project\/update-apple-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "default": null, - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "name", - "bundleIdentifier" - ] - } - } - ] - } - }, - "\/project\/platforms\/linux": { - "post": { - "summary": "Create project Linux platform", - "operationId": "projectCreateLinuxPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Linux", - "schema": { - "$ref": "#\/definitions\/platformLinux" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLinuxPlatform", - "group": "platforms", - "weight": 624, - "cookies": false, - "type": "", - "demo": "project\/create-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageName" - ] - } - } - ] - } - }, - "\/project\/platforms\/linux\/{platformId}": { - "put": { - "summary": "Update project Linux platform", - "operationId": "projectUpdateLinuxPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", - "responses": { - "200": { - "description": "Platform Linux", - "schema": { - "$ref": "#\/definitions\/platformLinux" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLinuxPlatform", - "group": "platforms", - "weight": 619, - "cookies": false, - "type": "", - "demo": "project\/update-linux-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "name", - "packageName" - ] - } - } - ] - } - }, - "\/project\/platforms\/web": { - "post": { - "summary": "Create project web platform", - "operationId": "projectCreateWebPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Web", - "schema": { - "$ref": "#\/definitions\/platformWeb" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWebPlatform", - "group": "platforms", - "weight": 620, - "cookies": false, - "type": "", - "demo": "project\/create-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "default": null, - "x-example": "app.example.com" - } - }, - "required": [ - "platformId", - "name", - "hostname" - ] - } - } - ] - } - }, - "\/project\/platforms\/web\/{platformId}": { - "put": { - "summary": "Update project web platform", - "operationId": "projectUpdateWebPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", - "responses": { - "200": { - "description": "Platform Web", - "schema": { - "$ref": "#\/definitions\/platformWeb" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWebPlatform", - "group": "platforms", - "weight": 615, - "cookies": false, - "type": "", - "demo": "project\/update-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "default": null, - "x-example": "app.example.com" - } - }, - "required": [ - "name", - "hostname" - ] - } - } - ] - } - }, - "\/project\/platforms\/windows": { - "post": { - "summary": "Create project Windows platform", - "operationId": "projectCreateWindowsPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Windows", - "schema": { - "$ref": "#\/definitions\/platformWindows" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWindowsPlatform", - "group": "platforms", - "weight": 623, - "cookies": false, - "type": "", - "demo": "project\/create-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<PLATFORM_ID>" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "platformId", - "name", - "packageIdentifierName" - ] - } - } - ] - } - }, - "\/project\/platforms\/windows\/{platformId}": { - "put": { - "summary": "Update project Windows platform", - "operationId": "projectUpdateWindowsPlatform", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", - "responses": { - "200": { - "description": "Platform Windows", - "schema": { - "$ref": "#\/definitions\/platformWindows" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateWindowsPlatform", - "group": "platforms", - "weight": 618, - "cookies": false, - "type": "", - "demo": "project\/update-windows-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "default": null, - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "name", - "packageIdentifierName" - ] - } - } - ] - } - }, - "\/project\/platforms\/{platformId}": { - "get": { - "summary": "Get project platform", - "operationId": "projectGetPlatform", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", - "responses": { - "200": { - "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/platformWeb" - }, - { - "$ref": "#\/definitions\/platformApple" - }, - { - "$ref": "#\/definitions\/platformAndroid" - }, - { - "$ref": "#\/definitions\/platformWindows" - }, - { - "$ref": "#\/definitions\/platformLinux" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/definitions\/platformWeb", - "apple": "#\/definitions\/platformApple", - "android": "#\/definitions\/platformAndroid", - "windows": "#\/definitions\/platformWindows", - "linux": "#\/definitions\/platformLinux" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPlatform", - "group": "platforms", - "weight": 625, - "cookies": false, - "type": "", - "demo": "project\/get-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete project platform", - "operationId": "projectDeletePlatform", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deletePlatform", - "group": "platforms", - "weight": 614, - "cookies": false, - "type": "", - "demo": "project\/delete-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "type": "string", - "x-example": "<PLATFORM_ID>", - "in": "path" - } - ] - } - }, - "\/project\/policies": { - "get": { - "summary": "List project policies", - "operationId": "projectListPolicies", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all project policies and their current configuration.", - "responses": { - "200": { - "description": "Policies List", - "schema": { - "$ref": "#\/definitions\/policyList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listPolicies", - "group": "policies", - "weight": 632, - "cookies": false, - "type": "", - "demo": "project\/list-policies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/project\/policies\/membership-privacy": { - "patch": { - "summary": "Update membership privacy policy", - "operationId": "projectUpdateMembershipPrivacyPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipPrivacyPolicy", - "group": "policies", - "weight": 634, - "cookies": false, - "type": "", - "demo": "project\/update-membership-privacy-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "boolean", - "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userEmail": { - "type": "boolean", - "description": "Set to true if you want make user email visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userPhone": { - "type": "boolean", - "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userName": { - "type": "boolean", - "description": "Set to true if you want make user name visible to all team members, or false to hide it.", - "default": null, - "x-example": false - }, - "userMFA": { - "type": "boolean", - "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", - "default": null, - "x-example": false - } - } - } - } - ] - } - }, - "\/project\/policies\/password-dictionary": { - "patch": { - "summary": "Update password dictionary policy", - "operationId": "projectUpdatePasswordDictionaryPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordDictionaryPolicy", - "group": "policies", - "weight": 635, - "cookies": false, - "type": "", - "demo": "project\/update-password-dictionary-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/password-history": { - "patch": { - "summary": "Update password history policy", - "operationId": "projectUpdatePasswordHistoryPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordHistoryPolicy", - "group": "policies", - "weight": 636, - "cookies": false, - "type": "", - "demo": "project\/update-password-history-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - ] - } - }, - "\/project\/policies\/password-personal-data": { - "patch": { - "summary": "Update password personal data policy", - "operationId": "projectUpdatePasswordPersonalDataPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePasswordPersonalDataPolicy", - "group": "policies", - "weight": 637, - "cookies": false, - "type": "", - "demo": "project\/update-password-personal-data-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/session-alert": { - "patch": { - "summary": "Update session alert policy", - "operationId": "projectUpdateSessionAlertPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionAlertPolicy", - "group": "policies", - "weight": 638, - "cookies": false, - "type": "", - "demo": "project\/update-session-alert-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/session-duration": { - "patch": { - "summary": "Update session duration policy", - "operationId": "projectUpdateSessionDurationPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update maximum duration how long sessions created within a project should stay active for.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionDurationPolicy", - "group": "policies", - "weight": 639, - "cookies": false, - "type": "", - "demo": "project\/update-session-duration-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", - "default": null, - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "duration" - ] - } - } - ] - } - }, - "\/project\/policies\/session-invalidation": { - "patch": { - "summary": "Update session invalidation policy", - "operationId": "projectUpdateSessionInvalidationPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionInvalidationPolicy", - "group": "policies", - "weight": 640, - "cookies": false, - "type": "", - "demo": "project\/update-session-invalidation-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/policies\/session-limit": { - "patch": { - "summary": "Update session limit policy", - "operationId": "projectUpdateSessionLimitPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionLimitPolicy", - "group": "policies", - "weight": 641, - "cookies": false, - "type": "", - "demo": "project\/update-session-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - ] - } - }, - "\/project\/policies\/user-limit": { - "patch": { - "summary": "Update user limit policy", - "operationId": "projectUpdateUserLimitPolicy", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUserLimitPolicy", - "group": "policies", - "weight": 642, - "cookies": false, - "type": "", - "demo": "project\/update-user-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - ] - } - }, - "\/project\/policies\/{policyId}": { - "get": { - "summary": "Get project policy", - "operationId": "projectGetPolicy", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", - "responses": { - "200": { - "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/policyPasswordDictionary" - }, - { - "$ref": "#\/definitions\/policyPasswordHistory" - }, - { - "$ref": "#\/definitions\/policyPasswordPersonalData" - }, - { - "$ref": "#\/definitions\/policySessionAlert" - }, - { - "$ref": "#\/definitions\/policySessionDuration" - }, - { - "$ref": "#\/definitions\/policySessionInvalidation" - }, - { - "$ref": "#\/definitions\/policySessionLimit" - }, - { - "$ref": "#\/definitions\/policyUserLimit" - }, - { - "$ref": "#\/definitions\/policyMembershipPrivacy" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/definitions\/policyPasswordDictionary", - "password-history": "#\/definitions\/policyPasswordHistory", - "password-personal-data": "#\/definitions\/policyPasswordPersonalData", - "session-alert": "#\/definitions\/policySessionAlert", - "session-duration": "#\/definitions\/policySessionDuration", - "session-invalidation": "#\/definitions\/policySessionInvalidation", - "session-limit": "#\/definitions\/policySessionLimit", - "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPolicy", - "group": "policies", - "weight": 633, - "cookies": false, - "type": "", - "demo": "project\/get-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "policies.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", - "required": true, - "type": "string", - "x-example": "password-dictionary", - "enum": [ - "password-dictionary", - "password-history", - "password-personal-data", - "session-alert", - "session-duration", - "session-invalidation", - "session-limit", - "user-limit", - "membership-privacy" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/project\/protocols\/{protocolId}": { - "patch": { - "summary": "Update project protocol", - "operationId": "projectUpdateProtocol", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateProtocol", - "group": null, - "weight": 596, - "cookies": false, - "type": "", - "demo": "project\/update-protocol.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "protocolId", - "description": "Protocol name. Can be one of: rest, graphql, websocket", - "required": true, - "type": "string", - "x-example": "rest", - "enum": [ - "rest", - "graphql", - "websocket" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Protocol status.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/services\/{serviceId}": { - "patch": { - "summary": "Update project service", - "operationId": "projectUpdateService", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateService", - "group": null, - "weight": 597, - "cookies": false, - "type": "", - "demo": "project\/update-service.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "serviceId", - "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging", - "required": true, - "type": "string", - "x-example": "account", - "enum": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging" - ], - "x-enum-name": null, - "x-enum-keys": [], - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Service status.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, - "\/project\/smtp": { - "patch": { - "summary": "Update project SMTP configuration", - "operationId": "projectUpdateSMTP", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSMTP", - "group": "smtp", - "weight": 598, - "cookies": false, - "type": "", - "demo": "project\/update-smtp.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "SMTP server hostname (domain)", - "default": null, - "x-example": null, - "x-nullable": true - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "default": null, - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "SMTP server username. Leave empty for no authorization.", - "default": null, - "x-example": "<USERNAME>", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).", - "default": null, - "x-example": "<PASSWORD>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email address shown in inbox as the sender of the email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name shown in inbox as the sender of the email.", - "default": null, - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Email used when user replies to the email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Name used when user replies to the email.", - "default": null, - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - }, - "secure": { - "type": "string", - "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", - "default": null, - "x-example": "tls", - "enum": [ - "tls", - "ssl" - ], - "x-enum-name": null, - "x-enum-keys": [], - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/project\/smtp\/tests": { - "post": { - "summary": "Create project SMTP test", - "operationId": "projectCreateSMTPTest", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Send a test email to verify SMTP configuration. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSMTPTest", - "group": "smtp", - "weight": 599, - "cookies": false, - "type": "", - "demo": "project\/create-smtp-test.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "emails" - ] - } - } - ] - } - }, - "\/project\/templates\/email": { - "get": { - "summary": "List project email templates", - "operationId": "projectListEmailTemplates", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", - "responses": { - "200": { - "description": "Email Templates List", - "schema": { - "$ref": "#\/definitions\/emailTemplateList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listEmailTemplates", - "group": "templates", - "weight": 600, - "cookies": false, - "type": "", - "demo": "project\/list-email-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "patch": { - "summary": "Update project email template", - "operationId": "projectUpdateEmailTemplate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#\/definitions\/emailTemplate" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailTemplate", - "group": "templates", - "weight": 602, - "cookies": false, - "type": "", - "demo": "project\/update-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "default": null, - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [] - }, - "locale": { - "type": "string", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "default": "", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [] - }, - "subject": { - "type": "string", - "description": "Subject of the email template. Can be up to 255 characters.", - "default": null, - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "message": { - "type": "string", - "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", - "default": null, - "x-example": "<MESSAGE>", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name of the email sender.", - "default": null, - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { - "type": "string", - "description": "Reply to name.", - "default": null, - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true - } - }, - "required": [ - "templateId" - ] - } - } - ] - } - }, - "\/project\/templates\/email\/{templateId}": { - "get": { - "summary": "Get project email template", - "operationId": "projectGetEmailTemplate", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", - "responses": { - "200": { - "description": "EmailTemplate", - "schema": { - "$ref": "#\/definitions\/emailTemplate" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getEmailTemplate", - "group": "templates", - "weight": 601, - "cookies": false, - "type": "", - "demo": "project\/get-email-template.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "templateId", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "required": true, - "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "EmailTemplateType", - "x-enum-keys": [], - "in": "path" - }, - { - "name": "locale", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "required": false, - "type": "string", - "x-example": "af", - "enum": [ - "af", - "ar-ae", - "ar-bh", - "ar-dz", - "ar-eg", - "ar-iq", - "ar-jo", - "ar-kw", - "ar-lb", - "ar-ly", - "ar-ma", - "ar-om", - "ar-qa", - "ar-sa", - "ar-sy", - "ar-tn", - "ar-ye", - "as", - "az", - "be", - "bg", - "bh", - "bn", - "bs", - "ca", - "cs", - "cy", - "da", - "de", - "de-at", - "de-ch", - "de-li", - "de-lu", - "el", - "en", - "en-au", - "en-bz", - "en-ca", - "en-gb", - "en-ie", - "en-jm", - "en-nz", - "en-tt", - "en-us", - "en-za", - "eo", - "es", - "es-ar", - "es-bo", - "es-cl", - "es-co", - "es-cr", - "es-do", - "es-ec", - "es-gt", - "es-hn", - "es-mx", - "es-ni", - "es-pa", - "es-pe", - "es-pr", - "es-py", - "es-sv", - "es-uy", - "es-ve", - "et", - "eu", - "fa", - "fi", - "fo", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "fr-lu", - "ga", - "gd", - "he", - "hi", - "hr", - "hu", - "id", - "is", - "it", - "it-ch", - "ja", - "ji", - "ko", - "ku", - "lt", - "lv", - "mk", - "ml", - "ms", - "mt", - "nb", - "ne", - "nl", - "nl-be", - "nn", - "no", - "pa", - "pl", - "pt", - "pt-br", - "rm", - "ro", - "ro-md", - "ru", - "ru-md", - "sb", - "sk", - "sl", - "sq", - "sr", - "sv", - "sv-fi", - "th", - "tn", - "tr", - "ts", - "ua", - "ur", - "ve", - "vi", - "xh", - "zh-cn", - "zh-hk", - "zh-sg", - "zh-tw", - "zu" - ], - "x-enum-name": "EmailTemplateLocale", - "x-enum-keys": [], - "default": "", - "in": "query" - } - ] - } - }, - "\/project\/variables": { - "get": { - "summary": "List project variables", - "operationId": "projectListVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a list of all project environment variables.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#\/definitions\/variableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 604, - "cookies": false, - "type": "", - "demo": "project\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create project variable", - "operationId": "projectCreateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 603, - "cookies": false, - "type": "", - "demo": "project\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<VARIABLE_ID>" - }, - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "variableId", - "key", - "value" - ] - } - } - ] - } - }, - "\/project\/variables\/{variableId}": { - "get": { - "summary": "Get project variable", - "operationId": "projectGetVariable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Get a variable by its unique ID. ", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 605, - "cookies": false, - "type": "", - "demo": "project\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update project variable", - "operationId": "projectUpdateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "project" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 607, - "cookies": false, - "type": "", - "demo": "project\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>", - "x-nullable": true - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "default": null, - "x-example": false, - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete project variable", - "operationId": "projectDeleteVariable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "project" - ], - "description": "Delete a variable by its unique ID. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 606, - "cookies": false, - "type": "", - "demo": "project\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "variableId", - "description": "Variable ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "\/sites": { - "get": { - "summary": "List sites", - "operationId": "sitesList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all the project's sites. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Sites List", - "schema": { - "$ref": "#\/definitions\/siteList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "sites", - "weight": 476, - "cookies": false, - "type": "", - "demo": "sites\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create site", - "operationId": "sitesCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new site.", - "responses": { - "201": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "sites", - "weight": 474, - "cookies": false, - "type": "", - "demo": "sites\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "siteId": { - "type": "string", - "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<SITE_ID>" - }, - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "default": null, - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "default": true, - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "default": 30, - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "default": "", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "default": "", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "default": "", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "default": "", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "default": null, - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "default": "", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "default": "", - "x-example": "<FALLBACK_FILE>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "siteId", - "name", - "framework", - "buildRuntime" - ] - } - } - ] - } - }, - "\/sites\/frameworks": { - "get": { - "summary": "List frameworks", - "operationId": "sitesListFrameworks", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all frameworks that are currently available on the server instance.", - "responses": { - "200": { - "description": "Frameworks List", - "schema": { - "$ref": "#\/definitions\/frameworkList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFrameworks", - "group": "frameworks", - "weight": 479, - "cookies": false, - "type": "", - "demo": "sites\/list-frameworks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "sitesListSpecifications", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "List allowed site specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "schema": { - "$ref": "#\/definitions\/specificationList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "frameworks", - "weight": 502, - "cookies": false, - "type": "", - "demo": "sites\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/{siteId}": { - "get": { - "summary": "Get site", - "operationId": "sitesGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "sites", - "weight": 475, - "cookies": false, - "type": "", - "demo": "sites\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update site", - "operationId": "sitesUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Update site by its unique ID.", - "responses": { - "200": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "sites", - "weight": 477, - "cookies": false, - "type": "", - "demo": "sites\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "default": null, - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "default": true, - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "default": 30, - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "default": "", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "default": "", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "default": "", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "default": "", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "default": "", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "default": "", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "default": "", - "x-example": "<FALLBACK_FILE>" - }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "default": {}, - "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "name", - "framework" - ] - } - } - ] - }, - "delete": { - "summary": "Delete site", - "operationId": "sitesDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "sites" - ], - "description": "Delete a site by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "sites", - "weight": 478, - "cookies": false, - "type": "", - "demo": "sites\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployment": { - "patch": { - "summary": "Update site's deployment", - "operationId": "sitesUpdateSiteDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", - "responses": { - "200": { - "description": "Site", - "schema": { - "$ref": "#\/definitions\/site" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSiteDeployment", - "group": "sites", - "weight": 485, - "cookies": false, - "type": "", - "demo": "sites\/update-site-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments": { - "get": { - "summary": "List deployments", - "operationId": "sitesListDeployments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { - "$ref": "#\/definitions\/deploymentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDeployments", - "group": "deployments", - "weight": 484, - "cookies": false, - "type": "", - "demo": "sites\/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create deployment", - "operationId": "sitesCreateDeployment", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDeployment", - "group": "deployments", - "weight": 480, - "cookies": false, - "type": "upload", - "demo": "sites\/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": true, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "installCommand", - "description": "Install Commands.", - "required": false, - "type": "string", - "x-example": "<INSTALL_COMMAND>", - "in": "formData" - }, - { - "name": "buildCommand", - "description": "Build Commands.", - "required": false, - "type": "string", - "x-example": "<BUILD_COMMAND>", - "in": "formData" - }, - { - "name": "outputDirectory", - "description": "Output Directory.", - "required": false, - "type": "string", - "x-example": "<OUTPUT_DIRECTORY>", - "in": "formData" - }, - { - "name": "code", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "activate", - "description": "Automatically activate the deployment when it is finished building.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "formData" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "sitesCreateDuplicateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", - "weight": 488, - "cookies": false, - "type": "", - "demo": "sites\/create-duplicate-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "default": null, - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "sitesCreateTemplateDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", - "weight": 481, - "cookies": false, - "type": "", - "demo": "sites\/create-template-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "default": null, - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "default": null, - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to site code in the template repo.", - "default": null, - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "default": null, - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "sitesCreateVcsDeployment", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", - "responses": { - "202": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", - "weight": 482, - "cookies": false, - "type": "", - "demo": "sites\/create-vcs-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "default": null, - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "default": null, - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "sitesGetDeployment", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "weight": 483, - "cookies": false, - "type": "", - "demo": "sites\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "sitesDeleteDeployment", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "sites" - ], - "description": "Delete a site deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "weight": 486, - "cookies": false, - "type": "", - "demo": "sites\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { - "get": { - "summary": "Get deployment download", - "operationId": "sitesGetDeploymentDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "sites" - ], - "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", - "weight": 487, - "cookies": false, - "type": "location", - "demo": "sites\/get-deployment-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [], - "default": "source", - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "sitesUpdateDeploymentStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", - "responses": { - "200": { - "description": "Deployment", - "schema": { - "$ref": "#\/definitions\/deployment" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", - "weight": 489, - "cookies": false, - "type": "", - "demo": "sites\/update-deployment-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "<DEPLOYMENT_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/logs": { - "get": { - "summary": "List logs", - "operationId": "sitesListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all site logs. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Executions List", - "schema": { - "$ref": "#\/definitions\/executionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 491, - "cookies": false, - "type": "", - "demo": "sites\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/sites\/{siteId}\/logs\/{logId}": { - "get": { - "summary": "Get log", - "operationId": "sitesGetLog", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a site request log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { - "$ref": "#\/definitions\/execution" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getLog", - "group": "logs", - "weight": 490, - "cookies": false, - "type": "", - "demo": "sites\/get-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "type": "string", - "x-example": "<LOG_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete log", - "operationId": "sitesDeleteLog", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Delete a site log by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteLog", - "group": "logs", - "weight": 492, - "cookies": false, - "type": "", - "demo": "sites\/delete-log.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "log.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", - "required": true, - "type": "string", - "x-example": "<LOG_ID>", - "in": "path" - } - ] - } - }, - "\/sites\/{siteId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "sitesListVariables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a list of all variables of a specific site.", - "responses": { - "200": { - "description": "Variables List", - "schema": { - "$ref": "#\/definitions\/variableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listVariables", - "group": "variables", - "weight": 495, - "cookies": false, - "type": "", - "demo": "sites\/list-variables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - } - ] - }, - "post": { - "summary": "Create variable", - "operationId": "sitesCreateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", - "responses": { - "201": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVariable", - "group": "variables", - "weight": 493, - "cookies": false, - "type": "", - "demo": "sites\/create-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "key", - "value" - ] - } - } - ] - } - }, - "\/sites\/{siteId}\/variables\/{variableId}": { - "get": { - "summary": "Get variable", - "operationId": "sitesGetVariable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Get a variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getVariable", - "group": "variables", - "weight": 494, - "cookies": false, - "type": "", - "demo": "sites\/get-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update variable", - "operationId": "sitesUpdateVariable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "sites" - ], - "description": "Update variable by its unique ID.", - "responses": { - "200": { - "description": "Variable", - "schema": { - "$ref": "#\/definitions\/variable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVariable", - "group": "variables", - "weight": 496, - "cookies": false, - "type": "", - "demo": "sites\/update-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "default": null, - "x-example": "<KEY>" - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "default": null, - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "default": null, - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key" - ] - } - } - ] - }, - "delete": { - "summary": "Delete variable", - "operationId": "sitesDeleteVariable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "sites" - ], - "description": "Delete a variable by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteVariable", - "group": "variables", - "weight": 497, - "cookies": false, - "type": "", - "demo": "sites\/delete-variable.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "type": "string", - "x-example": "<SITE_ID>", - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", - "required": true, - "type": "string", - "x-example": "<VARIABLE_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Buckets List", - "schema": { - "$ref": "#\/definitions\/bucketList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listBuckets", - "group": "buckets", - "weight": 545, - "cookies": false, - "type": "", - "demo": "storage\/list-buckets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create bucket", - "operationId": "storageCreateBucket", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Create a new storage bucket.", - "responses": { - "201": { - "description": "Bucket", - "schema": { - "$ref": "#\/definitions\/bucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBucket", - "group": "buckets", - "weight": 543, - "cookies": false, - "type": "", - "demo": "storage\/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<BUCKET_ID>" - }, - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "default": true, - "x-example": false - } - }, - "required": [ - "bucketId", - "name" - ] - } - } - ] - } - }, - "\/storage\/buckets\/{bucketId}": { - "get": { - "summary": "Get bucket", - "operationId": "storageGetBucket", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "schema": { - "$ref": "#\/definitions\/bucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucket", - "group": "buckets", - "weight": 544, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update bucket", - "operationId": "storageUpdateBucket", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Update a storage bucket by its unique ID.", - "responses": { - "200": { - "description": "Bucket", - "schema": { - "$ref": "#\/definitions\/bucket" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBucket", - "group": "buckets", - "weight": 546, - "cookies": false, - "type": "", - "demo": "storage\/update-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB.", - "default": {}, - "x-example": 1, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", - "default": "none", - "x-example": "none", - "enum": [ - "none", - "gzip", - "zstd" - ], - "x-enum-name": null, - "x-enum-keys": [] - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete bucket", - "operationId": "storageDeleteBucket", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "storage" - ], - "description": "Delete a storage bucket by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteBucket", - "group": "buckets", - "weight": 547, - "cookies": false, - "type": "", - "demo": "storage\/delete-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Files List", - "schema": { - "$ref": "#\/definitions\/fileList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFiles", - "group": "files", - "weight": 550, - "cookies": false, - "type": "", - "demo": "storage\/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", - "consumes": [ - "multipart\/form-data" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFile", - "group": "files", - "weight": 548, - "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "x-upload-id": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "formData" - }, - { - "name": "file", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "permissions", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "x-example": "[\"read(\"any\")\"]", - "in": "formData" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "Get file", - "operationId": "storageGetFile", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFile", - "group": "files", - "weight": 549, - "cookies": false, - "type": "", - "demo": "storage\/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "storage" - ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "schema": { - "$ref": "#\/definitions\/file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFile", - "group": "files", - "weight": 551, - "cookies": false, - "type": "", - "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "storage" - ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "weight": 552, - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { - "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileDownload", - "group": "files", - "weight": 554, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", - "consumes": [], - "produces": [ - "image\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { - "description": "Image", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFilePreview", - "group": "files", - "weight": 553, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "type": "string", - "x-example": "center", - "enum": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "x-enum-name": "ImageGravity", - "x-enum-keys": [], - "default": "center", - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [], - "default": "", - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", - "consumes": [], - "produces": [ - "*\/*" - ], - "tags": [ - "storage" - ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { - "description": "File", - "schema": { - "type": "file" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getFileView", - "group": "files", - "weight": 555, - "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "type": "string", - "x-example": "<TOKEN>", - "default": "", - "in": "query" - } - ] - } - }, - "\/tablesdb": { - "get": { - "summary": "List databases", - "operationId": "tablesDBList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "tablesdb", - "weight": 265, - "cookies": false, - "type": "", - "demo": "tablesdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "tablesDBCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "tablesdb", - "weight": 261, - "cookies": false, - "type": "", - "demo": "tablesdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 332, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 328, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 329, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.read", - "rows.read" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 330, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 331, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 333, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "tablesDBGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tablesdb", - "weight": 262, - "cookies": false, - "type": "", - "demo": "tablesdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "tablesDBUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tablesdb", - "weight": 263, - "cookies": false, - "type": "", - "demo": "tablesdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "tablesDBDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tablesdb", - "weight": 264, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables": { - "get": { - "summary": "List tables", - "operationId": "tablesDBListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": "tables", - "weight": 272, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "tablesDBCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": "tables", - "weight": 268, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TABLE_ID>" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "columns": { - "type": "array", - "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "tableId", - "name" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "tablesDBGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": "tables", - "weight": 269, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "tablesDBUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": "tables", - "weight": 270, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete table", - "operationId": "tablesDBDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": "tables", - "weight": 271, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "tablesDBListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 277, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "tablesDBCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 278, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "tablesDBUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 279, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "tablesDBCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 280, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "tablesDBUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 281, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "tablesDBCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 282, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "tablesDBUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 283, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "tablesDBCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 284, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "tablesDBUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 285, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "tablesDBCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 286, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "tablesDBUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 287, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "tablesDBCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 288, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "tablesDBUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 289, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "tablesDBCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 290, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "tablesDBUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 291, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { - "post": { - "summary": "Create line column", - "operationId": "tablesDBCreateLineColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a geometric line column.", - "responses": { - "202": { - "description": "ColumnLine", - "schema": { - "$ref": "#\/definitions\/columnLine" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLineColumn", - "group": "columns", - "weight": 292, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { - "patch": { - "summary": "Update line column", - "operationId": "tablesDBUpdateLineColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a line column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnLine", - "schema": { - "$ref": "#\/definitions\/columnLine" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLineColumn", - "group": "columns", - "weight": 293, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-line-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "default": null, - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { - "post": { - "summary": "Create longtext column", - "operationId": "tablesDBCreateLongtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a longtext column.\n", - "responses": { - "202": { - "description": "ColumnLongtext", - "schema": { - "$ref": "#\/definitions\/columnLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createLongtextColumn", - "group": "columns", - "weight": 310, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { - "patch": { - "summary": "Update longtext column", - "operationId": "tablesDBUpdateLongtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnLongtext", - "schema": { - "$ref": "#\/definitions\/columnLongtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLongtextColumn", - "group": "columns", - "weight": 311, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-longtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { - "post": { - "summary": "Create mediumtext column", - "operationId": "tablesDBCreateMediumtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a mediumtext column.\n", - "responses": { - "202": { - "description": "ColumnMediumtext", - "schema": { - "$ref": "#\/definitions\/columnMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMediumtextColumn", - "group": "columns", - "weight": 308, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext column", - "operationId": "tablesDBUpdateMediumtextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnMediumtext", - "schema": { - "$ref": "#\/definitions\/columnMediumtext" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMediumtextColumn", - "group": "columns", - "weight": 309, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-mediumtext-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { - "post": { - "summary": "Create point column", - "operationId": "tablesDBCreatePointColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a geometric point column.", - "responses": { - "202": { - "description": "ColumnPoint", - "schema": { - "$ref": "#\/definitions\/columnPoint" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPointColumn", - "group": "columns", - "weight": 294, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { - "patch": { - "summary": "Update point column", - "operationId": "tablesDBUpdatePointColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a point column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPoint", - "schema": { - "$ref": "#\/definitions\/columnPoint" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePointColumn", - "group": "columns", - "weight": 295, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "default": null, - "x-example": "[1, 2]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { - "post": { - "summary": "Create polygon column", - "operationId": "tablesDBCreatePolygonColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a geometric polygon column.", - "responses": { - "202": { - "description": "ColumnPolygon", - "schema": { - "$ref": "#\/definitions\/columnPolygon" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPolygonColumn", - "group": "columns", - "weight": 296, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { - "patch": { - "summary": "Update polygon column", - "operationId": "tablesDBUpdatePolygonColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnPolygon", - "schema": { - "$ref": "#\/definitions\/columnPolygon" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePolygonColumn", - "group": "columns", - "weight": 297, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "default": null, - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "tablesDBCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 298, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "default": null, - "x-example": "<RELATED_TABLE_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "tablesDBCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 300, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", - "deprecated": { - "since": "1.9.0", - "replaceWith": "tablesDB.createTextColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for text columns, in number of characters.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "tablesDBUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 301, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { - "post": { - "summary": "Create text column", - "operationId": "tablesDBCreateTextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a text column.\n", - "responses": { - "202": { - "description": "ColumnText", - "schema": { - "$ref": "#\/definitions\/columnText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextColumn", - "group": "columns", - "weight": 306, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { - "patch": { - "summary": "Update text column", - "operationId": "tablesDBUpdateTextColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnText", - "schema": { - "$ref": "#\/definitions\/columnText" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTextColumn", - "group": "columns", - "weight": 307, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "tablesDBCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 302, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "tablesDBUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 303, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { - "post": { - "summary": "Create varchar column", - "operationId": "tablesDBCreateVarcharColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a varchar column.\n", - "responses": { - "202": { - "description": "ColumnVarchar", - "schema": { - "$ref": "#\/definitions\/columnVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createVarcharColumn", - "group": "columns", - "weight": 304, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { - "patch": { - "summary": "Update varchar column", - "operationId": "tablesDBUpdateVarcharColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnVarchar", - "schema": { - "$ref": "#\/definitions\/columnVarchar" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateVarcharColumn", - "group": "columns", - "weight": 305, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar column.", - "default": null, - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "tablesDBGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/columnBoolean", - "integer": "#\/definitions\/columnInteger", - "double": "#\/definitions\/columnFloat", - "string": "#\/definitions\/columnString", - "datetime": "#\/definitions\/columnDatetime", - "relationship": "#\/definitions\/columnRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/columnBoolean": { - "type": "boolean" - }, - "#\/definitions\/columnInteger": { - "type": "integer" - }, - "#\/definitions\/columnFloat": { - "type": "double" - }, - "#\/definitions\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/columnDatetime": { - "type": "datetime" - }, - "#\/definitions\/columnRelationship": { - "type": "relationship" - }, - "#\/definitions\/columnString": { - "type": "string" - } - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 275, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "tablesDBDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 276, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "tablesDBUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 299, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [], - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null, - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "tablesDBListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "List indexes on the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 315, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "tablesDBCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 312, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "TablesDBIndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "tablesDBGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 313, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "tablesDBDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 314, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 324, - "cookies": false, - "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 316, - "cookies": false, - "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - }, - { - "name": "createRows", - "namespace": "tablesDB", - "desc": "Create rows", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "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\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-rows.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<ROW_ID>" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "put": { - "summary": "Upsert rows", - "operationId": "tablesDBUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 321, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", - "methods": [ - { - "name": "upsertRows", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "demo": "tablesdb\/upsert-rows.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - }, - "required": [ - "rows" - ] - } - } - ] - }, - "patch": { - "summary": "Update rows", - "operationId": "tablesDBUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 319, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete rows", - "operationId": "tablesDBDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 323, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 317, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 320, - "cookies": false, - "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 318, - "cookies": false, - "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tablesDB" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 322, - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 327, - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 326, - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "<TABLE_ID>", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "<ROW_ID>", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/teams": { - "get": { - "summary": "List teams", - "operationId": "teamsList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", - "responses": { - "200": { - "description": "Teams List", - "schema": { - "$ref": "#\/definitions\/teamList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "teams", - "weight": 526, - "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "teams", - "weight": 524, - "cookies": false, - "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TEAM_ID>" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": [ - "owner" - ], - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } - ] - } - }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "teams", - "weight": 525, - "cookies": false, - "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Update the team's name by its unique ID.", - "responses": { - "200": { - "description": "Team", - "schema": { - "$ref": "#\/definitions\/team" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "teams", - "weight": 528, - "cookies": false, - "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "teams" - ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "teams", - "weight": 527, - "cookies": false, - "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#\/definitions\/membershipList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 533, - "cookies": false, - "type": "", - "demo": "teams\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", - "responses": { - "201": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMembership", - "group": "memberships", - "weight": 531, - "cookies": false, - "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "default": "", - "x-example": "<USER_ID>" - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "roles" - ] - } - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { - "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getMembership", - "group": "memberships", - "weight": 532, - "cookies": false, - "type": "", - "demo": "teams\/get-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembership", - "group": "memberships", - "weight": 534, - "cookies": false, - "type": "", - "demo": "teams\/update-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - ] - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "teams" - ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", - "weight": 535, - "cookies": false, - "type": "", - "demo": "teams\/delete-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - } - ] - } - }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { - "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "schema": { - "$ref": "#\/definitions\/membership" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", - "weight": 536, - "cookies": false, - "type": "", - "demo": "teams\/update-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "<MEMBERSHIP_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "default": null, - "x-example": "<SECRET>" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - ] - } - }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "teams", - "weight": 529, - "cookies": false, - "type": "", - "demo": "teams\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "teams" - ], - "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "teams", - "weight": 530, - "cookies": false, - "type": "", - "demo": "teams\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "<TEAM_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { - "get": { - "summary": "List tokens", - "operationId": "tokensList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Resource Tokens List", - "schema": { - "$ref": "#\/definitions\/resourceTokenList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "files", - "weight": 540, - "cookies": false, - "type": "", - "demo": "tokens\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create file token", - "operationId": "tokensCreateFileToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", - "responses": { - "201": { - "description": "ResourceToken", - "schema": { - "$ref": "#\/definitions\/resourceToken" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFileToken", - "group": "files", - "weight": 538, - "cookies": false, - "type": "", - "demo": "tokens\/create-file-token.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "<BUCKET_ID>", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "<FILE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "Token expiry date", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/tokens\/{tokenId}": { - "get": { - "summary": "Get token", - "operationId": "tokensGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "Get a token by its unique ID.", - "responses": { - "200": { - "description": "ResourceToken", - "schema": { - "$ref": "#\/definitions\/resourceToken" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "tokens", - "weight": 539, - "cookies": false, - "type": "", - "demo": "tokens\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "type": "string", - "x-example": "<TOKEN_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update token", - "operationId": "tokensUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "tokens" - ], - "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", - "responses": { - "200": { - "description": "ResourceToken", - "schema": { - "$ref": "#\/definitions\/resourceToken" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "tokens", - "weight": 541, - "cookies": false, - "type": "", - "demo": "tokens\/update.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token unique ID.", - "required": true, - "type": "string", - "x-example": "<TOKEN_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "File token expiry date", - "default": null, - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - ] - }, - "delete": { - "summary": "Delete token", - "operationId": "tokensDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "tokens" - ], - "description": "Delete a token by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tokens", - "weight": 542, - "cookies": false, - "type": "", - "demo": "tokens\/delete.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token ID.", - "required": true, - "type": "string", - "x-example": "<TOKEN_ID>", - "in": "path" - } - ] - } - }, - "\/users": { - "get": { - "summary": "List users", - "operationId": "usersList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Users List", - "schema": { - "$ref": "#\/definitions\/userList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "users", - "weight": 71, - "cookies": false, - "type": "", - "demo": "users\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user", - "operationId": "usersCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "users", - "weight": 62, - "cookies": false, - "type": "", - "demo": "users\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": null, - "x-example": "+12065550100", - "format": "phone", - "x-nullable": true - }, - "password": { - "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "default": "", - "x-example": null - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId" - ] - } - } - ] - } - }, - "\/users\/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createArgon2User", - "group": "users", - "weight": 65, - "cookies": false, - "type": "", - "demo": "users\/create-argon-2-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Argon2.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBcryptUser", - "group": "users", - "weight": 63, - "cookies": false, - "type": "", - "demo": "users\/create-bcrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Bcrypt.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/identities": { - "get": { - "summary": "List identities", - "operationId": "usersListIdentities", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get identities for all users.", - "responses": { - "200": { - "description": "Identities List", - "schema": { - "$ref": "#\/definitions\/identityList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIdentities", - "group": "identities", - "weight": 79, - "cookies": false, - "type": "", - "demo": "users\/list-identities.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/users\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete an identity by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", - "weight": 103, - "cookies": false, - "type": "", - "demo": "users\/delete-identity.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "identityId", - "description": "Identity ID.", - "required": true, - "type": "string", - "x-example": "<IDENTITY_ID>", - "in": "path" - } - ] - } - }, - "\/users\/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMD5User", - "group": "users", - "weight": 64, - "cookies": false, - "type": "", - "demo": "users\/create-md-5-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using MD5.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createPHPassUser", - "group": "users", - "weight": 67, - "cookies": false, - "type": "", - "demo": "users\/create-ph-pass-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using PHPass.", - "default": null, - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptUser", - "group": "users", - "weight": 68, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt.", - "default": null, - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Optional salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordCpu": { - "type": "integer", - "description": "Optional CPU cost used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "default": null, - "x-example": null, - "format": "int32" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" - ] - } - } - ] - } - }, - "\/users\/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createScryptModifiedUser", - "group": "users", - "weight": 69, - "cookies": false, - "type": "", - "demo": "users\/create-scrypt-modified-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "default": null, - "x-example": "password", - "format": "password" - }, - "passwordSalt": { - "type": "string", - "description": "Salt used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT>" - }, - "passwordSaltSeparator": { - "type": "string", - "description": "Salt separator used to hash password.", - "default": null, - "x-example": "<PASSWORD_SALT_SEPARATOR>" - }, - "passwordSignerKey": { - "type": "string", - "description": "Signer key used to hash password.", - "default": null, - "x-example": "<PASSWORD_SIGNER_KEY>" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } - ] - } - }, - "\/users\/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", - "responses": { - "201": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSHAUser", - "group": "users", - "weight": 66, - "cookies": false, - "type": "", - "demo": "users\/create-sha-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using SHA.", - "default": null, - "x-example": "password", - "format": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "default": "", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [] - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } - ] - } - }, - "\/users\/{userId}": { - "get": { - "summary": "Get user", - "operationId": "usersGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get a user by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "users", - "weight": 72, - "cookies": false, - "type": "", - "demo": "users\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user", - "operationId": "usersDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "users", - "weight": 101, - "cookies": false, - "type": "", - "demo": "users\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/email": { - "patch": { - "summary": "Update email", - "operationId": "usersUpdateEmail", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user email by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmail", - "group": "users", - "weight": 86, - "cookies": false, - "type": "", - "demo": "users\/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com", - "format": "email" - } - }, - "required": [ - "email" - ] - } - } - ] - } - }, - "\/users\/{userId}\/impersonator": { - "patch": { - "summary": "Update user impersonator capability", - "operationId": "usersUpdateImpersonator", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateImpersonator", - "group": "users", - "weight": 82, - "cookies": false, - "type": "", - "demo": "users\/update-impersonator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", - "default": null, - "x-example": false - } - }, - "required": [ - "impersonator" - ] - } - } - ] - } - }, - "\/users\/{userId}\/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", - "responses": { - "201": { - "description": "JWT", - "schema": { - "$ref": "#\/definitions\/jwt" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createJWT", - "group": "sessions", - "weight": 104, - "cookies": false, - "type": "", - "demo": "users\/create-jwt.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "default": "", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } - ] - } - }, - "\/users\/{userId}\/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": "users", - "weight": 81, - "cookies": false, - "type": "", - "demo": "users\/update-labels.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - ] - } - }, - "\/users\/{userId}\/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user 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": 77, - "cookies": false, - "type": "", - "demo": "users\/list-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/memberships": { - "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user membership list by its unique ID.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { - "$ref": "#\/definitions\/membershipList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "weight": 76, - "cookies": false, - "type": "", - "demo": "users\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - } - }, - "\/users\/{userId}\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Enable or disable MFA on a user account.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfa", - "group": "users", - "weight": 91, - "cookies": false, - "type": "", - "demo": "users\/update-mfa.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - }, - "methods": [ - { - "name": "updateMfa", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - } - }, - { - "name": "updateMFA", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "default": null, - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } - ] - } - }, - "\/users\/{userId}\/mfa\/authenticators\/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete an authenticator app.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", - "weight": 96, - "cookies": false, - "type": "", - "demo": "users\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [], - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "responses": { - "200": { - "description": "MFAFactors", - "schema": { - "$ref": "#\/definitions\/mfaFactors" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", - "weight": 92, - "cookies": false, - "type": "", - "demo": "users\/list-mfa-factors.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/mfa\/recovery-codes": { - "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", - "weight": 93, - "cookies": false, - "type": "", - "demo": "users\/get-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "usersUpdateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "responses": { - "200": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", - "weight": 95, - "cookies": false, - "type": "", - "demo": "users\/update-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "schema": { - "$ref": "#\/definitions\/mfaRecoveryCodes" - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", - "weight": 94, - "cookies": false, - "type": "", - "demo": "users\/create-mfa-recovery-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/name": { - "patch": { - "summary": "Update name", - "operationId": "usersUpdateName", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user name by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "users", - "weight": 84, - "cookies": false, - "type": "", - "demo": "users\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - } - }, - "required": [ - "name" - ] - } - } - ] - } - }, - "\/users\/{userId}\/password": { - "patch": { - "summary": "Update password", - "operationId": "usersUpdatePassword", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user password by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePassword", - "group": "users", - "weight": 85, - "cookies": false, - "type": "", - "demo": "users\/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": null - } - }, - "required": [ - "password" - ] - } - } - ] - } - }, - "\/users\/{userId}\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user phone by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhone", - "group": "users", - "weight": 87, - "cookies": false, - "type": "", - "demo": "users\/update-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "default": null, - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "number" - ] - } - } - ] - } - }, - "\/users\/{userId}\/prefs": { - "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPrefs", - "group": "users", - "weight": 73, - "cookies": false, - "type": "", - "demo": "users\/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user preferences", - "operationId": "usersUpdatePrefs", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { - "$ref": "#\/definitions\/preferences" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePrefs", - "group": "users", - "weight": 89, - "cookies": false, - "type": "", - "demo": "users\/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "prefs" - ] - } - } - ] - } - }, - "\/users\/{userId}\/sessions": { - "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { - "$ref": "#\/definitions\/sessionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSessions", - "group": "sessions", - "weight": 75, - "cookies": false, - "type": "", - "demo": "users\/list-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.read", - "sessions.read" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", - "responses": { - "201": { - "description": "Session", - "schema": { - "$ref": "#\/definitions\/session" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "weight": 97, - "cookies": false, - "type": "", - "demo": "users\/create-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user sessions", - "operationId": "usersDeleteSessions", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete all user's sessions by using the user's unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", - "weight": 100, - "cookies": false, - "type": "", - "demo": "users\/delete-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/sessions\/{sessionId}": { - "delete": { - "summary": "Delete user session", - "operationId": "usersDeleteSession", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete a user sessions by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSession", - "group": "sessions", - "weight": 99, - "cookies": false, - "type": "", - "demo": "users\/delete-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "type": "string", - "x-example": "<SESSION_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/status": { - "patch": { - "summary": "Update user status", - "operationId": "usersUpdateStatus", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStatus", - "group": "users", - "weight": 80, - "cookies": false, - "type": "", - "demo": "users\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", - "default": null, - "x-example": false - } - }, - "required": [ - "status" - ] - } - } - ] - } - }, - "\/users\/{userId}\/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "List the messaging targets that are associated with a user.", - "responses": { - "200": { - "description": "Target list", - "schema": { - "$ref": "#\/definitions\/targetList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTargets", - "group": "targets", - "weight": 78, - "cookies": false, - "type": "", - "demo": "users\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Create a messaging target.", - "responses": { - "201": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTarget", - "group": "targets", - "weight": 70, - "cookies": false, - "type": "", - "demo": "users\/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<TARGET_ID>" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "default": null, - "x-example": "email", - "enum": [ - "email", - "sms", - "push" - ], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": null, - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "targetId", - "providerType", - "identifier" - ] - } - } - ] - } - }, - "\/users\/{userId}\/targets\/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Get a user's push notification target by ID.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTarget", - "group": "targets", - "weight": 74, - "cookies": false, - "type": "", - "demo": "users\/get-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update a messaging target.", - "responses": { - "200": { - "description": "Target", - "schema": { - "$ref": "#\/definitions\/target" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTarget", - "group": "targets", - "weight": 90, - "cookies": false, - "type": "", - "demo": "users\/update-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": "", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "users" - ], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTarget", - "group": "targets", - "weight": 102, - "cookies": false, - "type": "", - "demo": "users\/delete-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "targetId", - "description": "Target ID.", - "required": true, - "type": "string", - "x-example": "<TARGET_ID>", - "in": "path" - } - ] - } - }, - "\/users\/{userId}\/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", - "responses": { - "201": { - "description": "Token", - "schema": { - "$ref": "#\/definitions\/token" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createToken", - "group": "sessions", - "weight": 98, - "cookies": false, - "type": "", - "demo": "users\/create-token.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "default": 6, - "x-example": 4, - "format": "int32" - }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "default": 900, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/users\/{userId}\/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailVerification", - "group": "users", - "weight": 88, - "cookies": false, - "type": "", - "demo": "users\/update-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "default": null, - "x-example": false - } - }, - "required": [ - "emailVerification" - ] - } - } - ] - } - }, - "\/users\/{userId}\/verification\/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "users" - ], - "description": "Update the user phone verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { - "$ref": "#\/definitions\/user" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updatePhoneVerification", - "group": "users", - "weight": 83, - "cookies": false, - "type": "", - "demo": "users\/update-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "<USER_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "default": null, - "x-example": false - } - }, - "required": [ - "phoneVerification" - ] - } - } - ] - } - }, - "\/vectorsdb": { - "get": { - "summary": "List databases", - "operationId": "vectorsDBList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Databases List", - "schema": { - "$ref": "#\/definitions\/databaseList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": "vectorsdb", - "weight": 372, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create database", - "operationId": "vectorsDBCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Database.\n", - "responses": { - "201": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": "vectorsdb", - "weight": 368, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<DATABASE_ID>" - }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "databaseId", - "name" - ] - } - } - ] - } - }, - "\/vectorsdb\/embeddings\/text": { - "post": { - "summary": "Create Text Embeddings", - "operationId": "vectorsDBCreateTextEmbeddings", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "200": { - "description": "Embedding list", - "schema": { - "$ref": "#\/definitions\/embeddingList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTextEmbeddings", - "group": "documents", - "weight": 394, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-text-embeddings.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createTextEmbeddings", - "namespace": "vectorsDB", - "desc": "Create Text Embedding", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "texts", - "model" - ], - "required": [ - "texts" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/embeddingList" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-text-embeddings.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "texts": { - "type": "array", - "description": "Array of text to generate embeddings.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "model": { - "type": "string", - "description": "The embedding model to use for generating vector embeddings.", - "default": "embeddinggemma", - "x-example": "embeddinggemma", - "enum": [ - "embeddinggemma" - ], - "x-enum-name": null, - "x-enum-keys": [] - } - }, - "required": [ - "texts" - ] - } - } - ] - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "schema": { - "$ref": "#\/definitions\/transactionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "weight": 399, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "weight": 395, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "weight": 396, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "weight": 397, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "weight": 398, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create multiple operations in a single transaction.", - "responses": { - "201": { - "description": "Transaction", - "schema": { - "$ref": "#\/definitions\/transaction" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOperations", - "group": "transactions", - "weight": 400, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "vectorsDBGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "vectorsdb", - "weight": 369, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update database", - "operationId": "vectorsDBUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a database by its unique ID.", - "responses": { - "200": { - "description": "Database", - "schema": { - "$ref": "#\/definitions\/database" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": "vectorsdb", - "weight": 370, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete database", - "operationId": "vectorsDBDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "vectorsdb", - "weight": 371, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "vectorsDBListCollections", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "VectorsDB Collections List", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollectionList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listCollections", - "group": "collections", - "weight": 379, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "<SEARCH>", - "default": "", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "vectorsDBCreateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "VectorsDB Collection", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createCollection", - "group": "collections", - "weight": 375, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<COLLECTION_ID>" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "collectionId", - "name", - "dimension" - ] - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "vectorsDBGetCollection", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "weight": 376, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "vectorsDBUpdateCollection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "VectorsDB Collection", - "schema": { - "$ref": "#\/definitions\/vectorsdbCollection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "weight": 377, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimensions.", - "default": null, - "x-example": 1, - "format": "int32" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete collection", - "operationId": "vectorsDBDeleteCollection", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "weight": 378, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDocuments", - "group": "documents", - "weight": 389, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "weight": 385, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "vectorsDB", - "desc": "Create documents", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<DOCUMENT_ID>" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "put": { - "summary": "Upsert documents", - "operationId": "vectorsDBUpsertDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", - "weight": 392, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "vectorsdb\/upsert-documents.md", - "public": true - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - ] - }, - "patch": { - "summary": "Update documents", - "operationId": "vectorsDBUpdateDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocuments", - "group": "documents", - "weight": 391, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete documents", - "operationId": "vectorsDBDeleteDocuments", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", - "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", - "weight": 393, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDocument", - "group": "documents", - "weight": 388, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "<TRANSACTION_ID>", - "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "weight": 387, - "cookies": false, - "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDocument", - "group": "documents", - "weight": 386, - "cookies": false, - "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "weight": 390, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "<DOCUMENT_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "default": null, - "x-example": "<TRANSACTION_ID>" - } - } - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "vectorsDBListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "schema": { - "$ref": "#\/definitions\/indexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 384, - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "vectorsDBCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "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`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 381, - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "hnsw_euclidean", - "enum": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ], - "x-enum-name": "VectorsDBIndexType", - "x-enum-keys": [] - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "vectorsDBGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "vectorsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/index" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 382, - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "vectorsDBDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "vectorsDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 383, - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "type": "string", - "x-example": "<COLLECTION_ID>", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/webhooks": { - "get": { - "summary": "List webhooks", - "operationId": "webhooksList", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Webhooks List", - "schema": { - "$ref": "#\/definitions\/webhookList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "weight": 573, - "cookies": false, - "type": "", - "demo": "webhooks\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } - ] - }, - "post": { - "summary": "Create webhook", - "operationId": "webhooksCreate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", - "responses": { - "201": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": null, - "weight": 572, - "cookies": false, - "type": "", - "demo": "webhooks\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "webhookId": { - "type": "string", - "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "<WEBHOOK_ID>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "default": null, - "x-example": null - }, - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": false, - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_PASSWORD>" - }, - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - } - }, - "required": [ - "webhookId", - "url", - "name", - "events" - ] - } - } - ] - } - }, - "\/webhooks\/{webhookId}": { - "get": { - "summary": "Get webhook", - "operationId": "webhooksGet", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "weight": 574, - "cookies": false, - "type": "", - "demo": "webhooks\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - } - ] - }, - "put": { - "summary": "Update webhook", - "operationId": "webhooksUpdate", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": null, - "weight": 576, - "cookies": false, - "type": "", - "demo": "webhooks\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "default": null, - "x-example": "<NAME>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "default": null, - "x-example": null - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": false, - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_PASSWORD>" - } - }, - "required": [ - "name", - "url", - "events" - ] - } - } - ] - }, - "delete": { - "summary": "Delete webhook", - "operationId": "webhooksDelete", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "webhooks" - ], - "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "weight": 575, - "cookies": false, - "type": "", - "demo": "webhooks\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - } - ] - } - }, - "\/webhooks\/{webhookId}\/secret": { - "patch": { - "summary": "Update webhook secret key", - "operationId": "webhooksUpdateSecret", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "webhooks" - ], - "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", - "responses": { - "200": { - "description": "Webhook", - "schema": { - "$ref": "#\/definitions\/webhook" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSecret", - "group": null, - "weight": 577, - "cookies": false, - "type": "", - "demo": "webhooks\/update-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "type": "string", - "x-example": "<WEBHOOK_ID>", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "default": null, - "x-example": "<SECRET>", - "x-nullable": true - } - } - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - } - ], - "definitions": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] - }, - "rowList": { - "description": "Rows List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of rows that matched your query.", - "x-example": 5, - "format": "int32" - }, - "rows": { - "type": "array", - "description": "List of rows.", - "items": { - "type": "object", - "$ref": "#\/definitions\/row" - }, - "x-example": "" - } - }, - "required": [ - "total", - "rows" - ], - "example": { - "total": 5, - "rows": "" - } - }, - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/document" - }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, - "format": "int32" - }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "type": "object", - "$ref": "#\/definitions\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "tableList": { - "description": "Tables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tables": { - "type": "array", - "description": "List of tables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/table" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tables" - ], - "example": { - "total": 5, - "tables": "" - } - }, - "collectionList": { - "description": "Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "type": "object", - "$ref": "#\/definitions\/collection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "databaseList": { - "description": "Databases List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of databases that matched your query.", - "x-example": 5, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "type": "object", - "$ref": "#\/definitions\/database" - }, - "x-example": "" - } - }, - "required": [ - "total", - "databases" - ], - "example": { - "total": 5, - "databases": "" - } - }, - "indexList": { - "description": "Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/index" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "columnIndexList": { - "description": "Column Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/columnIndex" - }, - "x-example": "" - } - }, - "required": [ - "total", - "indexes" - ], - "example": { - "total": 5, - "indexes": "" - } - }, - "userList": { - "description": "Users List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of users that matched your query.", - "x-example": 5, - "format": "int32" - }, - "users": { - "type": "array", - "description": "List of users.", - "items": { - "type": "object", - "$ref": "#\/definitions\/user" - }, - "x-example": "" - } - }, - "required": [ - "total", - "users" - ], - "example": { - "total": 5, - "users": "" - } - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/session" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sessions" - ], - "example": { - "total": 5, - "sessions": "" - } - }, - "identityList": { - "description": "Identities List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" - }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "type": "object", - "$ref": "#\/definitions\/identity" - }, - "x-example": "" - } - }, - "required": [ - "total", - "identities" - ], - "example": { - "total": 5, - "identities": "" - } - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { - "type": "object", - "$ref": "#\/definitions\/log" - }, - "x-example": "" - } - }, - "required": [ - "total", - "logs" - ], - "example": { - "total": 5, - "logs": "" - } - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "type": "object", - "$ref": "#\/definitions\/file" - }, - "x-example": "" - } - }, - "required": [ - "total", - "files" - ], - "example": { - "total": 5, - "files": "" - } - }, - "bucketList": { - "description": "Buckets List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { - "type": "object", - "$ref": "#\/definitions\/bucket" - }, - "x-example": "" - } - }, - "required": [ - "total", - "buckets" - ], - "example": { - "total": 5, - "buckets": "" - } - }, - "resourceTokenList": { - "description": "Resource Tokens List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of tokens that matched your query.", - "x-example": 5, - "format": "int32" - }, - "tokens": { - "type": "array", - "description": "List of tokens.", - "items": { - "type": "object", - "$ref": "#\/definitions\/resourceToken" - }, - "x-example": "" - } - }, - "required": [ - "total", - "tokens" - ], - "example": { - "total": 5, - "tokens": "" - } - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "type": "object", - "$ref": "#\/definitions\/team" - }, - "x-example": "" - } - }, - "required": [ - "total", - "teams" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { - "type": "object", - "$ref": "#\/definitions\/membership" - }, - "x-example": "" - } - }, - "required": [ - "total", - "memberships" - ], - "example": { - "total": 5, - "memberships": "" - } - }, - "siteList": { - "description": "Sites List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sites that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "List of sites.", - "items": { - "type": "object", - "$ref": "#\/definitions\/site" - }, - "x-example": "" - } - }, - "required": [ - "total", - "sites" - ], - "example": { - "total": 5, - "sites": "" - } - }, - "functionList": { - "description": "Functions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of functions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "List of functions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/function" - }, - "x-example": "" - } - }, - "required": [ - "total", - "functions" - ], - "example": { - "total": 5, - "functions": "" - } - }, - "frameworkList": { - "description": "Frameworks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of frameworks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "frameworks": { - "type": "array", - "description": "List of frameworks.", - "items": { - "type": "object", - "$ref": "#\/definitions\/framework" - }, - "x-example": "" - } - }, - "required": [ - "total", - "frameworks" - ], - "example": { - "total": 5, - "frameworks": "" - } - }, - "runtimeList": { - "description": "Runtimes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/runtime" - }, - "x-example": "" - } - }, - "required": [ - "total", - "runtimes" - ], - "example": { - "total": 5, - "runtimes": "" - } - }, - "deploymentList": { - "description": "Deployments List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments that matched your query.", - "x-example": 5, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { - "type": "object", - "$ref": "#\/definitions\/deployment" - }, - "x-example": "" - } - }, - "required": [ - "total", - "deployments" - ], - "example": { - "total": 5, - "deployments": "" - } - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/execution" - }, - "x-example": "" - } - }, - "required": [ - "total", - "executions" - ], - "example": { - "total": 5, - "executions": "" - } - }, - "webhookList": { - "description": "Webhooks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of webhooks that matched your query.", - "x-example": 5, - "format": "int32" - }, - "webhooks": { - "type": "array", - "description": "List of webhooks.", - "items": { - "type": "object", - "$ref": "#\/definitions\/webhook" - }, - "x-example": "" - } - }, - "required": [ - "total", - "webhooks" - ], - "example": { - "total": 5, - "webhooks": "" - } - }, - "keyList": { - "description": "API Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of keys that matched your query.", - "x-example": 5, - "format": "int32" - }, - "keys": { - "type": "array", - "description": "List of keys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/key" - }, - "x-example": "" - } - }, - "required": [ - "total", - "keys" - ], - "example": { - "total": 5, - "keys": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "type": "object", - "$ref": "#\/definitions\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "type": "object", - "$ref": "#\/definitions\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "type": "object", - "$ref": "#\/definitions\/language" - }, - "x-example": "" - } - }, - "required": [ - "total", - "languages" - ], - "example": { - "total": 5, - "languages": "" - } - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "type": "object", - "$ref": "#\/definitions\/currency" - }, - "x-example": "" - } - }, - "required": [ - "total", - "currencies" - ], - "example": { - "total": 5, - "currencies": "" - } - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "type": "object", - "$ref": "#\/definitions\/phone" - }, - "x-example": "" - } - }, - "required": [ - "total", - "phones" - ], - "example": { - "total": 5, - "phones": "" - } - }, - "variableList": { - "description": "Variables List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of variables that matched your query.", - "x-example": 5, - "format": "int32" - }, - "variables": { - "type": "array", - "description": "List of variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/variable" - }, - "x-example": "" - } - }, - "required": [ - "total", - "variables" - ], - "example": { - "total": 5, - "variables": "" - } - }, - "mockNumberList": { - "description": "Mock Numbers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of mockNumbers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "mockNumbers": { - "type": "array", - "description": "List of mockNumbers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/mockNumber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "mockNumbers" - ], - "example": { - "total": 5, - "mockNumbers": "" - } - }, - "policyList": { - "description": "Policies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of policies in the given project.", - "x-example": 9, - "format": "int32" - }, - "policies": { - "type": "array", - "description": "List of policies.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/policyPasswordDictionary" - }, - { - "$ref": "#\/definitions\/policyPasswordHistory" - }, - { - "$ref": "#\/definitions\/policyPasswordPersonalData" - }, - { - "$ref": "#\/definitions\/policySessionAlert" - }, - { - "$ref": "#\/definitions\/policySessionDuration" - }, - { - "$ref": "#\/definitions\/policySessionInvalidation" - }, - { - "$ref": "#\/definitions\/policySessionLimit" - }, - { - "$ref": "#\/definitions\/policyUserLimit" - }, - { - "$ref": "#\/definitions\/policyMembershipPrivacy" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/definitions\/policyPasswordDictionary", - "password-history": "#\/definitions\/policyPasswordHistory", - "password-personal-data": "#\/definitions\/policyPasswordPersonalData", - "session-alert": "#\/definitions\/policySessionAlert", - "session-duration": "#\/definitions\/policySessionDuration", - "session-invalidation": "#\/definitions\/policySessionInvalidation", - "session-limit": "#\/definitions\/policySessionLimit", - "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "policies" - ], - "example": { - "total": 9, - "policies": "" - } - }, - "emailTemplateList": { - "description": "Email Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" - }, - "templates": { - "type": "array", - "description": "List of templates.", - "items": { - "type": "object", - "$ref": "#\/definitions\/emailTemplate" - }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "healthStatusList": { - "description": "Status List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of statuses that matched your query.", - "x-example": 5, - "format": "int32" - }, - "statuses": { - "type": "array", - "description": "List of statuses.", - "items": { - "type": "object", - "$ref": "#\/definitions\/healthStatus" - }, - "x-example": "" - } - }, - "required": [ - "total", - "statuses" - ], - "example": { - "total": 5, - "statuses": "" - } - }, - "localeCodeList": { - "description": "Locale codes list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/localeCode" - }, - "x-example": "" - } - }, - "required": [ - "total", - "localeCodes" - ], - "example": { - "total": 5, - "localeCodes": "" - } - }, - "providerList": { - "description": "Provider list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of providers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "messageList": { - "description": "Message list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of messages that matched your query.", - "x-example": 5, - "format": "int32" - }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "type": "object", - "$ref": "#\/definitions\/message" - }, - "x-example": "" - } - }, - "required": [ - "total", - "messages" - ], - "example": { - "total": 5, - "messages": "" - } - }, - "topicList": { - "description": "Topic list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of topics that matched your query.", - "x-example": 5, - "format": "int32" - }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "type": "object", - "$ref": "#\/definitions\/topic" - }, - "x-example": "" - } - }, - "required": [ - "total", - "topics" - ], - "example": { - "total": 5, - "topics": "" - } - }, - "subscriberList": { - "description": "Subscriber list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers that matched your query.", - "x-example": 5, - "format": "int32" - }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/subscriber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "subscribers" - ], - "example": { - "total": 5, - "subscribers": "" - } - }, - "targetList": { - "description": "Target list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of targets that matched your query.", - "x-example": 5, - "format": "int32" - }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - }, - "x-example": "" - } - }, - "required": [ - "total", - "targets" - ], - "example": { - "total": 5, - "targets": "" - } - }, - "transactionList": { - "description": "Transaction List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "type": "object", - "$ref": "#\/definitions\/transaction" - }, - "x-example": "" - } - }, - "required": [ - "total", - "transactions" - ], - "example": { - "total": 5, - "transactions": "" - } - }, - "specificationList": { - "description": "Specifications List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications that matched your query.", - "x-example": 5, - "format": "int32" - }, - "specifications": { - "type": "array", - "description": "List of specifications.", - "items": { - "type": "object", - "$ref": "#\/definitions\/specification" - }, - "x-example": "" - } - }, - "required": [ - "total", - "specifications" - ], - "example": { - "total": 5, - "specifications": "" - } - }, - "vectorsdbCollectionList": { - "description": "VectorsDB Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "type": "object", - "$ref": "#\/definitions\/vectorsdbCollection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "collections" - ], - "example": { - "total": 5, - "collections": "" - } - }, - "embeddingList": { - "description": "Embedding list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of embeddings that matched your query.", - "x-example": 5, - "format": "int32" - }, - "embeddings": { - "type": "array", - "description": "List of embeddings.", - "items": { - "type": "object", - "$ref": "#\/definitions\/embedding" - }, - "x-example": "" - } - }, - "required": [ - "total", - "embeddings" - ], - "example": { - "total": 5, - "embeddings": "" - } - }, - "database": { - "description": "Database", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database name.", - "x-example": "My Database" - }, - "$createdAt": { - "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "enabled": { - "type": "boolean", - "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "type": { - "type": "string", - "description": "Database type.", - "x-example": "legacy", - "enum": [ - "legacy", - "tablesdb", - "documentsdb", - "vectorsdb" - ] - } - }, - "required": [ - "$id", - "name", - "$createdAt", - "$updatedAt", - "enabled", - "type" - ], - "example": { - "$id": "5e5ea5c16897e", - "name": "My Database", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "enabled": false, - "type": "legacy" - } - }, - "embedding": { - "description": "Embedding", - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" - }, - "dimension": { - "type": "integer", - "description": "Number of dimensions for each embedding vector.", - "x-example": 768, - "format": "int32" - }, - "embedding": { - "type": "array", - "description": "Embedding vector values. If an error occurs, this will be an empty array.", - "items": { - "type": "number", - "format": "double" - }, - "x-example": [ - 0.01, - 0.02, - 0.03 - ] - }, - "error": { - "type": "string", - "description": "Error message if embedding generation fails. Empty string if no error.", - "x-example": "Error message" - } - }, - "required": [ - "model", - "dimension", - "embedding", - "error" - ], - "example": { - "model": "embeddinggemma", - "dimension": 768, - "embedding": [ - 0.01, - 0.02, - 0.03 - ], - "error": "Error message" - } - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/attributeBoolean" - }, - { - "$ref": "#\/definitions\/attributeInteger" - }, - { - "$ref": "#\/definitions\/attributeFloat" - }, - { - "$ref": "#\/definitions\/attributeEmail" - }, - { - "$ref": "#\/definitions\/attributeEnum" - }, - { - "$ref": "#\/definitions\/attributeUrl" - }, - { - "$ref": "#\/definitions\/attributeIp" - }, - { - "$ref": "#\/definitions\/attributeDatetime" - }, - { - "$ref": "#\/definitions\/attributeRelationship" - }, - { - "$ref": "#\/definitions\/attributePoint" - }, - { - "$ref": "#\/definitions\/attributeLine" - }, - { - "$ref": "#\/definitions\/attributePolygon" - }, - { - "$ref": "#\/definitions\/attributeVarchar" - }, - { - "$ref": "#\/definitions\/attributeText" - }, - { - "$ref": "#\/definitions\/attributeMediumtext" - }, - { - "$ref": "#\/definitions\/attributeLongtext" - }, - { - "$ref": "#\/definitions\/attributeString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/attributeBoolean", - "integer": "#\/definitions\/attributeInteger", - "double": "#\/definitions\/attributeFloat", - "string": "#\/definitions\/attributeString", - "datetime": "#\/definitions\/attributeDatetime", - "relationship": "#\/definitions\/attributeRelationship", - "point": "#\/definitions\/attributePoint", - "linestring": "#\/definitions\/attributeLine", - "polygon": "#\/definitions\/attributePolygon", - "varchar": "#\/definitions\/attributeVarchar", - "text": "#\/definitions\/attributeText", - "mediumtext": "#\/definitions\/attributeMediumtext", - "longtext": "#\/definitions\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/attributeBoolean": { - "type": "boolean" - }, - "#\/definitions\/attributeInteger": { - "type": "integer" - }, - "#\/definitions\/attributeFloat": { - "type": "double" - }, - "#\/definitions\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/attributeDatetime": { - "type": "datetime" - }, - "#\/definitions\/attributeRelationship": { - "type": "relationship" - }, - "#\/definitions\/attributePoint": { - "type": "point" - }, - "#\/definitions\/attributeLine": { - "type": "linestring" - }, - "#\/definitions\/attributePolygon": { - "type": "polygon" - }, - "#\/definitions\/attributeVarchar": { - "type": "varchar" - }, - "#\/definitions\/attributeText": { - "type": "text" - }, - "#\/definitions\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/attributeLongtext": { - "type": "longtext" - }, - "#\/definitions\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "attributeList": { - "description": "Attributes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" - }, - "attributes": { - "type": "array", - "description": "List of attributes.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/attributeBoolean" - }, - { - "$ref": "#\/definitions\/attributeInteger" - }, - { - "$ref": "#\/definitions\/attributeFloat" - }, - { - "$ref": "#\/definitions\/attributeEmail" - }, - { - "$ref": "#\/definitions\/attributeEnum" - }, - { - "$ref": "#\/definitions\/attributeUrl" - }, - { - "$ref": "#\/definitions\/attributeIp" - }, - { - "$ref": "#\/definitions\/attributeDatetime" - }, - { - "$ref": "#\/definitions\/attributeRelationship" - }, - { - "$ref": "#\/definitions\/attributePoint" - }, - { - "$ref": "#\/definitions\/attributeLine" - }, - { - "$ref": "#\/definitions\/attributePolygon" - }, - { - "$ref": "#\/definitions\/attributeVarchar" - }, - { - "$ref": "#\/definitions\/attributeText" - }, - { - "$ref": "#\/definitions\/attributeMediumtext" - }, - { - "$ref": "#\/definitions\/attributeLongtext" - }, - { - "$ref": "#\/definitions\/attributeString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/attributeBoolean", - "integer": "#\/definitions\/attributeInteger", - "double": "#\/definitions\/attributeFloat", - "string": "#\/definitions\/attributeString", - "datetime": "#\/definitions\/attributeDatetime", - "relationship": "#\/definitions\/attributeRelationship", - "point": "#\/definitions\/attributePoint", - "linestring": "#\/definitions\/attributeLine", - "polygon": "#\/definitions\/attributePolygon", - "varchar": "#\/definitions\/attributeVarchar", - "text": "#\/definitions\/attributeText", - "mediumtext": "#\/definitions\/attributeMediumtext", - "longtext": "#\/definitions\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/attributeBoolean": { - "type": "boolean" - }, - "#\/definitions\/attributeInteger": { - "type": "integer" - }, - "#\/definitions\/attributeFloat": { - "type": "double" - }, - "#\/definitions\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/attributeDatetime": { - "type": "datetime" - }, - "#\/definitions\/attributeRelationship": { - "type": "relationship" - }, - "#\/definitions\/attributePoint": { - "type": "point" - }, - "#\/definitions\/attributeLine": { - "type": "linestring" - }, - "#\/definitions\/attributePolygon": { - "type": "polygon" - }, - "#\/definitions\/attributeVarchar": { - "type": "varchar" - }, - "#\/definitions\/attributeText": { - "type": "text" - }, - "#\/definitions\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/attributeLongtext": { - "type": "longtext" - }, - "#\/definitions\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "attributes" - ], - "example": { - "total": 5, - "attributes": "" - } - }, - "attributeString": { - "description": "AttributeString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeInteger": { - "description": "AttributeInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "attributeFloat": { - "description": "AttributeFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "attributeBoolean": { - "description": "AttributeBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "attributeEmail": { - "description": "AttributeEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "attributeEnum": { - "description": "AttributeEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "attributeIp": { - "description": "AttributeIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "192.0.2.0", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "attributeUrl": { - "description": "AttributeURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http:\/\/example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "http:\/\/example.com" - } - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeRelationship": { - "description": "AttributeRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedCollection": "collection", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "attributePoint": { - "description": "AttributePoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - 0, - 0 - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "attributeLine": { - "description": "AttributeLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "attributePolygon": { - "description": "AttributePolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "attributeVarchar": { - "description": "AttributeVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "attributeText": { - "description": "AttributeText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeMediumtext": { - "description": "AttributeMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeLongtext": { - "description": "AttributeLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "vectorsdbCollection": { - "description": "VectorsDB Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Collection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Collection update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/attributeObject" - }, - { - "$ref": "#\/definitions\/attributeVector" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "object": "#\/definitions\/attributeObject", - "vector": "#\/definitions\/attributeVector" - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/index" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed", - "dimension" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500, - "dimension": 1536 - } - }, - "attributeObject": { - "description": "AttributeObject", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "attributeVector": { - "description": "AttributeVector", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Vector dimensions.", - "x-example": 1536, - "format": "int32" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 1536 - } - }, - "table": { - "description": "Table", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Table creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Table update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Table name.", - "x-example": "My Table" - }, - "enabled": { - "type": "boolean", - "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "rowSecurity": { - "type": "boolean", - "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "columns": { - "type": "array", - "description": "Table columns.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnPoint" - }, - { - "$ref": "#\/definitions\/columnLine" - }, - { - "$ref": "#\/definitions\/columnPolygon" - }, - { - "$ref": "#\/definitions\/columnVarchar" - }, - { - "$ref": "#\/definitions\/columnText" - }, - { - "$ref": "#\/definitions\/columnMediumtext" - }, - { - "$ref": "#\/definitions\/columnLongtext" - }, - { - "$ref": "#\/definitions\/columnString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/columnBoolean", - "integer": "#\/definitions\/columnInteger", - "double": "#\/definitions\/columnFloat", - "string": "#\/definitions\/columnString", - "datetime": "#\/definitions\/columnDatetime", - "relationship": "#\/definitions\/columnRelationship", - "point": "#\/definitions\/columnPoint", - "linestring": "#\/definitions\/columnLine", - "polygon": "#\/definitions\/columnPolygon", - "varchar": "#\/definitions\/columnVarchar", - "text": "#\/definitions\/columnText", - "mediumtext": "#\/definitions\/columnMediumtext", - "longtext": "#\/definitions\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/columnBoolean": { - "type": "boolean" - }, - "#\/definitions\/columnInteger": { - "type": "integer" - }, - "#\/definitions\/columnFloat": { - "type": "double" - }, - "#\/definitions\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/columnDatetime": { - "type": "datetime" - }, - "#\/definitions\/columnRelationship": { - "type": "relationship" - }, - "#\/definitions\/columnPoint": { - "type": "point" - }, - "#\/definitions\/columnLine": { - "type": "linestring" - }, - "#\/definitions\/columnPolygon": { - "type": "polygon" - }, - "#\/definitions\/columnVarchar": { - "type": "varchar" - }, - "#\/definitions\/columnText": { - "type": "text" - }, - "#\/definitions\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/columnLongtext": { - "type": "longtext" - }, - "#\/definitions\/columnString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Table indexes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/columnIndex" - }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum row size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used row size in bytes based on defined columns.", - "x-example": 1500, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "rowSecurity", - "columns", - "indexes", - "bytesMax", - "bytesUsed" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Table", - "enabled": false, - "rowSecurity": true, - "columns": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 - } - }, - "columnList": { - "description": "Columns List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of columns in the given table.", - "x-example": 5, - "format": "int32" - }, - "columns": { - "type": "array", - "description": "List of columns.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnPoint" - }, - { - "$ref": "#\/definitions\/columnLine" - }, - { - "$ref": "#\/definitions\/columnPolygon" - }, - { - "$ref": "#\/definitions\/columnVarchar" - }, - { - "$ref": "#\/definitions\/columnText" - }, - { - "$ref": "#\/definitions\/columnMediumtext" - }, - { - "$ref": "#\/definitions\/columnLongtext" - }, - { - "$ref": "#\/definitions\/columnString" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/definitions\/columnBoolean", - "integer": "#\/definitions\/columnInteger", - "double": "#\/definitions\/columnFloat", - "string": "#\/definitions\/columnString", - "datetime": "#\/definitions\/columnDatetime", - "relationship": "#\/definitions\/columnRelationship", - "point": "#\/definitions\/columnPoint", - "linestring": "#\/definitions\/columnLine", - "polygon": "#\/definitions\/columnPolygon", - "varchar": "#\/definitions\/columnVarchar", - "text": "#\/definitions\/columnText", - "mediumtext": "#\/definitions\/columnMediumtext", - "longtext": "#\/definitions\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/definitions\/columnBoolean": { - "type": "boolean" - }, - "#\/definitions\/columnInteger": { - "type": "integer" - }, - "#\/definitions\/columnFloat": { - "type": "double" - }, - "#\/definitions\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/definitions\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/definitions\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/definitions\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/definitions\/columnDatetime": { - "type": "datetime" - }, - "#\/definitions\/columnRelationship": { - "type": "relationship" - }, - "#\/definitions\/columnPoint": { - "type": "point" - }, - "#\/definitions\/columnLine": { - "type": "linestring" - }, - "#\/definitions\/columnPolygon": { - "type": "polygon" - }, - "#\/definitions\/columnVarchar": { - "type": "varchar" - }, - "#\/definitions\/columnText": { - "type": "text" - }, - "#\/definitions\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/definitions\/columnLongtext": { - "type": "longtext" - }, - "#\/definitions\/columnString": { - "type": "string" - } - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "columns" - ], - "example": { - "total": 5, - "columns": "" - } - }, - "columnString": { - "description": "ColumnString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnInteger": { - "description": "ColumnInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "count" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "integer" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 10, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "columnFloat": { - "description": "ColumnFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "percentageCompleted" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "double" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 2.5, - "format": "double", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "columnBoolean": { - "description": "ColumnBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "isEnabled" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "boolean" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "columnEmail": { - "description": "ColumnEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "userEmail" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default@example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" - } - }, - "columnEnum": { - "description": "ColumnEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "status" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { - "type": "string" - }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "element", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" - ], - "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" - } - }, - "columnIp": { - "description": "ColumnIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "192.0.2.0", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" - } - }, - "columnUrl": { - "description": "ColumnURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "https:\/\/example.com" - } - }, - "columnDatetime": { - "description": "ColumnDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "birthDay" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "datetime" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "columnRelationship": { - "description": "ColumnRelationship", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedTable": { - "type": "string", - "description": "The ID of the related table.", - "x-example": "table" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { - "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedTable", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedTable": "table", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" - } - }, - "columnPoint": { - "description": "ColumnPoint", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - 0, - 0 - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] - } - }, - "columnLine": { - "description": "ColumnLine", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] - } - }, - "columnPolygon": { - "description": "ColumnPolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "columnVarchar": { - "description": "ColumnVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false - } - }, - "columnText": { - "description": "ColumnText", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnMediumtext": { - "description": "ColumnMediumtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "columnLongtext": { - "description": "ColumnLongtext", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "x-nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "index": { - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ] - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index attributes length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "attributes", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "attributes": [], - "lengths": [], - "orders": [] - } - }, - "columnIndex": { - "description": "Index", - "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.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" - }, - "columns": { - "type": "array", - "description": "Index columns.", - "items": { - "type": "string" - }, - "x-example": [] - }, - "lengths": { - "type": "array", - "description": "Index columns length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "type", - "status", - "error", - "columns", - "lengths" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "columns": [], - "lengths": [], - "orders": [] - } - }, - "row": { - "description": "Row", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { - "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] - } - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$collectionId": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - } - }, - "additionalProperties": true, - "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false - } - }, - "presence": { - "description": "Presence", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Presence sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$createdAt": { - "type": "string", - "description": "Presence creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Presence update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userInternalId": { - "type": "string", - "description": "User internal ID.", - "x-example": "1" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "x-nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", - "required": [ - "$id", - "$sequence", - "$createdAt", - "$updatedAt", - "$permissions", - "userInternalId", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userInternalId": "1", - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ], - "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" - } - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { - "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "x-nullable": true - }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "x-nullable": true - }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "items": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/algoArgon2" - }, - { - "$ref": "#\/definitions\/algoScrypt" - }, - { - "$ref": "#\/definitions\/algoScryptModified" - }, - { - "$ref": "#\/definitions\/algoBcrypt" - }, - { - "$ref": "#\/definitions\/algoPhpass" - }, - { - "$ref": "#\/definitions\/algoSha" - }, - { - "$ref": "#\/definitions\/algoMd5" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/definitions\/algoArgon2", - "scrypt": "#\/definitions\/algoScrypt", - "scryptMod": "#\/definitions\/algoScryptModified", - "bcrypt": "#\/definitions\/algoBcrypt", - "phpass": "#\/definitions\/algoPhpass", - "sha": "#\/definitions\/algoSha", - "md5": "#\/definitions\/algoMd5" - } - } - }, - "x-nullable": true - }, - "registration": { - "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "labels": { - "type": "array", - "description": "Labels for the user.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "passwordUpdate": { - "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/preferences" - } - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - }, - "x-example": [] - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "x-nullable": true - }, - "impersonatorUserId": { - "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" - } - }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "x-example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "identity": { - "description": "Identity", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Identity ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Identity creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Identity update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "provider": { - "type": "string", - "description": "Identity Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { - "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - } - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "phrase": { - "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" - } - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": [ - "jwt" - ], - "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the European Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ], - "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" - } - }, - "localeCode": { - "description": "LocaleCode", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" - }, - "name": { - "type": "string", - "description": "Locale name", - "x-example": "US" - } - }, - "required": [ - "code", - "name" - ], - "example": { - "code": "en-us", - "name": "US" - } - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true - }, - "compression": { - "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - } - }, - "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" - ], - "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" - } - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { - "type": "string" - }, - "x-example": [ - "jpg", - "png" - ] - }, - "compression": { - "type": "string", - "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - }, - "transformations": { - "type": "boolean", - "description": "Image transformations are enabled.", - "x-example": false - }, - "totalSize": { - "type": "integer", - "description": "Total size of this bucket in bytes.", - "x-example": 128, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus", - "transformations", - "totalSize" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "fileSecurity": true, - "name": "Documents", - "enabled": false, - "maximumFileSize": 100, - "allowedFileExtensions": [ - "jpg", - "png" - ], - "compression": "gzip", - "encryption": false, - "antivirus": false, - "transformations": false, - "totalSize": 128 - } - }, - "resourceToken": { - "description": "ResourceToken", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "files" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "resourceId", - "resourceType", - "expire", - "secret", - "accessedAt" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", - "resourceType": "files", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "accessedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/preferences" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } - } - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { - "type": "string" - }, - "x-example": [ - "owner" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "roles" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "roles": [ - "owner" - ] - } - }, - "site": { - "description": "Site", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Site ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Site creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Site update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Site name.", - "x-example": "My Site" - }, - "enabled": { - "type": "boolean", - "description": "Site enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "x-example": false - }, - "framework": { - "type": "string", - "description": "Site framework.", - "x-example": "react" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Site's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "deploymentScreenshotLight": { - "type": "string", - "description": "Screenshot of active deployment with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentScreenshotDark": { - "type": "string", - "description": "Screenshot of active deployment with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentId": { - "type": "string", - "description": "Site's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "vars": { - "type": "array", - "description": "Site variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/variable" - }, - "x-example": [] - }, - "timeout": { - "type": "integer", - "description": "Site request timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "The install command used to install the site dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "The build command used to build the site.", - "x-example": "npm run build" - }, - "startCommand": { - "type": "string", - "description": "Custom command to use when starting site runtime.", - "x-example": "node custom-server.mjs" - }, - "outputDirectory": { - "type": "string", - "description": "The directory where the site build output is located.", - "x-example": "build" - }, - "installationId": { - "type": "string", - "description": "Site VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": "sites\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for SSR executions.", - "x-example": "s-1vcpu-512mb" - }, - "buildRuntime": { - "type": "string", - "description": "Site build runtime.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework adapter.", - "x-example": "static" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "enabled", - "live", - "logging", - "framework", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "deploymentScreenshotLight", - "deploymentScreenshotDark", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "vars", - "timeout", - "installCommand", - "buildCommand", - "startCommand", - "outputDirectory", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification", - "buildRuntime", - "adapter", - "fallbackFile" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Site", - "enabled": false, - "live": false, - "logging": false, - "framework": "react", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "deploymentScreenshotLight": "5e5ea5c16897e", - "deploymentScreenshotDark": "5e5ea5c16897e", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "vars": [], - "timeout": 300, - "installCommand": "npm install", - "buildCommand": "npm run build", - "startCommand": "node custom-server.mjs", - "outputDirectory": "build", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "sites\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb", - "buildRuntime": "node-22", - "adapter": "static", - "fallbackFile": "index.html" - } - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Function creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Function update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "enabled": { - "type": "boolean", - "description": "Function enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "runtime": { - "type": "string", - "description": "Function execution and build runtime.", - "x-example": "python-3.8" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentId": { - "type": "string", - "description": "Function's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "type": "object", - "$ref": "#\/definitions\/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file used to execute the deployment.", - "x-example": "index.js" - }, - "commands": { - "type": "string", - "description": "The build command used to build the deployment.", - "x-example": "npm install" - }, - "version": { - "type": "string", - "description": "Version of Open Runtimes used for the function.", - "x-example": "v2" - }, - "installationId": { - "type": "string", - "description": "Function VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" - }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" - }, - "providerBranch": { - "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to function in VCS (Version Control System) repository", - "x-example": "functions\/helloWorld" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", - "x-example": false - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for executions.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "buildSpecification", - "runtimeSpecification" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "execute": "users", - "name": "My Function", - "enabled": false, - "live": false, - "logging": false, - "runtime": "python-3.8", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "scopes": "users.read", - "vars": [], - "events": "account.create", - "schedule": "5 4 * * *", - "timeout": 300, - "entrypoint": "index.js", - "commands": "npm install", - "version": "v2", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "functions\/helloWorld", - "providerSilentMode": false, - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb" - } - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { - "type": "string" - }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" - ], - "example": { - "$id": "python-3.8", - "key": "python", - "name": "Python", - "version": "3.8", - "base": "python:3.8-alpine", - "image": "appwrite\\\/runtime-for-python:3.8", - "logo": "python.png", - "supports": "amd64" - } - }, - "framework": { - "description": "Framework", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "buildRuntime": { - "type": "string", - "description": "Default runtime version.", - "x-example": "node-22" - }, - "runtimes": { - "type": "array", - "description": "List of supported runtime versions.", - "items": { - "type": "string" - }, - "x-example": [ - "static-1", - "node-22" - ] - }, - "adapters": { - "type": "array", - "description": "List of supported adapters.", - "items": { - "type": "object", - "$ref": "#\/definitions\/frameworkAdapter" - }, - "x-example": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "required": [ - "key", - "name", - "buildRuntime", - "runtimes", - "adapters" - ], - "example": { - "key": "sveltekit", - "name": "SvelteKit", - "buildRuntime": "node-22", - "runtimes": [ - "static-1", - "node-22" - ], - "adapters": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] - } - }, - "frameworkAdapter": { - "description": "Framework Adapter", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Adapter key.", - "x-example": "static" - }, - "installCommand": { - "type": "string", - "description": "Default command to download dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Default command to build site into output directory.", - "x-example": "npm run build" - }, - "outputDirectory": { - "type": "string", - "description": "Default output directory of build.", - "x-example": ".\/dist" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" - } - }, - "required": [ - "key", - "installCommand", - "buildCommand", - "outputDirectory", - "fallbackFile" - ], - "example": { - "key": "static", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/dist", - "fallbackFile": "index.html" - } - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Deployment update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "type": { - "type": "string", - "description": "Type of deployment.", - "x-example": "vcs" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "index.js" - }, - "sourceSize": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output size in bytes.", - "x-example": 128, - "format": "int32" - }, - "totalSize": { - "type": "integer", - "description": "The total size in bytes (source and build output).", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "screenshotLight": { - "type": "string", - "description": "Screenshot with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "screenshotDark": { - "type": "string", - "description": "Screenshot with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", - "x-example": "ready", - "enum": [ - "waiting", - "processing", - "building", - "ready", - "canceled", - "failed" - ] - }, - "buildLogs": { - "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." - }, - "buildDuration": { - "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, - "format": "int32" - }, - "providerRepositoryName": { - "type": "string", - "description": "The name of the vcs provider repository", - "x-example": "database" - }, - "providerRepositoryOwner": { - "type": "string", - "description": "The name of the vcs provider repository owner", - "x-example": "utopia" - }, - "providerRepositoryUrl": { - "type": "string", - "description": "The url of the vcs provider repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" - }, - "providerCommitHash": { - "type": "string", - "description": "The commit hash of the vcs commit", - "x-example": "7c3f25d" - }, - "providerCommitAuthorUrl": { - "type": "string", - "description": "The url of vcs commit author", - "x-example": "https:\/\/github.com\/vermakhushboo" - }, - "providerCommitAuthor": { - "type": "string", - "description": "The name of vcs commit author", - "x-example": "Khushboo Verma" - }, - "providerCommitMessage": { - "type": "string", - "description": "The commit message", - "x-example": "Update index.js" - }, - "providerCommitUrl": { - "type": "string", - "description": "The url of the vcs commit", - "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "providerBranchUrl": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "type", - "resourceId", - "resourceType", - "entrypoint", - "sourceSize", - "buildSize", - "totalSize", - "buildId", - "activate", - "screenshotLight", - "screenshotDark", - "status", - "buildLogs", - "buildDuration", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranch", - "providerBranchUrl" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "type": "vcs", - "resourceId": "5e5ea6g16897e", - "resourceType": "functions", - "entrypoint": "index.js", - "sourceSize": 128, - "buildSize": 128, - "totalSize": 128, - "buildId": "5e5ea5c16897e", - "activate": true, - "screenshotLight": "5e5ea5c16897e", - "screenshotDark": "5e5ea5c16897e", - "status": "ready", - "buildLogs": "Compiling source files...", - "buildDuration": 128, - "providerRepositoryName": "database", - "providerRepositoryOwner": "utopia", - "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerCommitHash": "7c3f25d", - "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", - "providerCommitAuthor": "Khushboo Verma", - "providerCommitMessage": "Update index.js", - "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", - "providerBranch": "0.7.x", - "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" - } - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Execution creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Execution update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Execution roles.", - "items": { - "type": "string" - }, - "x-example": [ - "any" - ] - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] - }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" - }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" - }, - "requestHeaders": { - "type": "array", - "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#\/definitions\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "type": "object", - "$ref": "#\/definitions\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] - }, - "logs": { - "type": "string", - "description": "Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "errors": { - "type": "string", - "description": "Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Project creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Project update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Project name.", - "x-example": "New Project" - }, - "description": { - "type": "string", - "description": "Project description.", - "x-example": "This is a new project." - }, - "teamId": { - "type": "string", - "description": "Project team ID.", - "x-example": "1592981250" - }, - "logo": { - "type": "string", - "description": "Project logo file ID.", - "x-example": "5f5c451b403cb" - }, - "url": { - "type": "string", - "description": "Project website URL.", - "x-example": "5f5c451b403cb" - }, - "legalName": { - "type": "string", - "description": "Company legal name.", - "x-example": "Company LTD." - }, - "legalCountry": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.", - "x-example": "US" - }, - "legalState": { - "type": "string", - "description": "State name.", - "x-example": "New York" - }, - "legalCity": { - "type": "string", - "description": "City name.", - "x-example": "New York City." - }, - "legalAddress": { - "type": "string", - "description": "Company Address.", - "x-example": "620 Eighth Avenue, New York, NY 10018" - }, - "legalTaxId": { - "type": "string", - "description": "Company Tax ID.", - "x-example": "131102020" - }, - "authDuration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 60, - "format": "int32" - }, - "authLimit": { - "type": "integer", - "description": "Max users allowed. 0 is unlimited.", - "x-example": 100, - "format": "int32" - }, - "authSessionsLimit": { - "type": "integer", - "description": "Max sessions allowed per user. 100 maximum.", - "x-example": 10, - "format": "int32" - }, - "authPasswordHistory": { - "type": "integer", - "description": "Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.", - "x-example": 5, - "format": "int32" - }, - "authPasswordDictionary": { - "type": "boolean", - "description": "Whether or not to check user's password against most commonly used passwords.", - "x-example": true - }, - "authPersonalDataCheck": { - "type": "boolean", - "description": "Whether or not to check the user password for similarity with their personal data.", - "x-example": true - }, - "authDisposableEmails": { - "type": "boolean", - "description": "Whether or not to disallow disposable email addresses during signup and email updates.", - "x-example": true - }, - "authCanonicalEmails": { - "type": "boolean", - "description": "Whether or not to require canonical email addresses during signup and email updates.", - "x-example": true - }, - "authFreeEmails": { - "type": "boolean", - "description": "Whether or not to disallow free email addresses during signup and email updates.", - "x-example": true - }, - "authMockNumbers": { - "type": "array", - "description": "An array of mock numbers and their corresponding verification codes (OTPs).", - "items": { - "type": "object", - "$ref": "#\/definitions\/mockNumber" - }, - "x-example": [ - {} - ] - }, - "authSessionAlerts": { - "type": "boolean", - "description": "Whether or not to send session alert emails to users.", - "x-example": true - }, - "authMembershipsUserName": { - "type": "boolean", - "description": "Whether or not to show user names in the teams membership response.", - "x-example": true - }, - "authMembershipsUserEmail": { - "type": "boolean", - "description": "Whether or not to show user emails in the teams membership response.", - "x-example": true - }, - "authMembershipsMfa": { - "type": "boolean", - "description": "Whether or not to show user MFA status in the teams membership response.", - "x-example": true - }, - "authMembershipsUserId": { - "type": "boolean", - "description": "Whether or not to show user IDs in the teams membership response.", - "x-example": true - }, - "authMembershipsUserPhone": { - "type": "boolean", - "description": "Whether or not to show user phone numbers in the teams membership response.", - "x-example": true - }, - "authInvalidateSessions": { - "type": "boolean", - "description": "Whether or not all existing sessions should be invalidated on password change", - "x-example": true - }, - "oAuthProviders": { - "type": "array", - "description": "List of Auth Providers.", - "items": { - "type": "object", - "$ref": "#\/definitions\/authProvider" - }, - "x-example": [ - {} - ] - }, - "platforms": { - "type": "array", - "description": "List of Platforms.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/platformWeb" - }, - { - "$ref": "#\/definitions\/platformApple" - }, - { - "$ref": "#\/definitions\/platformAndroid" - }, - { - "$ref": "#\/definitions\/platformWindows" - }, - { - "$ref": "#\/definitions\/platformLinux" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/definitions\/platformWeb", - "apple": "#\/definitions\/platformApple", - "android": "#\/definitions\/platformAndroid", - "windows": "#\/definitions\/platformWindows", - "linux": "#\/definitions\/platformLinux" - } - } - }, - "x-example": {} - }, - "webhooks": { - "type": "array", - "description": "List of Webhooks.", - "items": { - "type": "object", - "$ref": "#\/definitions\/webhook" - }, - "x-example": {} - }, - "keys": { - "type": "array", - "description": "List of API Keys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/key" - }, - "x-example": {} - }, - "devKeys": { - "type": "array", - "description": "List of dev keys.", - "items": { - "type": "object", - "$ref": "#\/definitions\/devKey" - }, - "x-example": {} - }, - "smtpEnabled": { - "type": "boolean", - "description": "Status for custom SMTP", - "x-example": false - }, - "smtpSenderName": { - "type": "string", - "description": "SMTP sender name", - "x-example": "John Appwrite" - }, - "smtpSenderEmail": { - "type": "string", - "description": "SMTP sender email", - "x-example": "john@appwrite.io" - }, - "smtpReplyToName": { - "type": "string", - "description": "SMTP reply to name", - "x-example": "Support Team" - }, - "smtpReplyToEmail": { - "type": "string", - "description": "SMTP reply to email", - "x-example": "support@appwrite.io" - }, - "smtpHost": { - "type": "string", - "description": "SMTP server host name", - "x-example": "mail.appwrite.io" - }, - "smtpPort": { - "type": "integer", - "description": "SMTP server port", - "x-example": 25, - "format": "int32" - }, - "smtpUsername": { - "type": "string", - "description": "SMTP server username", - "x-example": "emailuser" - }, - "smtpPassword": { - "type": "string", - "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" - }, - "smtpSecure": { - "type": "string", - "description": "SMTP server secure protocol", - "x-example": "tls" - }, - "pingCount": { - "type": "integer", - "description": "Number of times the ping was received for this project.", - "x-example": 1, - "format": "int32" - }, - "pingedAt": { - "type": "string", - "description": "Last ping datetime in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "labels": { - "type": "array", - "description": "Labels for the project.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "status": { - "type": "string", - "description": "Project status.", - "x-example": "active" - }, - "authEmailPassword": { - "type": "boolean", - "description": "Email\/Password auth method status", - "x-example": true - }, - "authUsersAuthMagicURL": { - "type": "boolean", - "description": "Magic URL auth method status", - "x-example": true - }, - "authEmailOtp": { - "type": "boolean", - "description": "Email (OTP) auth method status", - "x-example": true - }, - "authAnonymous": { - "type": "boolean", - "description": "Anonymous auth method status", - "x-example": true - }, - "authInvites": { - "type": "boolean", - "description": "Invites auth method status", - "x-example": true - }, - "authJWT": { - "type": "boolean", - "description": "JWT auth method status", - "x-example": true - }, - "authPhone": { - "type": "boolean", - "description": "Phone auth method status", - "x-example": true - }, - "serviceStatusForAccount": { - "type": "boolean", - "description": "Account service status", - "x-example": true - }, - "serviceStatusForAvatars": { - "type": "boolean", - "description": "Avatars service status", - "x-example": true - }, - "serviceStatusForDatabases": { - "type": "boolean", - "description": "Databases (legacy) service status", - "x-example": true - }, - "serviceStatusForTablesdb": { - "type": "boolean", - "description": "TablesDB service status", - "x-example": true - }, - "serviceStatusForLocale": { - "type": "boolean", - "description": "Locale service status", - "x-example": true - }, - "serviceStatusForHealth": { - "type": "boolean", - "description": "Health service status", - "x-example": true - }, - "serviceStatusForProject": { - "type": "boolean", - "description": "Project service status", - "x-example": true - }, - "serviceStatusForStorage": { - "type": "boolean", - "description": "Storage service status", - "x-example": true - }, - "serviceStatusForTeams": { - "type": "boolean", - "description": "Teams service status", - "x-example": true - }, - "serviceStatusForUsers": { - "type": "boolean", - "description": "Users service status", - "x-example": true - }, - "serviceStatusForVcs": { - "type": "boolean", - "description": "VCS service status", - "x-example": true - }, - "serviceStatusForSites": { - "type": "boolean", - "description": "Sites service status", - "x-example": true - }, - "serviceStatusForFunctions": { - "type": "boolean", - "description": "Functions service status", - "x-example": true - }, - "serviceStatusForProxy": { - "type": "boolean", - "description": "Proxy service status", - "x-example": true - }, - "serviceStatusForGraphql": { - "type": "boolean", - "description": "GraphQL service status", - "x-example": true - }, - "serviceStatusForMigrations": { - "type": "boolean", - "description": "Migrations service status", - "x-example": true - }, - "serviceStatusForMessaging": { - "type": "boolean", - "description": "Messaging service status", - "x-example": true - }, - "protocolStatusForRest": { - "type": "boolean", - "description": "REST protocol status", - "x-example": true - }, - "protocolStatusForGraphql": { - "type": "boolean", - "description": "GraphQL protocol status", - "x-example": true - }, - "protocolStatusForWebsocket": { - "type": "boolean", - "description": "Websocket protocol status", - "x-example": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authDuration", - "authLimit", - "authSessionsLimit", - "authPasswordHistory", - "authPasswordDictionary", - "authPersonalDataCheck", - "authDisposableEmails", - "authCanonicalEmails", - "authFreeEmails", - "authMockNumbers", - "authSessionAlerts", - "authMembershipsUserName", - "authMembershipsUserEmail", - "authMembershipsMfa", - "authMembershipsUserId", - "authMembershipsUserPhone", - "authInvalidateSessions", - "oAuthProviders", - "platforms", - "webhooks", - "keys", - "devKeys", - "smtpEnabled", - "smtpSenderName", - "smtpSenderEmail", - "smtpReplyToName", - "smtpReplyToEmail", - "smtpHost", - "smtpPort", - "smtpUsername", - "smtpPassword", - "smtpSecure", - "pingCount", - "pingedAt", - "labels", - "status", - "authEmailPassword", - "authUsersAuthMagicURL", - "authEmailOtp", - "authAnonymous", - "authInvites", - "authJWT", - "authPhone", - "serviceStatusForAccount", - "serviceStatusForAvatars", - "serviceStatusForDatabases", - "serviceStatusForTablesdb", - "serviceStatusForLocale", - "serviceStatusForHealth", - "serviceStatusForProject", - "serviceStatusForStorage", - "serviceStatusForTeams", - "serviceStatusForUsers", - "serviceStatusForVcs", - "serviceStatusForSites", - "serviceStatusForFunctions", - "serviceStatusForProxy", - "serviceStatusForGraphql", - "serviceStatusForMigrations", - "serviceStatusForMessaging", - "protocolStatusForRest", - "protocolStatusForGraphql", - "protocolStatusForWebsocket" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "New Project", - "description": "This is a new project.", - "teamId": "1592981250", - "logo": "5f5c451b403cb", - "url": "5f5c451b403cb", - "legalName": "Company LTD.", - "legalCountry": "US", - "legalState": "New York", - "legalCity": "New York City.", - "legalAddress": "620 Eighth Avenue, New York, NY 10018", - "legalTaxId": "131102020", - "authDuration": 60, - "authLimit": 100, - "authSessionsLimit": 10, - "authPasswordHistory": 5, - "authPasswordDictionary": true, - "authPersonalDataCheck": true, - "authDisposableEmails": true, - "authCanonicalEmails": true, - "authFreeEmails": true, - "authMockNumbers": [ - {} - ], - "authSessionAlerts": true, - "authMembershipsUserName": true, - "authMembershipsUserEmail": true, - "authMembershipsMfa": true, - "authMembershipsUserId": true, - "authMembershipsUserPhone": true, - "authInvalidateSessions": true, - "oAuthProviders": [ - {} - ], - "platforms": {}, - "webhooks": {}, - "keys": {}, - "devKeys": {}, - "smtpEnabled": false, - "smtpSenderName": "John Appwrite", - "smtpSenderEmail": "john@appwrite.io", - "smtpReplyToName": "Support Team", - "smtpReplyToEmail": "support@appwrite.io", - "smtpHost": "mail.appwrite.io", - "smtpPort": 25, - "smtpUsername": "emailuser", - "smtpPassword": "", - "smtpSecure": "tls", - "pingCount": 1, - "pingedAt": "2020-10-15T06:38:00.000+00:00", - "labels": [ - "vip" - ], - "status": "active", - "authEmailPassword": true, - "authUsersAuthMagicURL": true, - "authEmailOtp": true, - "authAnonymous": true, - "authInvites": true, - "authJWT": true, - "authPhone": true, - "serviceStatusForAccount": true, - "serviceStatusForAvatars": true, - "serviceStatusForDatabases": true, - "serviceStatusForTablesdb": true, - "serviceStatusForLocale": true, - "serviceStatusForHealth": true, - "serviceStatusForProject": true, - "serviceStatusForStorage": true, - "serviceStatusForTeams": true, - "serviceStatusForUsers": true, - "serviceStatusForVcs": true, - "serviceStatusForSites": true, - "serviceStatusForFunctions": true, - "serviceStatusForProxy": true, - "serviceStatusForGraphql": true, - "serviceStatusForMigrations": true, - "serviceStatusForMessaging": true, - "protocolStatusForRest": true, - "protocolStatusForGraphql": true, - "protocolStatusForWebsocket": true - } - }, - "webhook": { - "description": "Webhook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Webhook ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Webhook creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Webhook update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Webhook name.", - "x-example": "My Webhook" - }, - "url": { - "type": "string", - "description": "Webhook URL endpoint.", - "x-example": "https:\/\/example.com\/webhook" - }, - "events": { - "type": "array", - "description": "Webhook trigger events.", - "items": { - "type": "string" - }, - "x-example": [ - "databases.tables.update", - "databases.collections.update" - ] - }, - "tls": { - "type": "boolean", - "description": "Indicates if SSL \/ TLS certificate verification is enabled.", - "x-example": true - }, - "authUsername": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "authPassword": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - }, - "secret": { - "type": "string", - "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", - "x-example": "ad3d581ca230e2b7059c545e5a" - }, - "enabled": { - "type": "boolean", - "description": "Indicates if this webhook is enabled.", - "x-example": true - }, - "logs": { - "type": "string", - "description": "Webhook error logs from the most recent failure.", - "x-example": "Failed to connect to remote server." - }, - "attempts": { - "type": "integer", - "description": "Number of consecutive failed webhook attempts.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "url", - "events", - "tls", - "authUsername", - "authPassword", - "secret", - "enabled", - "logs", - "attempts" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Webhook", - "url": "https:\/\/example.com\/webhook", - "events": [ - "databases.tables.update", - "databases.collections.update" - ], - "tls": true, - "authUsername": "username", - "authPassword": "password", - "secret": "ad3d581ca230e2b7059c545e5a", - "enabled": true, - "logs": "Failed to connect to remote server.", - "attempts": 10 - } - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "ephemeralKey": { - "description": "Ephemeral Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "devKey": { - "description": "DevKey", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "Dev API Key" - }, - "expire": { - "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - }, - "accessedAt": { - "type": "string", - "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Dev API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "mockNumber": { - "description": "Mock Number", - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", - "x-example": "+1612842323" - }, - "otp": { - "type": "string", - "description": "Mock OTP for the number. ", - "x-example": "123456" - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "number", - "otp", - "$createdAt", - "$updatedAt" - ], - "example": { - "number": "+1612842323", - "otp": "123456", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "oAuth2Github": { - "description": "OAuth2GitHub", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", - "x-example": "e4d87900000000540733" - }, - "clientSecret": { - "type": "string", - "description": "GitHub OAuth2 client secret.", - "x-example": "5e07c00000000000000000000000000000198bcc" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "e4d87900000000540733", - "clientSecret": "5e07c00000000000000000000000000000198bcc" - } - }, - "oAuth2Discord": { - "description": "OAuth2Discord", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Discord OAuth2 client ID.", - "x-example": "950722000000343754" - }, - "clientSecret": { - "type": "string", - "description": "Discord OAuth2 client secret.", - "x-example": "YmPXnM000000000000000000002zFg5D" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "950722000000343754", - "clientSecret": "YmPXnM000000000000000000002zFg5D" - } - }, - "oAuth2Figma": { - "description": "OAuth2Figma", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Figma OAuth2 client ID.", - "x-example": "byay5H0000000000VtiI40" - }, - "clientSecret": { - "type": "string", - "description": "Figma OAuth2 client secret.", - "x-example": "yEpOYn0000000000000000004iIsU5" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "byay5H0000000000VtiI40", - "clientSecret": "yEpOYn0000000000000000004iIsU5" - } - }, - "oAuth2Dropbox": { - "description": "OAuth2Dropbox", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appKey": { - "type": "string", - "description": "Dropbox OAuth2 app key.", - "x-example": "jl000000000009t" - }, - "appSecret": { - "type": "string", - "description": "Dropbox OAuth2 app secret.", - "x-example": "g200000000000vw" - } - }, - "required": [ - "$id", - "enabled", - "appKey", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appKey": "jl000000000009t", - "appSecret": "g200000000000vw" - } - }, - "oAuth2Dailymotion": { - "description": "OAuth2Dailymotion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Dailymotion OAuth2 API key.", - "x-example": "07a9000000000000067f" - }, - "apiSecret": { - "type": "string", - "description": "Dailymotion OAuth2 API secret.", - "x-example": "a399a90000000000000000000000000000d90639" - } - }, - "required": [ - "$id", - "enabled", - "apiKey", - "apiSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "apiKey": "07a9000000000000067f", - "apiSecret": "a399a90000000000000000000000000000d90639" - } - }, - "oAuth2Bitbucket": { - "description": "OAuth2Bitbucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "key": { - "type": "string", - "description": "Bitbucket OAuth2 key.", - "x-example": "Knt70000000000ByRc" - }, - "secret": { - "type": "string", - "description": "Bitbucket OAuth2 secret.", - "x-example": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "required": [ - "$id", - "enabled", - "key", - "secret" - ], - "example": { - "$id": "github", - "enabled": false, - "key": "Knt70000000000ByRc", - "secret": "NMfLZJ00000000000000000000TLQdDx" - } - }, - "oAuth2Bitly": { - "description": "OAuth2Bitly", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Bitly OAuth2 client ID.", - "x-example": "d95151000000000000000000000000000067af9b" - }, - "clientSecret": { - "type": "string", - "description": "Bitly OAuth2 client secret.", - "x-example": "a13e250000000000000000000000000000d73095" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "d95151000000000000000000000000000067af9b", - "clientSecret": "a13e250000000000000000000000000000d73095" - } - }, - "oAuth2Box": { - "description": "OAuth2Box", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Box OAuth2 client ID.", - "x-example": "deglcs00000000000000000000x2og6y" - }, - "clientSecret": { - "type": "string", - "description": "Box OAuth2 client secret.", - "x-example": "OKM1f100000000000000000000eshEif" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "deglcs00000000000000000000x2og6y", - "clientSecret": "OKM1f100000000000000000000eshEif" - } - }, - "oAuth2Autodesk": { - "description": "OAuth2Autodesk", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Autodesk OAuth2 client ID.", - "x-example": "5zw90v00000000000000000000kVYXN7" - }, - "clientSecret": { - "type": "string", - "description": "Autodesk OAuth2 client secret.", - "x-example": "7I000000000000MW" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "5zw90v00000000000000000000kVYXN7", - "clientSecret": "7I000000000000MW" - } - }, - "oAuth2Google": { - "description": "OAuth2Google", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Google OAuth2 client ID.", - "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" - }, - "clientSecret": { - "type": "string", - "description": "Google OAuth2 client secret.", - "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj" - } - }, - "oAuth2Zoom": { - "description": "OAuth2Zoom", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoom OAuth2 client ID.", - "x-example": "QMAC00000000000000w0AQ" - }, - "clientSecret": { - "type": "string", - "description": "Zoom OAuth2 client secret.", - "x-example": "GAWsG4000000000000000000007U01ON" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "QMAC00000000000000w0AQ", - "clientSecret": "GAWsG4000000000000000000007U01ON" - } - }, - "oAuth2Zoho": { - "description": "OAuth2Zoho", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Zoho OAuth2 client ID.", - "x-example": "1000.83C178000000000000000000RPNX0B" - }, - "clientSecret": { - "type": "string", - "description": "Zoho OAuth2 client secret.", - "x-example": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "1000.83C178000000000000000000RPNX0B", - "clientSecret": "fb5cac000000000000000000000000000000a68f6e" - } - }, - "oAuth2Yandex": { - "description": "OAuth2Yandex", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yandex OAuth2 client ID.", - "x-example": "6a8a6a0000000000000000000091483c" - }, - "clientSecret": { - "type": "string", - "description": "Yandex OAuth2 client secret.", - "x-example": "bbf98500000000000000000000c75a63" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6a8a6a0000000000000000000091483c", - "clientSecret": "bbf98500000000000000000000c75a63" - } - }, - "oAuth2X": { - "description": "OAuth2X", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "X OAuth2 customer key.", - "x-example": "slzZV0000000000000NFLaWT" - }, - "secretKey": { - "type": "string", - "description": "X OAuth2 secret key.", - "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "slzZV0000000000000NFLaWT", - "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "oAuth2WordPress": { - "description": "OAuth2WordPress", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "WordPress OAuth2 client ID.", - "x-example": "130005" - }, - "clientSecret": { - "type": "string", - "description": "WordPress OAuth2 client secret.", - "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "130005", - "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "oAuth2Twitch": { - "description": "OAuth2Twitch", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Twitch OAuth2 client ID.", - "x-example": "vvi0in000000000000000000ikmt9p" - }, - "clientSecret": { - "type": "string", - "description": "Twitch OAuth2 client secret.", - "x-example": "pmapue000000000000000000zylw3v" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "vvi0in000000000000000000ikmt9p", - "clientSecret": "pmapue000000000000000000zylw3v" - } - }, - "oAuth2Stripe": { - "description": "OAuth2Stripe", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Stripe OAuth2 client ID.", - "x-example": "ca_UKibXX0000000000000000000006byvR" - }, - "apiSecretKey": { - "type": "string", - "description": "Stripe OAuth2 API secret key.", - "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "apiSecretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "ca_UKibXX0000000000000000000006byvR", - "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" - } - }, - "oAuth2Spotify": { - "description": "OAuth2Spotify", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Spotify OAuth2 client ID.", - "x-example": "6ec271000000000000000000009beace" - }, - "clientSecret": { - "type": "string", - "description": "Spotify OAuth2 client secret.", - "x-example": "db068a000000000000000000008b5b9f" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "6ec271000000000000000000009beace", - "clientSecret": "db068a000000000000000000008b5b9f" - } - }, - "oAuth2Slack": { - "description": "OAuth2Slack", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Slack OAuth2 client ID.", - "x-example": "23000000089.15000000000023" - }, - "clientSecret": { - "type": "string", - "description": "Slack OAuth2 client secret.", - "x-example": "81656000000000000000000000f3d2fd" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "23000000089.15000000000023", - "clientSecret": "81656000000000000000000000f3d2fd" - } - }, - "oAuth2Podio": { - "description": "OAuth2Podio", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Podio OAuth2 client ID.", - "x-example": "appwrite-oauth-test-app" - }, - "clientSecret": { - "type": "string", - "description": "Podio OAuth2 client secret.", - "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-oauth-test-app", - "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" - } - }, - "oAuth2Notion": { - "description": "OAuth2Notion", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauthClientId": { - "type": "string", - "description": "Notion OAuth2 client ID.", - "x-example": "341d8700-0000-0000-0000-000000446ee3" - }, - "oauthClientSecret": { - "type": "string", - "description": "Notion OAuth2 client secret.", - "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "required": [ - "$id", - "enabled", - "oauthClientId", - "oauthClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", - "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "oAuth2Salesforce": { - "description": "OAuth2Salesforce", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "customerKey": { - "type": "string", - "description": "Salesforce OAuth2 consumer key.", - "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" - }, - "customerSecret": { - "type": "string", - "description": "Salesforce OAuth2 consumer secret.", - "x-example": "3w000000000000e2" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "customerSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "customerSecret": "3w000000000000e2" - } - }, - "oAuth2Yahoo": { - "description": "OAuth2Yahoo", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Yahoo OAuth2 client ID.", - "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" - }, - "clientSecret": { - "type": "string", - "description": "Yahoo OAuth2 client secret.", - "x-example": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "clientSecret": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "oAuth2Linkedin": { - "description": "OAuth2Linkedin", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "LinkedIn OAuth2 client ID.", - "x-example": "770000000000dv" - }, - "primaryClientSecret": { - "type": "string", - "description": "LinkedIn OAuth2 primary client secret.", - "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "primaryClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "770000000000dv", - "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "oAuth2Disqus": { - "description": "OAuth2Disqus", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "publicKey": { - "type": "string", - "description": "Disqus OAuth2 public key.", - "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" - }, - "secretKey": { - "type": "string", - "description": "Disqus OAuth2 secret key.", - "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "required": [ - "$id", - "enabled", - "publicKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" - } - }, - "oAuth2Amazon": { - "description": "OAuth2Amazon", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Amazon OAuth2 client ID.", - "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" - }, - "clientSecret": { - "type": "string", - "description": "Amazon OAuth2 client secret.", - "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" - } - }, - "oAuth2Etsy": { - "description": "OAuth2Etsy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "keyString": { - "type": "string", - "description": "Etsy OAuth2 keystring.", - "x-example": "nsgzxh0000000000008j85a2" - }, - "sharedSecret": { - "type": "string", - "description": "Etsy OAuth2 shared secret.", - "x-example": "tp000000ru" - } - }, - "required": [ - "$id", - "enabled", - "keyString", - "sharedSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "keyString": "nsgzxh0000000000008j85a2", - "sharedSecret": "tp000000ru" - } - }, - "oAuth2Facebook": { - "description": "OAuth2Facebook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "appId": { - "type": "string", - "description": "Facebook OAuth2 app ID.", - "x-example": "260600000007694" - }, - "appSecret": { - "type": "string", - "description": "Facebook OAuth2 app secret.", - "x-example": "2d0b2800000000000000000000d38af4" - } - }, - "required": [ - "$id", - "enabled", - "appId", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appId": "260600000007694", - "appSecret": "2d0b2800000000000000000000d38af4" - } - }, - "oAuth2Tradeshift": { - "description": "OAuth2Tradeshift", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "oauth2ClientId": { - "type": "string", - "description": "Tradeshift OAuth2 client ID.", - "x-example": "appwrite-test-org.appwrite-test-app" - }, - "oauth2ClientSecret": { - "type": "string", - "description": "Tradeshift OAuth2 client secret.", - "x-example": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "required": [ - "$id", - "enabled", - "oauth2ClientId", - "oauth2ClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauth2ClientId": "appwrite-test-org.appwrite-test-app", - "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" - } - }, - "oAuth2Paypal": { - "description": "OAuth2Paypal", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "PayPal OAuth2 client ID.", - "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" - }, - "secretKey": { - "type": "string", - "description": "PayPal OAuth2 secret key.", - "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "oAuth2Gitlab": { - "description": "OAuth2Gitlab", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "GitLab OAuth2 application ID.", - "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" - }, - "secret": { - "type": "string", - "description": "GitLab OAuth2 secret.", - "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" - }, - "endpoint": { - "type": "string", - "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", - "x-example": "https:\/\/gitlab.com" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "secret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "endpoint": "https:\/\/gitlab.com" - } - }, - "oAuth2Authentik": { - "description": "OAuth2Authentik", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Authentik OAuth2 client ID.", - "x-example": "dTKOPa0000000000000000000000000000e7G8hv" - }, - "clientSecret": { - "type": "string", - "description": "Authentik OAuth2 client secret.", - "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" - }, - "endpoint": { - "type": "string", - "description": "Authentik OAuth2 endpoint domain.", - "x-example": "example.authentik.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dTKOPa0000000000000000000000000000e7G8hv", - "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "endpoint": "example.authentik.com" - } - }, - "oAuth2Auth0": { - "description": "OAuth2Auth0", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Auth0 OAuth2 client ID.", - "x-example": "OaOkIA000000000000000000005KLSYq" - }, - "clientSecret": { - "type": "string", - "description": "Auth0 OAuth2 client secret.", - "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" - }, - "endpoint": { - "type": "string", - "description": "Auth0 OAuth2 endpoint domain.", - "x-example": "example.us.auth0.com" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "OaOkIA000000000000000000005KLSYq", - "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "endpoint": "example.us.auth0.com" - } - }, - "oAuth2FusionAuth": { - "description": "OAuth2FusionAuth", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "FusionAuth OAuth2 client ID.", - "x-example": "b2222c00-0000-0000-0000-000000862097" - }, - "clientSecret": { - "type": "string", - "description": "FusionAuth OAuth2 client secret.", - "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" - }, - "endpoint": { - "type": "string", - "description": "FusionAuth OAuth2 endpoint domain.", - "x-example": "example.fusionauth.io" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "b2222c00-0000-0000-0000-000000862097", - "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", - "endpoint": "example.fusionauth.io" - } - }, - "oAuth2Keycloak": { - "description": "OAuth2Keycloak", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Keycloak OAuth2 client ID.", - "x-example": "appwrite-o0000000st-app" - }, - "clientSecret": { - "type": "string", - "description": "Keycloak OAuth2 client secret.", - "x-example": "jdjrJd00000000000000000000HUsaZO" - }, - "endpoint": { - "type": "string", - "description": "Keycloak OAuth2 endpoint domain.", - "x-example": "keycloak.example.com" - }, - "realmName": { - "type": "string", - "description": "Keycloak OAuth2 realm name.", - "x-example": "appwrite-realm" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint", - "realmName" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-o0000000st-app", - "clientSecret": "jdjrJd00000000000000000000HUsaZO", - "endpoint": "keycloak.example.com", - "realmName": "appwrite-realm" - } - }, - "oAuth2Oidc": { - "description": "OAuth2Oidc", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "OpenID Connect OAuth2 client ID.", - "x-example": "qibI2x0000000000000000000000000006L2YFoG" - }, - "clientSecret": { - "type": "string", - "description": "OpenID Connect OAuth2 client secret.", - "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", - "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" - }, - "tokenUrl": { - "type": "string", - "description": "OpenID Connect token endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/token" - }, - "userInfoUrl": { - "type": "string", - "description": "OpenID Connect user info endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "wellKnownURL", - "authorizationURL", - "tokenUrl", - "userInfoUrl" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "qibI2x0000000000000000000000000006L2YFoG", - "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", - "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", - "tokenUrl": "https:\/\/myoauth.com\/oauth2\/token", - "userInfoUrl": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "oAuth2Okta": { - "description": "OAuth2Okta", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Okta OAuth2 client ID.", - "x-example": "0oa00000000000000698" - }, - "clientSecret": { - "type": "string", - "description": "Okta OAuth2 client secret.", - "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" - }, - "domain": { - "type": "string", - "description": "Okta OAuth2 domain.", - "x-example": "trial-6400025.okta.com" - }, - "authorizationServerId": { - "type": "string", - "description": "Okta OAuth2 authorization server ID.", - "x-example": "aus000000000000000h7z" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "domain", - "authorizationServerId" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "0oa00000000000000698", - "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "domain": "trial-6400025.okta.com", - "authorizationServerId": "aus000000000000000h7z" - } - }, - "oAuth2Kick": { - "description": "OAuth2Kick", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Kick OAuth2 client ID.", - "x-example": "01KQ7C00000000000001MFHS32" - }, - "clientSecret": { - "type": "string", - "description": "Kick OAuth2 client secret.", - "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "01KQ7C00000000000001MFHS32", - "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" - } - }, - "oAuth2Apple": { - "description": "OAuth2Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "apple" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "serviceId": { - "type": "string", - "description": "Apple OAuth2 service ID.", - "x-example": "ip.appwrite.app.web" - }, - "keyId": { - "type": "string", - "description": "Apple OAuth2 key ID.", - "x-example": "P4000000N8" - }, - "teamId": { - "type": "string", - "description": "Apple OAuth2 team ID.", - "x-example": "D4000000R6" - }, - "p8File": { - "type": "string", - "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", - "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "required": [ - "$id", - "enabled", - "serviceId", - "keyId", - "teamId", - "p8File" - ], - "example": { - "$id": "apple", - "enabled": false, - "serviceId": "ip.appwrite.app.web", - "keyId": "P4000000N8", - "teamId": "D4000000R6", - "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" - } - }, - "oAuth2Microsoft": { - "description": "OAuth2Microsoft", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "Microsoft OAuth2 application ID.", - "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" - }, - "applicationSecret": { - "type": "string", - "description": "Microsoft OAuth2 application secret.", - "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" - }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", - "x-example": "common" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "applicationSecret", - "tenant" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", - "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "tenant": "common" - } - }, - "oAuth2ProviderList": { - "description": "OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers in the given project.", - "x-example": 5, - "format": "int32" - }, - "providers": { - "type": "array", - "description": "List of OAuth2 providers.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/oAuth2Github" - }, - { - "$ref": "#\/definitions\/oAuth2Discord" - }, - { - "$ref": "#\/definitions\/oAuth2Figma" - }, - { - "$ref": "#\/definitions\/oAuth2Dropbox" - }, - { - "$ref": "#\/definitions\/oAuth2Dailymotion" - }, - { - "$ref": "#\/definitions\/oAuth2Bitbucket" - }, - { - "$ref": "#\/definitions\/oAuth2Bitly" - }, - { - "$ref": "#\/definitions\/oAuth2Box" - }, - { - "$ref": "#\/definitions\/oAuth2Autodesk" - }, - { - "$ref": "#\/definitions\/oAuth2Google" - }, - { - "$ref": "#\/definitions\/oAuth2Zoom" - }, - { - "$ref": "#\/definitions\/oAuth2Zoho" - }, - { - "$ref": "#\/definitions\/oAuth2Yandex" - }, - { - "$ref": "#\/definitions\/oAuth2X" - }, - { - "$ref": "#\/definitions\/oAuth2WordPress" - }, - { - "$ref": "#\/definitions\/oAuth2Twitch" - }, - { - "$ref": "#\/definitions\/oAuth2Stripe" - }, - { - "$ref": "#\/definitions\/oAuth2Spotify" - }, - { - "$ref": "#\/definitions\/oAuth2Slack" - }, - { - "$ref": "#\/definitions\/oAuth2Podio" - }, - { - "$ref": "#\/definitions\/oAuth2Notion" - }, - { - "$ref": "#\/definitions\/oAuth2Salesforce" - }, - { - "$ref": "#\/definitions\/oAuth2Yahoo" - }, - { - "$ref": "#\/definitions\/oAuth2Linkedin" - }, - { - "$ref": "#\/definitions\/oAuth2Disqus" - }, - { - "$ref": "#\/definitions\/oAuth2Amazon" - }, - { - "$ref": "#\/definitions\/oAuth2Etsy" - }, - { - "$ref": "#\/definitions\/oAuth2Facebook" - }, - { - "$ref": "#\/definitions\/oAuth2Tradeshift" - }, - { - "$ref": "#\/definitions\/oAuth2Paypal" - }, - { - "$ref": "#\/definitions\/oAuth2Gitlab" - }, - { - "$ref": "#\/definitions\/oAuth2Authentik" - }, - { - "$ref": "#\/definitions\/oAuth2Auth0" - }, - { - "$ref": "#\/definitions\/oAuth2FusionAuth" - }, - { - "$ref": "#\/definitions\/oAuth2Keycloak" - }, - { - "$ref": "#\/definitions\/oAuth2Oidc" - }, - { - "$ref": "#\/definitions\/oAuth2Apple" - }, - { - "$ref": "#\/definitions\/oAuth2Okta" - }, - { - "$ref": "#\/definitions\/oAuth2Kick" - }, - { - "$ref": "#\/definitions\/oAuth2Microsoft" - } - ], - "x-discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/definitions\/oAuth2Github", - "discord": "#\/definitions\/oAuth2Discord", - "figma": "#\/definitions\/oAuth2Figma", - "dropbox": "#\/definitions\/oAuth2Dropbox", - "dailymotion": "#\/definitions\/oAuth2Dailymotion", - "bitbucket": "#\/definitions\/oAuth2Bitbucket", - "bitly": "#\/definitions\/oAuth2Bitly", - "box": "#\/definitions\/oAuth2Box", - "autodesk": "#\/definitions\/oAuth2Autodesk", - "google": "#\/definitions\/oAuth2Google", - "zoom": "#\/definitions\/oAuth2Zoom", - "zoho": "#\/definitions\/oAuth2Zoho", - "yandex": "#\/definitions\/oAuth2Yandex", - "x": "#\/definitions\/oAuth2X", - "wordpress": "#\/definitions\/oAuth2WordPress", - "twitch": "#\/definitions\/oAuth2Twitch", - "stripe": "#\/definitions\/oAuth2Stripe", - "spotify": "#\/definitions\/oAuth2Spotify", - "slack": "#\/definitions\/oAuth2Slack", - "podio": "#\/definitions\/oAuth2Podio", - "notion": "#\/definitions\/oAuth2Notion", - "salesforce": "#\/definitions\/oAuth2Salesforce", - "yahoo": "#\/definitions\/oAuth2Yahoo", - "linkedin": "#\/definitions\/oAuth2Linkedin", - "disqus": "#\/definitions\/oAuth2Disqus", - "amazon": "#\/definitions\/oAuth2Amazon", - "etsy": "#\/definitions\/oAuth2Etsy", - "facebook": "#\/definitions\/oAuth2Facebook", - "tradeshift": "#\/definitions\/oAuth2Tradeshift", - "tradeshiftBox": "#\/definitions\/oAuth2Tradeshift", - "paypal": "#\/definitions\/oAuth2Paypal", - "paypalSandbox": "#\/definitions\/oAuth2Paypal", - "gitlab": "#\/definitions\/oAuth2Gitlab", - "authentik": "#\/definitions\/oAuth2Authentik", - "auth0": "#\/definitions\/oAuth2Auth0", - "fusionauth": "#\/definitions\/oAuth2FusionAuth", - "keycloak": "#\/definitions\/oAuth2Keycloak", - "oidc": "#\/definitions\/oAuth2Oidc", - "apple": "#\/definitions\/oAuth2Apple", - "okta": "#\/definitions\/oAuth2Okta", - "kick": "#\/definitions\/oAuth2Kick", - "microsoft": "#\/definitions\/oAuth2Microsoft" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "policyPasswordDictionary": { - "description": "Policy Password Dictionary", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password dictionary policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyPasswordHistory": { - "description": "Policy Password History", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Password history length. A value of 0 means the policy is disabled.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 5 - } - }, - "policyPasswordPersonalData": { - "description": "Policy Password Personal Data", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether password personal data policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionAlert": { - "description": "Policy Session Alert", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session alert policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionDuration": { - "description": "Policy Session Duration", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "duration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 3600, - "format": "int32" - } - }, - "required": [ - "$id", - "duration" - ], - "example": { - "$id": "password-dictionary", - "duration": 3600 - } - }, - "policySessionInvalidation": { - "description": "Policy Session Invalidation", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "enabled": { - "type": "boolean", - "description": "Whether session invalidation policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionLimit": { - "description": "Policy Session Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", - "x-example": 10, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 10 - } - }, - "policyUserLimit": { - "description": "Policy User Limit", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "total": { - "type": "integer", - "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", - "x-example": 100, - "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 100 - } - }, - "policyMembershipPrivacy": { - "description": "Policy Membership Privacy", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "userId": { - "type": "boolean", - "description": "Whether user ID is visible in memberships.", - "x-example": true - }, - "userEmail": { - "type": "boolean", - "description": "Whether user email is visible in memberships.", - "x-example": true - }, - "userPhone": { - "type": "boolean", - "description": "Whether user phone is visible in memberships.", - "x-example": true - }, - "userName": { - "type": "boolean", - "description": "Whether user name is visible in memberships.", - "x-example": true - }, - "userMFA": { - "type": "boolean", - "description": "Whether user MFA status is visible in memberships.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "userEmail", - "userPhone", - "userName", - "userMFA" - ], - "example": { - "$id": "password-dictionary", - "userId": true, - "userEmail": true, - "userPhone": true, - "userName": true, - "userMFA": true - } - }, - "authProvider": { - "description": "AuthProvider", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Auth Provider.", - "x-example": "github" - }, - "name": { - "type": "string", - "description": "Auth Provider name.", - "x-example": "GitHub" - }, - "appId": { - "type": "string", - "description": "OAuth 2.0 application ID.", - "x-example": "259125845563242502" - }, - "secret": { - "type": "string", - "description": "OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration. This property is write-only and always returned empty.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Auth Provider is active and can be used to create session.", - "x-example": "" - } - }, - "required": [ - "key", - "name", - "appId", - "secret", - "enabled" - ], - "example": { - "key": "github", - "name": "GitHub", - "appId": "259125845563242502", - "secret": "", - "enabled": "" - } - }, - "platformWeb": { - "description": "Platform Web", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": "app.example.com" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "hostname", - "key" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "hostname": "app.example.com" - } - }, - "platformApple": { - "description": "Platform Apple", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "bundleIdentifier" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "bundleIdentifier": "com.company.appname" - } - }, - "platformAndroid": { - "description": "Platform Android", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "applicationId": { - "type": "string", - "description": "Android application ID.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "applicationId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "applicationId": "com.company.appname" - } - }, - "platformWindows": { - "description": "Platform Windows", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageIdentifierName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageIdentifierName": "com.company.appname" - } - }, - "platformLinux": { - "description": "Platform Linux", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "packageName": { - "type": "string", - "description": "Linux package name.", - "x-example": "com.company.appname" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageName" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageName": "com.company.appname" - } - }, - "platformList": { - "description": "Platforms List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of platforms in the given project.", - "x-example": 5, - "format": "int32" - }, - "platforms": { - "type": "array", - "description": "List of platforms.", - "items": { - "x-anyOf": [ - { - "$ref": "#\/definitions\/platformWeb" - }, - { - "$ref": "#\/definitions\/platformApple" - }, - { - "$ref": "#\/definitions\/platformAndroid" - }, - { - "$ref": "#\/definitions\/platformWindows" - }, - { - "$ref": "#\/definitions\/platformLinux" - } - ], - "x-discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/definitions\/platformWeb", - "apple": "#\/definitions\/platformApple", - "android": "#\/definitions\/platformAndroid", - "windows": "#\/definitions\/platformWindows", - "linux": "#\/definitions\/platformLinux" - } - } - }, - "x-example": "" - } - }, - "required": [ - "total", - "platforms" - ], - "example": { - "total": 5, - "platforms": "" - } - }, - "variable": { - "description": "Variable", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Variable ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "key": { - "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" - }, - "value": { - "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" - }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false - }, - "resourceType": { - "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", - "x-example": "myAwesomeFunction" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "key", - "value", - "secret", - "resourceType", - "resourceId" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "API_KEY", - "value": "myPa$$word1", - "secret": false, - "resourceType": "function", - "resourceId": "myAwesomeFunction" - } - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", - "x-example": "online", - "enum": [ - "disabled", - "offline", - "online" - ] - } - }, - "required": [ - "version", - "status" - ], - "example": { - "version": "1.0.0", - "status": "online" - } - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": [ - "size" - ], - "example": { - "size": 8 - } - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the service.", - "x-example": "database" - }, - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values are: `pass`, `fail`", - "x-example": "pass", - "enum": [ - "pass", - "fail" - ], - "x-enum-name": "HealthCheckStatus" - } - }, - "required": [ - "name", - "ping", - "status" - ], - "example": { - "name": "database", - "ping": 128, - "status": "pass" - } - }, - "healthCertificate": { - "description": "Health Certificate", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "\/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" - }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" - }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ], - "example": { - "name": "\/CN=www.google.com", - "subjectSN": "", - "issuerOrganisation": "", - "validFrom": "1704200998", - "validTo": "1711458597", - "signatureTypeSN": "RSA-SHA256" - } - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": [ - "remoteTime", - "localTime", - "diff" - ], - "example": { - "remoteTime": 1639490751, - "localTime": 1639490844, - "diff": 93 - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Header name.", - "x-example": "Content-Type" - }, - "value": { - "type": "string", - "description": "Header value.", - "x-example": "application\/json" - } - }, - "required": [ - "name", - "value" - ], - "example": { - "name": "Content-Type", - "value": "application\/json" - } - }, - "specification": { - "description": "Specification", - "type": "object", - "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" - }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" - }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true - }, - "slug": { - "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" - } - }, - "required": [ - "memory", - "cpus", - "enabled", - "slug" - ], - "example": { - "memory": 512, - "cpus": 1, - "enabled": true, - "slug": "s-1vcpu-512mb" - } - }, - "emailTemplate": { - "description": "EmailTemplate", - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Template type", - "x-example": "verification" - }, - "locale": { - "type": "string", - "description": "Template locale", - "x-example": "en_us" - }, - "message": { - "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." - }, - "senderName": { - "type": "string", - "description": "Name of the sender", - "x-example": "My User" - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" - }, - "replyToName": { - "type": "string", - "description": "Reply to name", - "x-example": "Support Team" - }, - "subject": { - "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" - } - }, - "required": [ - "templateId", - "locale", - "message", - "senderName", - "senderEmail", - "replyToEmail", - "replyToName", - "subject" - ], - "example": { - "templateId": "verification", - "locale": "en_us", - "message": "Click on the link to verify your account.", - "senderName": "My User", - "senderEmail": "mail@appwrite.io", - "replyToEmail": "emails@appwrite.io", - "replyToName": "Support Team", - "subject": "Please verify your email address" - } - }, - "mfaChallenge": { - "description": "MFA Challenge", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" - }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true - }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true - }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true - }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true - } - }, - "required": [ - "totp", - "phone", - "email", - "recoveryCode" - ], - "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true - } - }, - "provider": { - "description": "Provider", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "additionalProperties": true, - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Mailgun", - "provider": "mailgun", - "enabled": true, - "type": "sms", - "credentials": { - "key": "123456789" - }, - "options": { - "from": "sender-email@mydomain" - } - } - }, - "message": { - "description": "Message", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "x-nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "x-nullable": true - }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" - }, - "data": { - "type": "object", - "additionalProperties": true, - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } - }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "processing", - "enum": [ - "draft", - "processing", - "scheduled", - "sent", - "failed" - ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "topics": [ - "5e5ea5c16897e" - ], - "users": [ - "5e5ea5c16897e" - ], - "targets": [ - "5e5ea5c16897e" - ], - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "deliveredAt": "2020-10-15T06:38:00.000+00:00", - "deliveryErrors": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "deliveredTotal": 1, - "data": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - }, - "status": "processing" - } - }, - "topic": { - "description": "Topic", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Topic creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Topic update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "The name of the topic.", - "x-example": "events" - }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" - }, - "subscribe": { - "type": "array", - "description": "Subscribe permissions.", - "items": { - "type": "string" - }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "events", - "emailTotal": 100, - "smsTotal": 100, - "pushTotal": 100, - "subscribe": "users" - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" - }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - } - }, - "userId": { - "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { - "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" - } - }, - "target": { - "description": "Target", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" - }, - "providerId": { - "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "x-nullable": true - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" - }, - "identifier": { - "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false - } - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https:\/\/appwrite.io\/docs" - } -} \ No newline at end of file From 18ae81bbb0fdccc67d0208873c1f3d1ccd7f453b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 30 Apr 2026 18:33:20 +0530 Subject: [PATCH 073/192] Refactor presence management by introducing caching mechanisms for list responses. Added methods for loading, saving, and purging cache fields in the PresenceState class. Updated API endpoints to utilize caching, including purge functionality in Update and Delete actions. Enhanced tests to verify cache behavior during presence updates and deletions. --- src/Appwrite/Databases/PresenceState.php | 82 ++++++- .../Modules/Presences/HTTP/Delete.php | 3 + .../Modules/Presences/HTTP/Update.php | 13 ++ .../Platform/Modules/Presences/HTTP/XList.php | 73 ++++++- tests/e2e/Services/Presence/PresenceBase.php | 204 ++++++++++++++++++ 5 files changed, 363 insertions(+), 12 deletions(-) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index dad34b2e12..32a11ce7be 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -17,6 +17,9 @@ use Utopia\Database\Validator\Authorization; class PresenceState { + public const LIST_CACHE_FIELD_PRESENCES = 'presences'; + public const LIST_CACHE_FIELD_TOTAL = 'total'; + public const COLLECTION_ID = 'presenceLogs'; public function setPermissions(Document $document, ?array $permissions, User $user, Authorization $authorization): Document { $isAPIKey = $user->isApp($authorization->getRoles()); @@ -66,8 +69,8 @@ class PresenceState try { if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { - $presenceCreated = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])])->isEmpty(); - $presence = $dbForProject->upsertDocument('presenceLogs', $presenceDocument); + $presenceCreated = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userId', [$userId])])->isEmpty(); + $presence = $dbForProject->upsertDocument(self::COLLECTION_ID, $presenceDocument); } else { $presence = $this->transactionalUpsertForUser( $dbForProject, @@ -102,15 +105,15 @@ class PresenceState ?bool &$presenceCreated = null ): Document { return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId, &$presenceCreated) { - $existingPresence = $dbForProject->findOne('presenceLogs', [Query::equal('userId', [$userId])]); + $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userId', [$userId])]); if ($existingPresence->isEmpty()) { $presenceCreated = true; - return $dbForProject->createDocument('presenceLogs', $presenceDocument); + return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); } // Lock current state to avoid races while resolving upsert by userId. - $currentPresence = $dbForProject->getDocument('presenceLogs', $existingPresence->getId(), forUpdate: true); + $currentPresence = $dbForProject->getDocument(self::COLLECTION_ID, $existingPresence->getId(), forUpdate: true); if ($currentPresence->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); @@ -118,11 +121,11 @@ class PresenceState if ($presenceId !== 'unique()' && $currentPresence->getId() !== $presenceId) { $presenceDocument->setAttribute('$id', $presenceId); - $dbForProject->deleteDocument('presenceLogs', $currentPresence->getId()); - return $dbForProject->createDocument('presenceLogs', $presenceDocument); + $dbForProject->deleteDocument(self::COLLECTION_ID, $currentPresence->getId()); + return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); } - return $dbForProject->updateDocument('presenceLogs', $currentPresence->getId(), $presenceDocument); + return $dbForProject->updateDocument(self::COLLECTION_ID, $currentPresence->getId(), $presenceDocument); }); } @@ -147,4 +150,67 @@ class PresenceState } } } + + private function getListCacheKey(Database $dbForProject): string + { + return \sprintf( + '%s-cache:%s:%s:%s:collection:%s', + $dbForProject->getCacheName(), + $dbForProject->getAdapter()->getHostname(), + $dbForProject->getNamespace(), + $dbForProject->getTenant(), + self::COLLECTION_ID + ); + } + + private function getListCacheField(array $roles, array $queries, string $type): string + { + $serialized = \array_map( + static fn ($query) => $query instanceof Query ? $query->toArray() : $query, + $queries, + ); + + return \sprintf( + '%s:%s:%s', + \md5(\json_encode($roles)), + \md5(\json_encode($serialized)), + $type, + ); + } + + public function loadListCacheField( + Database $dbForProject, + array $roles, + array $queries, + string $type, + int $ttl + ): mixed { + $cacheField = $this->getListCacheField($roles, $queries, $type); + + try { + return $dbForProject->getCache()->load($this->getListCacheKey($dbForProject), $ttl, $cacheField); + } catch (\Throwable) { + return null; + } + } + + public function saveListCacheField( + Database $dbForProject, + array $roles, + array $queries, + string $type, + mixed $value + ): void { + $cacheField = $this->getListCacheField($roles, $queries, $type); + + try { + $dbForProject->getCache()->save($this->getListCacheKey($dbForProject), $value, $cacheField); + } catch (\Throwable) { + } + } + + public function purgeListCache(Database $dbForProject): bool + { + return $dbForProject->getCache()->purge($this->getListCacheKey($dbForProject)); + } } diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 84877d404e..6963bda7d2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Databases\PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; @@ -73,6 +74,8 @@ class Delete extends PlatformAction throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT); } + (new PresenceState())->purgeListCache($dbForProject); + $usage->addMetric(METRIC_PRESENCE_DELETED, 1); $usage->addMetric(METRIC_USERS_PRESENCE, -1); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 27f15a802e..336264730d 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -22,6 +22,7 @@ use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; +use Utopia\Validator\Boolean; use Utopia\Validator\JSON; use Utopia\Validator\Nullable; use Utopia\Validator\Text; @@ -64,6 +65,7 @@ class Update extends PlatformAction new Parameter('expiresAt', optional: true), new Parameter('metadata', optional: true), new Parameter('permissions', optional: true), + new Parameter('purge', optional: true), ], ), // Server-side SDK: `userId` is required when authenticating with API keys/JWT. @@ -86,6 +88,7 @@ class Update extends PlatformAction new Parameter('expiresAt', optional: true), new Parameter('metadata', optional: true), new Parameter('permissions', optional: true), + new Parameter('purge', optional: true), ], ), ]) @@ -99,6 +102,7 @@ class Update extends PlatformAction )), 'Presence expiry datetime.', true) ->param('metadata', null, new Nullable(new JSON()), 'Presence metadata object.', true) ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('purge', false, new Boolean(true), 'When true, purge cached responses used by list presences endpoint.', true) ->inject('response') ->inject('dbForProject') ->inject('user') @@ -114,6 +118,7 @@ class Update extends PlatformAction ?string $expiresAt, ?array $metadata, ?array $permissions, + bool $purge, Response $response, Database $dbForProject, User $user, @@ -164,6 +169,9 @@ class Update extends PlatformAction } if (empty($updateData) && $permissions === null) { + if ($purge) { + $presenceState->purgeListCache($dbForProject); + } $response->dynamic($presence, Response::MODEL_PRESENCE); return; } @@ -177,6 +185,11 @@ class Update extends PlatformAction } catch (ConflictException $e) { throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT, $e->getMessage(), previous: $e); } + + if ($purge) { + $presenceState->purgeListCache($dbForProject); + } + $queueForEvents->setParam('presenceId', $presence->getId()); $response->dynamic($presence, Response::MODEL_PRESENCE); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index eb6e794361..2d84fcfc7f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; +use Appwrite\Databases\PresenceState; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; @@ -20,6 +21,7 @@ use Utopia\Database\Validator\Query\Cursor; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Boolean; +use Utopia\Validator\Range; class XList extends PlatformAction { @@ -53,12 +55,13 @@ class XList extends PlatformAction )) ->param('queries', [], new PresencesQueries(), 'Array of query strings generated using the Query class provided by the SDK.', true) ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) + ->param('ttl', 0, new Range(min: 0, max: 86400), 'TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).', true) ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); } - public function action(array $queries, bool $includeTotal, Response $response, Database $dbForProject): void + public function action(array $queries, bool $includeTotal, int $ttl, Response $response, Database $dbForProject): void { try { // TODO: make sure to add one more query here if not given -> send only not-expired presence -> presence will be cleared by the maintainance workers @@ -87,11 +90,73 @@ class XList extends PlatformAction $cursor->setValue($cursorDocument); } - $filterQueries = Query::groupByType($queries)['filters']; + $groupedQueries = Query::groupByType($queries); + $filterQueries = $groupedQueries['filters'] ?? []; try { - $documents = $dbForProject->find('presenceLogs', $queries); - $total = $includeTotal ? $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT) : 0; + if ((int)$ttl > 0) { + $presenceState = new PresenceState(); + $roles = $dbForProject->getAuthorization()->getRoles(); + + $documentsCacheHit = false; + $cachedDocuments = $presenceState->loadListCacheField( + $dbForProject, + $roles, + $queries, + PresenceState::LIST_CACHE_FIELD_PRESENCES, + $ttl + ); + + if ($cachedDocuments !== null && + $cachedDocuments !== false && + \is_array($cachedDocuments)) { + $documents = \array_map(function ($doc) { + return new Document($doc); + }, $cachedDocuments); + $documentsCacheHit = true; + } else { + $documents = $dbForProject->find('presenceLogs', $queries); + $documentsArray = \array_map(function ($doc) { + return $doc->getArrayCopy(); + }, $documents); + $presenceState->saveListCacheField( + $dbForProject, + $roles, + $queries, + PresenceState::LIST_CACHE_FIELD_PRESENCES, + $documentsArray + ); + } + + if ($includeTotal) { + $cachedTotal = $presenceState->loadListCacheField( + $dbForProject, + $roles, + $filterQueries, + PresenceState::LIST_CACHE_FIELD_TOTAL, + $ttl + ); + if ($cachedTotal !== null && $cachedTotal !== false) { + $total = (int) $cachedTotal; + } else { + $total = $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT); + $presenceState->saveListCacheField( + $dbForProject, + $roles, + $filterQueries, + PresenceState::LIST_CACHE_FIELD_TOTAL, + $total + ); + } + } else { + $total = 0; + } + + $response->addHeader('X-Appwrite-Cache', $documentsCacheHit ? 'hit' : 'miss'); + } else { + $documents = $dbForProject->find('presenceLogs', $queries); + $total = $includeTotal ? $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT) : 0; + } } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); } catch (StructureException $e) { diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index c5f2f5409a..9131af18dd 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -531,6 +531,210 @@ trait PresenceBase $this->assertEquals(204, $delete['headers']['status-code']); } + public function testUpdatePresencePurgeListCache(): void + { + if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'status' => 'cache-update-setup', + 'metadata' => ['cache' => 'update-setup'], + ] + ); + $this->assertEquals(200, $upsert['headers']['status-code']); + $presence = $upsert['body']; + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)); + } else { + $presence = $this->setupPresence([ + 'status' => 'cache-update-setup', + 'metadata' => ['cache' => 'update-setup'], + ]); + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getPresenceServerHeaders()); + } + + $listPayload = [ + 'queries' => [ + Query::equal('userId', [$presence['userId']])->toString(), + ], + 'ttl' => 60, + ]; + + $list1 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list1['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list1['headers']); + + $list2 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list2['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list2['headers']); + $this->assertEquals('hit', $list2['headers']['x-appwrite-cache']); + + $updatePayload = [ + 'status' => 'cache-update-applied', + 'purge' => true, + ]; + + if ($this->getSide() !== 'client') { + $updatePayload['userId'] = $presence['userId']; + } + + $update = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presence['$id'], + $headers, + $updatePayload + ); + $this->assertEquals(200, $update['headers']['status-code']); + $this->assertEquals('cache-update-applied', $update['body']['status']); + + $list3 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list3['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list3['headers']); + $this->assertEquals('miss', $list3['headers']['x-appwrite-cache']); + } + + public function testUpdatePresencePurgeOnlyListCache(): void + { + if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'status' => 'cache-purge-only-setup', + 'metadata' => ['cache' => 'purge-only-setup'], + ] + ); + $this->assertEquals(200, $upsert['headers']['status-code']); + $presence = $upsert['body']; + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)); + } else { + $presence = $this->setupPresence([ + 'status' => 'cache-purge-only-setup', + 'metadata' => ['cache' => 'purge-only-setup'], + ]); + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getPresenceServerHeaders()); + } + + $listPayload = [ + 'queries' => [ + Query::equal('userId', [$presence['userId']])->toString(), + ], + 'ttl' => 60, + ]; + + $list1 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list1['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list1['headers']); + + $list2 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list2['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list2['headers']); + $this->assertEquals('hit', $list2['headers']['x-appwrite-cache']); + + $updatePayload = [ + 'purge' => true, + ]; + + if ($this->getSide() !== 'client') { + $updatePayload['userId'] = $presence['userId']; + } + + $update = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presence['$id'], + $headers, + $updatePayload + ); + $this->assertEquals(200, $update['headers']['status-code']); + $this->assertEquals($presence['$id'], $update['body']['$id']); + + $list3 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list3['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list3['headers']); + $this->assertEquals('miss', $list3['headers']['x-appwrite-cache']); + } + + public function testDeletePresencePurgesListCache(): void + { + if ($this->getSide() === 'client') { + $upsert = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)), + [ + 'status' => 'cache-delete-setup', + 'metadata' => ['cache' => 'delete-setup'], + ] + ); + $this->assertEquals(200, $upsert['headers']['status-code']); + $presence = $upsert['body']; + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)); + } else { + $presence = $this->setupPresence([ + 'status' => 'cache-delete-setup', + 'metadata' => ['cache' => 'delete-setup'], + ]); + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getPresenceServerHeaders()); + } + + $listPayload = [ + 'queries' => [ + Query::equal('userId', [$presence['userId']])->toString(), + ], + 'ttl' => 60, + ]; + + $list1 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list1['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list1['headers']); + + $list2 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list2['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list2['headers']); + $this->assertEquals('hit', $list2['headers']['x-appwrite-cache']); + + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presence['$id'], + $headers + ); + $this->assertEquals(204, $delete['headers']['status-code']); + + $list3 = $this->client->call(Client::METHOD_GET, '/presences', $headers, $listPayload); + $this->assertEquals(200, $list3['headers']['status-code']); + $this->assertArrayHasKey('x-appwrite-cache', $list3['headers']); + $this->assertEquals('miss', $list3['headers']['x-appwrite-cache']); + } + public function testUpdateNotFound(): void { if ($this->getSide() === 'client') { From 6dae78a206c84f435253eb587daa7d5f984a6ceb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 30 Apr 2026 18:48:54 +0530 Subject: [PATCH 074/192] linting --- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 2d84fcfc7f..94710715cc 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -91,7 +91,7 @@ class XList extends PlatformAction } $groupedQueries = Query::groupByType($queries); - $filterQueries = $groupedQueries['filters'] ?? []; + $filterQueries = $groupedQueries['filters']; try { if ((int)$ttl > 0) { From 8cef822e8f7ba3a30cbcb7b0f28ee0ba43edee4b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 30 Apr 2026 18:50:46 +0530 Subject: [PATCH 075/192] Refactor presence management to use userInternalId instead of userId for improved consistency and clarity. Updated relevant methods in PresenceState and Upsert classes to reflect this change, ensuring proper handling of user identifiers across the application. --- app/realtime.php | 2 +- src/Appwrite/Databases/PresenceState.php | 14 +++++++------- .../Platform/Modules/Presences/HTTP/Upsert.php | 8 ++++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index b4bcd37034..17edb7bbbc 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1527,7 +1527,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $database, $presenceDocument, $presenceId, - $userId, + (string) $user->getSequence(), function () use ($project): void { if ($project !== null && !$project->isEmpty()) { triggerPresenceUsage(1, $project->getId()); diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 32a11ce7be..8ba5b23eab 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -58,7 +58,7 @@ class PresenceState Database $dbForProject, Document $presenceDocument, string $presenceId, - string $userId, + mixed $userInternalId, ?callable $onPresenceCreated = null ): Document { if ($presenceId !== 'unique()') { @@ -69,14 +69,14 @@ class PresenceState try { if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { - $presenceCreated = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userId', [$userId])])->isEmpty(); + $presenceCreated = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])])->isEmpty(); $presence = $dbForProject->upsertDocument(self::COLLECTION_ID, $presenceDocument); } else { $presence = $this->transactionalUpsertForUser( $dbForProject, $presenceDocument, $presenceId, - $userId, + $userInternalId, $presenceCreated ); } @@ -101,18 +101,18 @@ class PresenceState Database $dbForProject, Document $presenceDocument, string $presenceId, - string $userId, + mixed $userInternalId, ?bool &$presenceCreated = null ): Document { - return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userId, &$presenceCreated) { - $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userId', [$userId])]); + return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userInternalId, &$presenceCreated) { + $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); if ($existingPresence->isEmpty()) { $presenceCreated = true; return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); } - // Lock current state to avoid races while resolving upsert by userId. + // Lock current state to avoid races while resolving upsert by userInternalId. $currentPresence = $dbForProject->getDocument(self::COLLECTION_ID, $existingPresence->getId(), forUpdate: true); if ($currentPresence->isEmpty()) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 8297639045..0be1c58402 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -147,9 +147,13 @@ class Upsert extends PlatformAction throw new Exception(Exception::USER_NOT_FOUND, params: [$userId]); } - $userInternalId = $fetchedUser->getSequence(); + $userInternalId = (string) $fetchedUser->getSequence(); $resolvedUserId = $fetchedUser->getId(); } + + if (empty($userInternalId)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to resolve valid user internal ID.'); + } $isGraphQL = $request->getHeader('x-appwrite-source') === 'graphql'; $presenceData = [ @@ -170,7 +174,7 @@ class Upsert extends PlatformAction $dbForProject, $presenceDocument, $presenceId, - $resolvedUserId, + $userInternalId, fn () => $usage->addMetric(METRIC_USERS_PRESENCE, 1) ); $queueForEvents->setParam('presenceId', $presence->getId()); From 429454ca0e3795aa4b9b3350af173a297ece2a5d Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 11:18:22 +0530 Subject: [PATCH 076/192] added handlers --- app/realtime.php | 407 ++---------------- src/Appwrite/Realtime/Message/Dispatcher.php | 150 +++++++ .../Handlers/AuthenticationHandler.php | 120 ++++++ .../Realtime/Message/Handlers/PingHandler.php | 28 ++ .../Message/Handlers/PresenceHandler.php | 110 +++++ .../Message/Handlers/SubscribeHandler.php | 109 +++++ .../Message/Handlers/UnsubscribeHandler.php | 74 ++++ .../Validators/SubscribePayloadValidator.php | 56 +++ .../UnsubscribePayloadValidator.php | 47 ++ 9 files changed, 720 insertions(+), 381 deletions(-) create mode 100644 src/Appwrite/Realtime/Message/Dispatcher.php create mode 100644 src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php create mode 100644 src/Appwrite/Realtime/Message/Handlers/PingHandler.php create mode 100644 src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php create mode 100644 src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php create mode 100644 src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php create mode 100644 src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php create mode 100644 src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php diff --git a/app/realtime.php b/app/realtime.php index 17edb7bbbc..b7b48ccdd3 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -10,6 +10,12 @@ use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; use Appwrite\PubSub\Adapter\Pool as PubSubPool; +use Appwrite\Realtime\Message\Dispatcher as MessageDispatcher; +use Appwrite\Realtime\Message\Handlers\AuthenticationHandler; +use Appwrite\Realtime\Message\Handlers\PingHandler; +use Appwrite\Realtime\Message\Handlers\PresenceHandler; +use Appwrite\Realtime\Message\Handlers\SubscribeHandler; +use Appwrite\Realtime\Message\Handlers\UnsubscribeHandler; use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; @@ -22,9 +28,6 @@ use Swoole\Table; use Swoole\Timer; use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis; -use Utopia\Auth\Hashes\Sha; -use Utopia\Auth\Proofs\Token; -use Utopia\Auth\Store; use Utopia\Cache\Adapter\Pool as CachePool; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; @@ -417,6 +420,13 @@ $container->set('queueForRealtime', function () { $realtime = getRealtime(); $presenceState = new PresenceState(); +$messageDispatcher = (new MessageDispatcher()) + ->register(new PingHandler()) + ->register(new AuthenticationHandler()) + ->register(new SubscribeHandler()) + ->register(new UnsubscribeHandler()) + ->register(new PresenceHandler()); + /** * Table for statistics across all workers. */ @@ -1108,15 +1118,12 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, } }); -$server->onMessage(function (int $connection, string $message) use ($server, $realtime, $containerId, $register, $presenceState) { +$server->onMessage(function (int $connection, string $message) use ($server, $realtime, $containerId, $register, $presenceState, $messageDispatcher) { $project = null; $authorization = null; $projectId = $realtime->connections[$connection]['projectId'] ?? null; $rawSize = \strlen($message); $messageType = 'invalid'; - $subscriptionDelta = 0; - $subscriptionsRequested = 0; - $subscriptionsRemoved = 0; $outboundBytes = 0; $responseCode = 200; $success = false; @@ -1194,378 +1201,20 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Message type is not valid.'); } - // Ping does not require project context; other messages do (e.g. after unsubscribe during auth) - if (empty($projectId) && ($message['type'] ?? '') !== 'ping') { - throw new Exception(Exception::REALTIME_POLICY_VIOLATION, 'Missing project context. Reconnect to the project first.'); - } + $messageContainer = new Container(); + $messageContainer->set('connection', fn () => $connection); + $messageContainer->set('server', fn () => $server); + $messageContainer->set('realtime', fn () => $realtime); + $messageContainer->set('register', fn () => $register); + $messageContainer->set('response', fn () => $response); + $messageContainer->set('presenceState', fn () => $presenceState); + $messageContainer->set('database', fn () => $database); + $messageContainer->set('authorization', fn () => $authorization); + $messageContainer->set('project', fn () => $project); + $messageContainer->set('projectId', fn () => $projectId); - switch ($message['type']) { - case 'ping': - $pongPayloadJson = json_encode([ - 'type' => 'pong' - ]); + $messageDispatcher->dispatch($messageContainer, $message, $outboundBytes); - $server->send([$connection], $pongPayloadJson); - $outboundBytes += \strlen($pongPayloadJson); - - if ($project !== null && !$project->isEmpty()) { - $pongOutboundBytes = \strlen($pongPayloadJson); - - if ($pongOutboundBytes > 0) { - triggerStats([ - METRIC_REALTIME_OUTBOUND => $pongOutboundBytes, - ], $project->getId()); - } - } - - break; - case 'authentication': - if (!array_key_exists('session', $message['data'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); - } - - $store = new Store(); - - $store->decode($message['data']['session']); - - /** @var User $user */ - $user = $database->getDocument('users', $store->getProperty('id', '')); - - /** - * TODO: - * Moving forward, we should try to use our dependency injection container - * to inject the proof for token. - * This way we will have one source of truth for the proof for token. - */ - $proofForToken = new Token(); - $proofForToken->setHash(new Sha()); - - if ( - empty($user->getId()) // Check a document has been found in the DB - || !$user->sessionVerify($store->getProperty('secret', ''), $proofForToken) // Validate user has valid login token - ) { - // cookie not valid - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); - } - - $roles = $user->getRoles($database->getAuthorization()); - - $authorization = $realtime->connections[$connection]['authorization'] ?? null; - $projectId = $realtime->connections[$connection]['projectId'] ?? null; - // Capture the pre-auth userId so we can rebind any account channels - // that were stored under it (e.g. guest who subscribed to `account` - // and now authenticates). unsubscribe() below clears the connection - // entry, so we must read it first. - $previousUserId = $realtime->connections[$connection]['userId'] ?? ''; - - $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); - $meta = $realtime->getSubscriptionMetadata($connection); - - $realtime->unsubscribe($connection); - - if (!empty($projectId)) { - foreach ($meta as $subscriptionId => $subscription) { - $queries = Query::parseQueries($subscription['queries'] ?? []); - $channels = Realtime::rebindAccountChannels( - $subscription['channels'] ?? [], - $previousUserId, - $user->getId() - ); - - $realtime->subscribe( - $projectId, - $connection, - $subscriptionId, - $roles, - $channels, - $queries, - $user->getId() - ); - } - } - - if ($authorization !== null) { - $realtime->connections[$connection]['authorization'] = $authorization; - } - - $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); - $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; - if ($subscriptionDelta !== 0) { - $register->get('telemetry.workerSubscriptionCounter')->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); - } - - $user = $response->output($user, Response::MODEL_ACCOUNT); - - $authResponsePayloadJson = json_encode([ - 'type' => 'response', - 'data' => [ - 'to' => 'authentication', - 'success' => true, - 'user' => $user - ] - ]); - - $server->send([$connection], $authResponsePayloadJson); - $outboundBytes += \strlen($authResponsePayloadJson); - - if ($project !== null && !$project->isEmpty()) { - $authOutboundBytes = \strlen($authResponsePayloadJson); - - if ($authOutboundBytes > 0) { - triggerStats([ - METRIC_REALTIME_OUTBOUND => $authOutboundBytes, - ], $project->getId()); - } - } - - break; - - case 'subscribe': - /** - * Message based upsertion of a subscription - * If subscriptionId is given then it will match subId of the connection and update the subscription with channels and queries - * If non-existing subid is given or not given a new subid will be generated - * Similar to what we have now -> two subscribe() block with same channels and queries still two different subscriptions - * - * structure of the payload -> array of maps - * 'data' : [subscriptionId:"" , channels:[] , queries:[]] - */ - if (!is_array($message['data']) || !array_is_list($message['data'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); - } - - $roles = $realtime->connections[$connection]['roles'] ?? [Role::guests()->toString()]; - $userId = $realtime->connections[$connection]['userId'] ?? ''; - - // bulk validation + parsing before subscribing - $parsedPayloads = []; - $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); - foreach ($message['data'] as $payload) { - if (!\is_array($payload)) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Each subscribe payload must be an object.'); - } - if (!array_key_exists('channels', $payload)) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'channels is not present in payload.'); - } - if (!is_array($payload['channels']) || !array_is_list($payload['channels'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'channels is not a valid array.'); - } - // registering the queries if not present and check in the same payload later on - if (!array_key_exists('queries', $payload)) { - $payload['queries'] = []; - } - if (!is_array($payload['queries']) || !array_is_list($payload['queries'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'queries is not a valid array.'); - } - - $subscriptionId = \array_key_exists('subscriptionId', $payload) - ? $payload['subscriptionId'] - : ID::unique(); - - try { - $convertedQueries = Realtime::convertQueries($payload['queries']); - } catch (QueryException $e) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: ' . $e->getMessage()); - } - - $convertedChannels = \array_keys(Realtime::convertChannels($payload['channels'], $userId)); - - $parsedPayloads[] = [ - 'subscriptionId' => $subscriptionId, - 'channels' => $payload['channels'], - 'convertedChannels' => $convertedChannels, - 'queries' => $convertedQueries, - ]; - } - - foreach ($parsedPayloads as $parsedPayload) { - $subscriptionId = $parsedPayload['subscriptionId']; - $channels = $parsedPayload['convertedChannels']; - $queries = $parsedPayload['queries']; - $realtime->subscribe($projectId, $connection, $subscriptionId, $roles, $channels, $queries); - } - $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); - $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; - $subscriptionsRequested = \count($parsedPayloads); - if ($subscriptionDelta !== 0) { - $register->get('telemetry.workerSubscriptionCounter')->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); - } - - $responsePayload = json_encode([ - 'type' => 'response', - 'data' => [ - 'to' => 'subscribe', - 'success' => true, - 'subscriptions' => \array_map(function (array $parsedPayload) { - return [ - 'subscriptionId' => $parsedPayload['subscriptionId'], - 'channels' => $parsedPayload['convertedChannels'], - 'queries' => \array_map(fn ($q) => $q->toString(), $parsedPayload['queries']), - ]; - }, $parsedPayloads), - ] - ]); - - $server->send([$connection], $responsePayload); - $outboundBytes += \strlen($responsePayload); - - if ($project !== null && !$project->isEmpty()) { - $subscribeOutboundBytes = \strlen($responsePayload); - - if ($subscribeOutboundBytes > 0) { - triggerStats([ - METRIC_REALTIME_OUTBOUND => $subscribeOutboundBytes, - ], $project->getId()); - } - } - - break; - - case 'unsubscribe': - if (!\is_array($message['data']) || !\array_is_list($message['data'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); - } - - $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); - - // Validate every payload before executing any removal so an invalid entry - // later in the batch does not leave earlier entries half-applied on the server. - $validatedIds = []; - foreach ($message['data'] as $payload) { - if ( - !\is_array($payload) - || !\array_key_exists('subscriptionId', $payload) - || !\is_string($payload['subscriptionId']) - || $payload['subscriptionId'] === '' - ) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Each unsubscribe payload must include a non-empty subscriptionId.'); - } - $validatedIds[] = $payload['subscriptionId']; - } - - $unsubscribeResults = []; - foreach ($validatedIds as $subscriptionId) { - $wasRemoved = $realtime->unsubscribeSubscription($connection, $subscriptionId); - $unsubscribeResults[] = [ - 'subscriptionId' => $subscriptionId, - 'removed' => $wasRemoved, - ]; - } - $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); - $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; - $subscriptionsRequested = \count($validatedIds); - $subscriptionsRemoved = \count(\array_filter($unsubscribeResults, fn (array $item) => $item['removed'])); - if ($subscriptionDelta !== 0) { - $register->get('telemetry.workerSubscriptionCounter')->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); - } - - $unsubscribeResponsePayload = json_encode([ - 'type' => 'response', - 'data' => [ - 'to' => 'unsubscribe', - 'success' => true, - 'subscriptions' => $unsubscribeResults, - ], - ]); - - $server->send([$connection], $unsubscribeResponsePayload); - $outboundBytes += \strlen($unsubscribeResponsePayload); - - if ($project !== null && !$project->isEmpty()) { - $unsubscribeOutboundBytes = \strlen($unsubscribeResponsePayload); - - if ($unsubscribeOutboundBytes > 0) { - triggerStats([ - METRIC_REALTIME_OUTBOUND => $unsubscribeOutboundBytes, - ], $project->getId()); - } - } - - break; - - case 'presence': - $userId = $realtime->connections[$connection]['userId']; - if (empty($userId)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); - } - /** @var User $user */ - $user = $database->getDocument('users', $userId); - - if ($user->isEmpty()) { - throw new Exception(Exception::USER_NOT_FOUND, params:[$userId]); - } - - if (!is_array($message['data'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); - } - - if (!array_key_exists('status', $message['data'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid. status must be provided'); - } - - if (array_key_exists('permissions', $message['data']) && !\is_array($message['data']['permissions'])) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid. permissions must be an array.'); - } - - $presenceData = [ - 'userInternalId' => $user->getSequence(), - 'userId' => $user->getId(), - 'source' => 'realtime', - 'status' => $message['data']['status'] - ]; - - // TODO: add the created presence id to the connections connection id array for deletion at the end(bulk delete) - - if (array_key_exists('metadata', $message['data'])) { - $presenceData['metadata'] = $message['data']['metadata']; - } - $presenceDocument = new Document($presenceData); - $presenceState->setPermissions($presenceDocument, $message['data']['permissions'] ?? null, $user, $authorization); - - $presenceId = $message['data']['presenceId'] ?? 'unique()'; - $presence = $presenceState->upsertForUser( - $database, - $presenceDocument, - $presenceId, - (string) $user->getSequence(), - function () use ($project): void { - if ($project !== null && !$project->isEmpty()) { - triggerPresenceUsage(1, $project->getId()); - } - } - ); - - $presence->removeAttribute('hostname'); - - $realtime->connections[$connection]['presences'] = array_merge($realtime->connections[$connection]['presences'] ?? [], [$presence->getId()]); - - $responsePayload = json_encode([ - 'type' => 'response', - 'data' => [ - 'to' => 'presence', - 'presence' => $presence->getArrayCopy() - ] - ]); - - $server->send([$connection], $responsePayload); - - if ($project !== null && !$project->isEmpty()) { - $subscribeOutboundBytes = \strlen($responsePayload); - - if ($subscribeOutboundBytes > 0) { - triggerStats([ - METRIC_REALTIME_OUTBOUND => $subscribeOutboundBytes, - ], $project->getId()); - } - } - - triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); - - break; - - default: - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Message type is not valid.'); - } $success = true; } catch (Throwable $th) { logError($th, 'realtimeMessage', project: $project, authorization: $authorization); @@ -1601,10 +1250,6 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } finally { Span::add('realtime.success', $success); Span::add('realtime.responseCode', $responseCode); - Span::add('realtime.subscriptionDelta', $subscriptionDelta); - Span::add('realtime.subscriptionsRequested', $subscriptionsRequested); - Span::add('realtime.subscriptionsRemoved', $subscriptionsRemoved); - Span::add('realtime.subscribe.subscriptionsCount', $subscriptionsRequested); Span::add('realtime.outboundBytes', $outboundBytes); Span::add('realtime.projectId', $project?->getId() ?? $projectId); Span::add('realtime.userId', $realtime->connections[$connection]['userId'] ?? null); diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php new file mode 100644 index 0000000000..729b0f7b11 --- /dev/null +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -0,0 +1,150 @@ +<?php + +namespace Appwrite\Realtime\Message; + +use Appwrite\Extend\Exception; +use Utopia\Database\Document; +use Utopia\DI\Container; +use Utopia\Platform\Action; + +class Dispatcher +{ + public const LABEL_MESSAGE_TYPE = 'messageType'; + public const LABEL_PAYLOAD_SHAPE = 'payloadShape'; + public const LABEL_REQUIRES_PROJECT = 'requiresProjectContext'; + + public const PAYLOAD_SHAPE_OBJECT = 'object'; + public const PAYLOAD_SHAPE_LIST = 'list'; + + /** + * @var array<string, Action> + */ + private array $handlers = []; + + public function register(Action $handler): self + { + $labels = $handler->getLabels(); + $type = $labels[self::LABEL_MESSAGE_TYPE] + ?? throw new \LogicException('Realtime message handler is missing the messageType label.'); + + $this->handlers[$type] = $handler; + return $this; + } + + /** + * @return array<string, Action> + */ + public function getHandlers(): array + { + return $this->handlers; + } + + /** + * Dispatches a parsed websocket message to the handler that registered for its `type`. + * + * On success: invokes the handler, sends the JSON response (when the handler returns a + * payload), and accumulates outbound bytes / outbound stats. Errors propagate so the + * outer onMessage handler can render them as websocket error frames. + * + * @param Container $container per-message container resolving 'connection', 'server', + * 'project', 'projectId' and any handler-declared injections. + * @param array<mixed> $message decoded inbound websocket frame: `['type' => ..., 'data' => ...]`. + * @param int $outboundBytes counter incremented by the size of any response sent. + */ + public function dispatch(Container $container, array $message, int &$outboundBytes): void + { + $type = $message['type'] ?? ''; + if (!\is_string($type) || !isset($this->handlers[$type])) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Message type is not valid.'); + } + + $handler = $this->handlers[$type]; + $labels = $handler->getLabels(); + + $requiresProject = $labels[self::LABEL_REQUIRES_PROJECT] ?? true; + if ($requiresProject && empty($container->get('projectId'))) { + throw new Exception( + Exception::REALTIME_POLICY_VIOLATION, + 'Missing project context. Reconnect to the project first.' + ); + } + + $shape = $labels[self::LABEL_PAYLOAD_SHAPE] ?? self::PAYLOAD_SHAPE_OBJECT; + $data = $message['data'] ?? ($shape === self::PAYLOAD_SHAPE_LIST ? [] : []); + + $args = $this->resolveArgs($handler, $data, $shape, $container); + + $payload = ($handler->getCallback())(...$args); + + if ($payload === null) { + return; + } + + $json = \json_encode($payload); + $server = $container->get('server'); + $server->send([$container->get('connection')], $json); + $outboundBytes += \strlen($json); + + /** @var ?Document $project */ + $project = $container->get('project'); + if ($project !== null && !$project->isEmpty() && \strlen($json) > 0) { + \triggerStats([METRIC_REALTIME_OUTBOUND => \strlen($json)], $project->getId()); + } + } + + /** + * Resolves the ordered argument list for the handler callback by walking the action's + * declared option sequence. Params come from the inbound `data` (for object shape) or + * the entire data list (for list shape). Injections come from the per-message container. + * + * @return array<int, mixed> + */ + private function resolveArgs(Action $handler, mixed $data, string $shape, Container $container): array + { + $values = []; + + foreach ($handler->getParams() as $key => $param) { + if ($shape === self::PAYLOAD_SHAPE_LIST) { + $present = true; + $value = $data; + } else { + $present = \is_array($data) && \array_key_exists($key, $data); + $value = $present ? $data[$key] : $param['default']; + } + + if (!$present && !$param['optional']) { + throw new Exception( + Exception::REALTIME_MESSAGE_FORMAT_INVALID, + \sprintf('%s is required.', $key) + ); + } + + if ($present && !($param['skipValidation'] ?? false)) { + $validator = $param['validator']; + if (\is_callable($validator) && !($validator instanceof \Utopia\Validator)) { + $validator = $validator(); + } + if (!$validator->isValid($value)) { + throw new Exception( + Exception::REALTIME_MESSAGE_FORMAT_INVALID, + \sprintf('%s: %s', $key, $validator->getDescription()) + ); + } + } + + $values[$key] = $value; + } + + $ordered = []; + foreach ($handler->getOptions() as $optionKey => $option) { + if (($option['type'] ?? '') === 'param') { + $name = \substr($optionKey, \strlen('param:')); + $ordered[] = $values[$name] ?? null; + } else { + $ordered[] = $container->get($option['name']); + } + } + + return $ordered; + } +} diff --git a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php new file mode 100644 index 0000000000..b6d8616f0b --- /dev/null +++ b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php @@ -0,0 +1,120 @@ +<?php + +namespace Appwrite\Realtime\Message\Handlers; + +use Appwrite\Extend\Exception; +use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Realtime\Message\Dispatcher; +use Appwrite\Utopia\Database\Documents\User; +use Appwrite\Utopia\Response; +use Utopia\Auth\Hashes\Sha; +use Utopia\Auth\Proofs\Token; +use Utopia\Auth\Store; +use Utopia\Database\Database; +use Utopia\Database\Query; +use Utopia\Platform\Action; +use Utopia\Registry\Registry; +use Utopia\Span\Span; +use Utopia\Validator\Text; + +class AuthenticationHandler extends Action +{ + public function __construct() + { + $this + ->desc('Authenticate the connection with a session token') + ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'authentication') + ->param('session', '', new Text(2048), 'Encoded session token') + ->inject('connection') + ->inject('realtime') + ->inject('database') + ->inject('register') + ->inject('response') + ->callback($this->action(...)); + } + + /** + * @return array<string, mixed> + */ + public function action( + string $session, + int $connection, + Realtime $realtime, + Database $database, + Registry $register, + Response $response, + ): array { + $store = new Store(); + $store->decode($session); + + /** @var User $user */ + $user = $database->getDocument('users', $store->getProperty('id', '')); + + // TODO: move proof construction to the DI container so there's one source of truth. + $proofForToken = new Token(); + $proofForToken->setHash(new Sha()); + + if ( + empty($user->getId()) + || !$user->sessionVerify($store->getProperty('secret', ''), $proofForToken) + ) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Session is not valid.'); + } + + $roles = $user->getRoles($database->getAuthorization()); + + $authorization = $realtime->connections[$connection]['authorization'] ?? null; + $projectId = $realtime->connections[$connection]['projectId'] ?? null; + // Capture the pre-auth userId before unsubscribe() clears the connection entry, + // so we can rebind any account channels that were stored under it. + $previousUserId = $realtime->connections[$connection]['userId'] ?? ''; + + $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); + $meta = $realtime->getSubscriptionMetadata($connection); + + $realtime->unsubscribe($connection); + + if (!empty($projectId)) { + foreach ($meta as $subscriptionId => $subscription) { + $queries = Query::parseQueries($subscription['queries'] ?? []); + $channels = Realtime::rebindAccountChannels( + $subscription['channels'] ?? [], + $previousUserId, + $user->getId(), + ); + + $realtime->subscribe( + $projectId, + $connection, + $subscriptionId, + $roles, + $channels, + $queries, + $user->getId(), + ); + } + } + + if ($authorization !== null) { + $realtime->connections[$connection]['authorization'] = $authorization; + } + + $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; + if ($subscriptionDelta !== 0) { + $register->get('telemetry.workerSubscriptionCounter') + ->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); + } + + Span::add('realtime.subscriptionDelta', $subscriptionDelta); + + return [ + 'type' => 'response', + 'data' => [ + 'to' => 'authentication', + 'success' => true, + 'user' => $response->output($user, Response::MODEL_ACCOUNT), + ], + ]; + } +} diff --git a/src/Appwrite/Realtime/Message/Handlers/PingHandler.php b/src/Appwrite/Realtime/Message/Handlers/PingHandler.php new file mode 100644 index 0000000000..98fd6ab10b --- /dev/null +++ b/src/Appwrite/Realtime/Message/Handlers/PingHandler.php @@ -0,0 +1,28 @@ +<?php + +namespace Appwrite\Realtime\Message\Handlers; + +use Appwrite\Realtime\Message\Dispatcher; +use Utopia\Platform\Action; + +class PingHandler extends Action +{ + public function __construct() + { + $this + ->desc('Reply to client heartbeat') + ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'ping') + ->label(Dispatcher::LABEL_REQUIRES_PROJECT, false) + ->callback($this->action(...)); + } + + /** + * @return array<string, mixed> + */ + public function action(): array + { + return [ + 'type' => 'pong', + ]; + } +} diff --git a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php new file mode 100644 index 0000000000..ab38d8bbd7 --- /dev/null +++ b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php @@ -0,0 +1,110 @@ +<?php + +namespace Appwrite\Realtime\Message\Handlers; + +use Appwrite\Databases\PresenceState; +use Appwrite\Extend\Exception; +use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Realtime\Message\Dispatcher; +use Appwrite\Utopia\Database\Documents\User; +use Utopia\Database\Database; +use Utopia\Database\Document; +use Utopia\Database\Validator\Authorization; +use Utopia\Platform\Action; +use Utopia\Validator\ArrayList; +use Utopia\Validator\JSON; +use Utopia\Validator\Text; +use Utopia\WebSocket\Server; + +class PresenceHandler extends Action +{ + public function __construct() + { + $this + ->desc('Upsert a presence document for the authenticated user') + ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'presence') + ->param('status', '', new Text(2048), 'Presence status') + ->param('presenceId', 'unique()', new Text(36), 'Presence document ID', optional: true) + ->param('metadata', null, new JSON(), 'Optional metadata payload', optional: true, skipValidation: true) + ->param('permissions', null, new ArrayList(new Text(2048)), 'Optional permissions list', optional: true) + ->inject('connection') + ->inject('server') + ->inject('realtime') + ->inject('database') + ->inject('authorization') + ->inject('presenceState') + ->inject('project') + ->callback($this->action(...)); + } + + /** + * @param array<int, string>|null $permissions + * @return array<string, mixed> + */ + public function action( + string $status, + string $presenceId, + mixed $metadata, + ?array $permissions, + int $connection, + Server $server, + Realtime $realtime, + Database $database, + Authorization $authorization, + PresenceState $presenceState, + ?Document $project, + ): array { + $userId = $realtime->connections[$connection]['userId'] ?? ''; + if (empty($userId)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); + } + + /** @var User $user */ + $user = $database->getDocument('users', $userId); + if ($user->isEmpty()) { + throw new Exception(Exception::USER_NOT_FOUND, params: [$userId]); + } + + $presenceData = [ + 'userInternalId' => $user->getSequence(), + 'userId' => $user->getId(), + 'source' => 'realtime', + 'status' => $status, + ]; + if ($metadata !== null) { + $presenceData['metadata'] = $metadata; + } + + $presenceDocument = new Document($presenceData); + $presenceState->setPermissions($presenceDocument, $permissions, $user, $authorization); + + $presence = $presenceState->upsertForUser( + $database, + $presenceDocument, + $presenceId, + (string) $user->getSequence(), + function () use ($project): void { + if ($project !== null && !$project->isEmpty()) { + \triggerPresenceUsage(1, $project->getId()); + } + }, + ); + + $presence->removeAttribute('hostname'); + + $realtime->connections[$connection]['presences'] = \array_merge( + $realtime->connections[$connection]['presences'] ?? [], + [$presence->getId()], + ); + + \triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); + + return [ + 'type' => 'response', + 'data' => [ + 'to' => 'presence', + 'presence' => $presence->getArrayCopy(), + ], + ]; + } +} diff --git a/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php b/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php new file mode 100644 index 0000000000..0e95d869a6 --- /dev/null +++ b/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php @@ -0,0 +1,109 @@ +<?php + +namespace Appwrite\Realtime\Message\Handlers; + +use Appwrite\Extend\Exception; +use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Realtime\Message\Dispatcher; +use Appwrite\Realtime\Message\Validators\SubscribePayloadValidator; +use Utopia\Database\Exception\Query as QueryException; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; +use Utopia\Platform\Action; +use Utopia\Registry\Registry; +use Utopia\Span\Span; + +class SubscribeHandler extends Action +{ + public function __construct() + { + $this + ->desc('Bulk subscribe to realtime channels') + ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'subscribe') + ->label(Dispatcher::LABEL_PAYLOAD_SHAPE, Dispatcher::PAYLOAD_SHAPE_LIST) + ->param('items', null, new SubscribePayloadValidator(), 'Subscriptions to add') + ->inject('connection') + ->inject('realtime') + ->inject('register') + ->inject('projectId') + ->callback($this->action(...)); + } + + /** + * @param array<int, array{channels: array<int, string>, queries?: array<int, string>, subscriptionId?: string}> $items + * @return array<string, mixed> + */ + public function action( + array $items, + int $connection, + Realtime $realtime, + Registry $register, + ?string $projectId, + ): array { + $roles = $realtime->connections[$connection]['roles'] ?? [Role::guests()->toString()]; + $userId = $realtime->connections[$connection]['userId'] ?? ''; + + $parsedPayloads = []; + $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); + + foreach ($items as $payload) { + $subscriptionId = \array_key_exists('subscriptionId', $payload) + ? $payload['subscriptionId'] + : ID::unique(); + + $queries = $payload['queries'] ?? []; + + try { + $convertedQueries = Realtime::convertQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: ' . $e->getMessage()); + } + + $convertedChannels = \array_keys(Realtime::convertChannels($payload['channels'], $userId)); + + $parsedPayloads[] = [ + 'subscriptionId' => $subscriptionId, + 'channels' => $payload['channels'], + 'convertedChannels' => $convertedChannels, + 'queries' => $convertedQueries, + ]; + } + + foreach ($parsedPayloads as $parsedPayload) { + $realtime->subscribe( + $projectId, + $connection, + $parsedPayload['subscriptionId'], + $roles, + $parsedPayload['convertedChannels'], + $parsedPayload['queries'], + ); + } + + $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; + $subscriptionsRequested = \count($parsedPayloads); + + if ($subscriptionDelta !== 0) { + $register->get('telemetry.workerSubscriptionCounter') + ->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); + } + + Span::add('realtime.subscriptionDelta', $subscriptionDelta); + Span::add('realtime.subscriptionsRequested', $subscriptionsRequested); + Span::add('realtime.subscribe.subscriptionsCount', $subscriptionsRequested); + + return [ + 'type' => 'response', + 'data' => [ + 'to' => 'subscribe', + 'success' => true, + 'subscriptions' => \array_map(static fn (array $parsed): array => [ + 'subscriptionId' => $parsed['subscriptionId'], + 'channels' => $parsed['convertedChannels'], + 'queries' => \array_map(static fn ($q) => $q->toString(), $parsed['queries']), + ], $parsedPayloads), + ], + ]; + } +} diff --git a/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php b/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php new file mode 100644 index 0000000000..a6e6a38179 --- /dev/null +++ b/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php @@ -0,0 +1,74 @@ +<?php + +namespace Appwrite\Realtime\Message\Handlers; + +use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Realtime\Message\Dispatcher; +use Appwrite\Realtime\Message\Validators\UnsubscribePayloadValidator; +use Utopia\Platform\Action; +use Utopia\Registry\Registry; +use Utopia\Span\Span; + +class UnsubscribeHandler extends Action +{ + public function __construct() + { + $this + ->desc('Bulk remove subscriptions by id') + ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'unsubscribe') + ->label(Dispatcher::LABEL_PAYLOAD_SHAPE, Dispatcher::PAYLOAD_SHAPE_LIST) + ->param('items', null, new UnsubscribePayloadValidator(), 'Subscriptions to remove') + ->inject('connection') + ->inject('realtime') + ->inject('register') + ->callback($this->action(...)); + } + + /** + * @param array<int, array{subscriptionId: string}> $items + * @return array<string, mixed> + */ + public function action( + array $items, + int $connection, + Realtime $realtime, + Registry $register, + ): array { + $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); + + $unsubscribeResults = []; + foreach ($items as $payload) { + $subscriptionId = $payload['subscriptionId']; + $unsubscribeResults[] = [ + 'subscriptionId' => $subscriptionId, + 'removed' => $realtime->unsubscribeSubscription($connection, $subscriptionId), + ]; + } + + $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; + $subscriptionsRequested = \count($items); + $subscriptionsRemoved = \count(\array_filter( + $unsubscribeResults, + static fn (array $item): bool => $item['removed'] + )); + + if ($subscriptionDelta !== 0) { + $register->get('telemetry.workerSubscriptionCounter') + ->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); + } + + Span::add('realtime.subscriptionDelta', $subscriptionDelta); + Span::add('realtime.subscriptionsRequested', $subscriptionsRequested); + Span::add('realtime.subscriptionsRemoved', $subscriptionsRemoved); + + return [ + 'type' => 'response', + 'data' => [ + 'to' => 'unsubscribe', + 'success' => true, + 'subscriptions' => $unsubscribeResults, + ], + ]; + } +} diff --git a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php new file mode 100644 index 0000000000..5e59f39935 --- /dev/null +++ b/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php @@ -0,0 +1,56 @@ +<?php + +namespace Appwrite\Realtime\Message\Validators; + +use Utopia\Validator; + +class SubscribePayloadValidator extends Validator +{ + private string $message = 'Payload is not valid.'; + + public function getDescription(): string + { + return $this->message; + } + + public function isArray(): bool + { + return true; + } + + public function getType(): string + { + return self::TYPE_ARRAY; + } + + public function isValid(mixed $value): bool + { + if (!\is_array($value) || !\array_is_list($value)) { + $this->message = 'Payload is not valid.'; + return false; + } + + foreach ($value as $payload) { + if (!\is_array($payload)) { + $this->message = 'Each subscribe payload must be an object.'; + return false; + } + if (!\array_key_exists('channels', $payload)) { + $this->message = 'channels is not present in payload.'; + return false; + } + if (!\is_array($payload['channels']) || !\array_is_list($payload['channels'])) { + $this->message = 'channels is not a valid array.'; + return false; + } + if (\array_key_exists('queries', $payload) + && (!\is_array($payload['queries']) || !\array_is_list($payload['queries'])) + ) { + $this->message = 'queries is not a valid array.'; + return false; + } + } + + return true; + } +} diff --git a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php new file mode 100644 index 0000000000..eb1676af06 --- /dev/null +++ b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php @@ -0,0 +1,47 @@ +<?php + +namespace Appwrite\Realtime\Message\Validators; + +use Utopia\Validator; + +class UnsubscribePayloadValidator extends Validator +{ + private string $message = 'Payload is not valid.'; + + public function getDescription(): string + { + return $this->message; + } + + public function isArray(): bool + { + return true; + } + + public function getType(): string + { + return self::TYPE_ARRAY; + } + + public function isValid(mixed $value): bool + { + if (!\is_array($value) || !\array_is_list($value)) { + $this->message = 'Payload is not valid.'; + return false; + } + + foreach ($value as $payload) { + if ( + !\is_array($payload) + || !\array_key_exists('subscriptionId', $payload) + || !\is_string($payload['subscriptionId']) + || $payload['subscriptionId'] === '' + ) { + $this->message = 'Each unsubscribe payload must include a non-empty subscriptionId.'; + return false; + } + } + + return true; + } +} From 0e0e40f991c654c3addab7fd960ad1cb9f32b452 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 15:59:25 +0530 Subject: [PATCH 077/192] fixed the container inheritance bug --- app/realtime.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index b7b48ccdd3..415ca3244d 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1119,6 +1119,7 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, }); $server->onMessage(function (int $connection, string $message) use ($server, $realtime, $containerId, $register, $presenceState, $messageDispatcher) { + global $container; $project = null; $authorization = null; $projectId = $realtime->connections[$connection]['projectId'] ?? null; @@ -1183,6 +1184,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } // Record realtime inbound bytes for this project + // not making this a part of the dispatcher as we need to get the inbound bytes as well even if we dont enter the dispatcher if ($project !== null && !$project->isEmpty()) { triggerStats([ METRIC_REALTIME_INBOUND => $rawSize, @@ -1201,7 +1203,11 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Message type is not valid.'); } - $messageContainer = new Container(); + // Child of the global container: per-message values like $connection and $project + // live on this scope so concurrent message coroutines don't clobber each other, + // while globally-registered services (pools, queueForRealtime, ...) remain reachable + // via the parent. + $messageContainer = new Container($container); $messageContainer->set('connection', fn () => $connection); $messageContainer->set('server', fn () => $server); $messageContainer->set('realtime', fn () => $realtime); From 29092b277bf2ecd7372f2b598139f08cffa604fb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 16:22:54 +0530 Subject: [PATCH 078/192] Update AuthenticationHandler to make session parameter optional and add validation for empty session tokens. Update error message in PresenceRealtimeClientTest for clarity. --- .../Realtime/Message/Handlers/AuthenticationHandler.php | 6 +++++- tests/e2e/Services/Presence/PresenceRealtimeClientTest.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php index b6d8616f0b..b17c672d91 100644 --- a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php @@ -24,7 +24,7 @@ class AuthenticationHandler extends Action $this ->desc('Authenticate the connection with a session token') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'authentication') - ->param('session', '', new Text(2048), 'Encoded session token') + ->param('session', '', new Text(2048), 'Encoded session token', optional: true) ->inject('connection') ->inject('realtime') ->inject('database') @@ -44,6 +44,10 @@ class AuthenticationHandler extends Action Registry $register, Response $response, ): array { + if ($session === '') { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); + } + $store = new Store(); $store->decode($session); diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index e03dba110d..26a28d9387 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -382,7 +382,7 @@ class PresenceRealtimeClientTest extends Scope ], ])); $missingStatus = $this->receiveErrorMessage($client); - $this->assertStringContainsString('status must be provided', $missingStatus['data']['message'] ?? ''); + $this->assertStringContainsString('status is required', $missingStatus['data']['message'] ?? ''); $this->assertQuietFor( $client, fn (array $frame): bool => ($frame['type'] ?? null) === 'event' From ced5b88b57b94ccc08ef54223c70d8c07323d253 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 16:37:35 +0530 Subject: [PATCH 079/192] Refactor message dispatching and handler parameters for improved clarity and consistency. Update AuthenticationHandler and PresenceHandler to enforce required parameters. --- app/realtime.php | 22 +++++++++-- src/Appwrite/Realtime/Message/Dispatcher.php | 37 +++++-------------- .../Handlers/AuthenticationHandler.php | 2 +- .../Message/Handlers/PresenceHandler.php | 6 +-- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 415ca3244d..fe7b55ff82 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1118,8 +1118,7 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, } }); -$server->onMessage(function (int $connection, string $message) use ($server, $realtime, $containerId, $register, $presenceState, $messageDispatcher) { - global $container; +$server->onMessage(function (int $connection, string $message) use ($container, $server, $realtime, $containerId, $register, $presenceState, $messageDispatcher) { $project = null; $authorization = null; $projectId = $realtime->connections[$connection]['projectId'] ?? null; @@ -1219,7 +1218,24 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re $messageContainer->set('project', fn () => $project); $messageContainer->set('projectId', fn () => $projectId); - $messageDispatcher->dispatch($messageContainer, $message, $outboundBytes); + $responsePayload = $messageDispatcher->dispatch($messageContainer, $message); + + if ($responsePayload !== null) { + $responseJson = json_encode($responsePayload); + if ($responseJson === false) { + throw new \RuntimeException( + 'Failed to encode realtime response payload: ' . json_last_error_msg() + ); + } + + $server->send([$connection], $responseJson); + $bytes = \strlen($responseJson); + $outboundBytes += $bytes; + + if ($project !== null && !$project->isEmpty()) { + triggerStats([METRIC_REALTIME_OUTBOUND => $bytes], $project->getId()); + } + } $success = true; } catch (Throwable $th) { diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php index 729b0f7b11..968b144c5b 100644 --- a/src/Appwrite/Realtime/Message/Dispatcher.php +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -3,7 +3,6 @@ namespace Appwrite\Realtime\Message; use Appwrite\Extend\Exception; -use Utopia\Database\Document; use Utopia\DI\Container; use Utopia\Platform\Action; @@ -40,18 +39,17 @@ class Dispatcher } /** - * Dispatches a parsed websocket message to the handler that registered for its `type`. + * Routes a parsed websocket message to the handler that registered for its `type`, + * runs param validation + dependency injection, and returns whatever the handler returns. + * Errors propagate so the caller can render them as websocket error frames. * - * On success: invokes the handler, sends the JSON response (when the handler returns a - * payload), and accumulates outbound bytes / outbound stats. Errors propagate so the - * outer onMessage handler can render them as websocket error frames. - * - * @param Container $container per-message container resolving 'connection', 'server', - * 'project', 'projectId' and any handler-declared injections. + * @param Container $container per-message container resolving 'connection', 'project', + * 'projectId' and any handler-declared injections. * @param array<mixed> $message decoded inbound websocket frame: `['type' => ..., 'data' => ...]`. - * @param int $outboundBytes counter incremented by the size of any response sent. + * @return array<string, mixed>|null the handler's response payload (already shaped for the + * wire), or null when the handler chooses not to reply. */ - public function dispatch(Container $container, array $message, int &$outboundBytes): void + public function dispatch(Container $container, array $message): ?array { $type = $message['type'] ?? ''; if (!\is_string($type) || !isset($this->handlers[$type])) { @@ -70,26 +68,11 @@ class Dispatcher } $shape = $labels[self::LABEL_PAYLOAD_SHAPE] ?? self::PAYLOAD_SHAPE_OBJECT; - $data = $message['data'] ?? ($shape === self::PAYLOAD_SHAPE_LIST ? [] : []); + $data = $message['data'] ?? []; $args = $this->resolveArgs($handler, $data, $shape, $container); - $payload = ($handler->getCallback())(...$args); - - if ($payload === null) { - return; - } - - $json = \json_encode($payload); - $server = $container->get('server'); - $server->send([$container->get('connection')], $json); - $outboundBytes += \strlen($json); - - /** @var ?Document $project */ - $project = $container->get('project'); - if ($project !== null && !$project->isEmpty() && \strlen($json) > 0) { - \triggerStats([METRIC_REALTIME_OUTBOUND => \strlen($json)], $project->getId()); - } + return ($handler->getCallback())(...$args); } /** diff --git a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php index b17c672d91..9564aee7b4 100644 --- a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php @@ -24,7 +24,7 @@ class AuthenticationHandler extends Action $this ->desc('Authenticate the connection with a session token') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'authentication') - ->param('session', '', new Text(2048), 'Encoded session token', optional: true) + ->param('session', '', new Text(2048), 'Encoded session token', true) ->inject('connection') ->inject('realtime') ->inject('database') diff --git a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php index ab38d8bbd7..ad623931c1 100644 --- a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php @@ -24,9 +24,9 @@ class PresenceHandler extends Action ->desc('Upsert a presence document for the authenticated user') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'presence') ->param('status', '', new Text(2048), 'Presence status') - ->param('presenceId', 'unique()', new Text(36), 'Presence document ID', optional: true) - ->param('metadata', null, new JSON(), 'Optional metadata payload', optional: true, skipValidation: true) - ->param('permissions', null, new ArrayList(new Text(2048)), 'Optional permissions list', optional: true) + ->param('presenceId', 'unique()', new Text(36), 'Presence document ID', true) + ->param('metadata', null, new JSON(), 'Optional metadata payload', true, [], true) + ->param('permissions', null, new ArrayList(new Text(2048)), 'Optional permissions list', true) ->inject('connection') ->inject('server') ->inject('realtime') From ec0f7cf683c4a138450e251b8daef40424220a5e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 16:39:47 +0530 Subject: [PATCH 080/192] Update error message in PresenceRealtimeClientTest for clarity on permissions validation --- tests/e2e/Services/Presence/PresenceRealtimeClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index 26a28d9387..3fbfb61543 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -398,7 +398,7 @@ class PresenceRealtimeClientTest extends Scope ], ])); $invalidPermissions = $this->receiveErrorMessage($client); - $this->assertStringContainsString('permissions must be an array', $invalidPermissions['data']['message'] ?? ''); + $this->assertStringContainsString('permissions: Value must a valid array', $invalidPermissions['data']['message'] ?? ''); $this->assertQuietFor( $client, fn (array $frame): bool => ($frame['type'] ?? null) === 'event' From 42542aec6168139b226740a6d1017fa09aae2af6 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 17:11:35 +0530 Subject: [PATCH 081/192] Enhance error handling and validation in Realtime message dispatchers. Update error messages for clarity and enforce required parameters in AuthenticationHandler. --- app/realtime.php | 7 ++++++ src/Appwrite/Realtime/Message/Dispatcher.php | 25 +++++++++++++------ .../Handlers/AuthenticationHandler.php | 6 +---- .../Presence/PresenceRealtimeClientTest.php | 2 +- .../Realtime/RealtimeConsoleClientTest.php | 2 +- .../Realtime/RealtimeCustomClientTest.php | 2 +- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index fe7b55ff82..19a9ae2565 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1132,6 +1132,13 @@ $server->onMessage(function (int $connection, string $message) use ($container, Span::add('realtime.connectionId', $connection); Span::add('realtime.inboundBytes', $rawSize); Span::add('realtime.containerId', $containerId); + // Defaults so an exception thrown mid-handler still leaves these attrs on the span. + // Handlers (Subscribe/Unsubscribe/Authentication) override with real values via Span::add + // when their work succeeds. + Span::add('realtime.subscriptionDelta', 0); + Span::add('realtime.subscriptionsRequested', 0); + Span::add('realtime.subscriptionsRemoved', 0); + Span::add('realtime.subscribe.subscriptionsCount', 0); try { $response = new Response(new SwooleResponse()); diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php index 968b144c5b..ad766309dd 100644 --- a/src/Appwrite/Realtime/Message/Dispatcher.php +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -15,6 +15,8 @@ class Dispatcher public const PAYLOAD_SHAPE_OBJECT = 'object'; public const PAYLOAD_SHAPE_LIST = 'list'; + private const REQUIRED_PARAM_ERROR_FORMAT = 'Payload is not valid. %s is required'; + /** * @var array<string, Action> */ @@ -68,7 +70,8 @@ class Dispatcher } $shape = $labels[self::LABEL_PAYLOAD_SHAPE] ?? self::PAYLOAD_SHAPE_OBJECT; - $data = $message['data'] ?? []; + $dataPresent = \array_key_exists('data', $message); + $data = $dataPresent ? $message['data'] : null; $args = $this->resolveArgs($handler, $data, $shape, $container); @@ -78,18 +81,24 @@ class Dispatcher /** * Resolves the ordered argument list for the handler callback by walking the action's * declared option sequence. Params come from the inbound `data` (for object shape) or - * the entire data list (for list shape). Injections come from the per-message container. + * the entire data value (for list shape). Injections come from the per-message container. * * @return array<int, mixed> */ - private function resolveArgs(Action $handler, mixed $data, string $shape, Container $container): array - { + private function resolveArgs( + Action $handler, + mixed $data, + string $shape, + Container $container, + ): array { $values = []; - + $dataPresent = $data !== null; foreach ($handler->getParams() as $key => $param) { if ($shape === self::PAYLOAD_SHAPE_LIST) { - $present = true; - $value = $data; + // The whole `data` field is the value of this single param. `present` reflects + // whether the inbound message actually contained the `data` key. + $present = $dataPresent; + $value = $dataPresent ? $data : $param['default']; } else { $present = \is_array($data) && \array_key_exists($key, $data); $value = $present ? $data[$key] : $param['default']; @@ -98,7 +107,7 @@ class Dispatcher if (!$present && !$param['optional']) { throw new Exception( Exception::REALTIME_MESSAGE_FORMAT_INVALID, - \sprintf('%s is required.', $key) + \sprintf(self::REQUIRED_PARAM_ERROR_FORMAT, $key), ); } diff --git a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php index 9564aee7b4..b6d8616f0b 100644 --- a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php @@ -24,7 +24,7 @@ class AuthenticationHandler extends Action $this ->desc('Authenticate the connection with a session token') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'authentication') - ->param('session', '', new Text(2048), 'Encoded session token', true) + ->param('session', '', new Text(2048), 'Encoded session token') ->inject('connection') ->inject('realtime') ->inject('database') @@ -44,10 +44,6 @@ class AuthenticationHandler extends Action Registry $register, Response $response, ): array { - if ($session === '') { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Payload is not valid.'); - } - $store = new Store(); $store->decode($session); diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index 3fbfb61543..ce5267b10a 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -382,7 +382,7 @@ class PresenceRealtimeClientTest extends Scope ], ])); $missingStatus = $this->receiveErrorMessage($client); - $this->assertStringContainsString('status is required', $missingStatus['data']['message'] ?? ''); + $this->assertStringContainsString('Payload is not valid. status is required', $missingStatus['data']['message'] ?? ''); $this->assertQuietFor( $client, fn (array $frame): bool => ($frame['type'] ?? null) === 'event' diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 3da00898c9..feebe8839e 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -257,7 +257,7 @@ class RealtimeConsoleClientTest extends Scope $this->assertEquals('error', $response['type']); $this->assertNotEmpty($response['data']); $this->assertEquals(1003, $response['data']['code']); - $this->assertEquals('Payload is not valid.', $response['data']['message']); + $this->assertEquals('Payload is not valid. session is required', $response['data']['message']); $client->send(\json_encode([ 'type' => 'unknown', diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 813ef70ff0..436de5b1d0 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -239,7 +239,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('error', $response['type']); $this->assertNotEmpty($response['data']); $this->assertEquals(1003, $response['data']['code']); - $this->assertEquals('Payload is not valid.', $response['data']['message']); + $this->assertEquals('Payload is not valid. session is required', $response['data']['message']); $client->send(\json_encode([ 'type' => 'unknown', From 4822164e32ae644a0b2382f3a16f098fc04a251e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 17:14:09 +0530 Subject: [PATCH 082/192] Inject global helpers into PresenceHandler for improved testability and maintainability. --- app/realtime.php | 5 +++++ .../Realtime/Message/Handlers/PresenceHandler.php | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 19a9ae2565..12d2a5c600 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1224,6 +1224,11 @@ $server->onMessage(function (int $connection, string $message) use ($container, $messageContainer->set('authorization', fn () => $authorization); $messageContainer->set('project', fn () => $project); $messageContainer->set('projectId', fn () => $projectId); + // Wrap the global helpers as first-class callables so handlers receive them via + // injection rather than reaching into the global namespace. Keeps PresenceHandler + // unit-testable without bootstrapping app/realtime.php. + $messageContainer->set('triggerPresenceUsage', fn () => triggerPresenceUsage(...)); + $messageContainer->set('triggerPresenceEvent', fn () => triggerPresenceEvent(...)); $responsePayload = $messageDispatcher->dispatch($messageContainer, $message); diff --git a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php index ad623931c1..a9924fdb1e 100644 --- a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php @@ -7,6 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Realtime\Message\Dispatcher; use Appwrite\Utopia\Database\Documents\User; +use Closure; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -34,11 +35,15 @@ class PresenceHandler extends Action ->inject('authorization') ->inject('presenceState') ->inject('project') + ->inject('triggerPresenceUsage') + ->inject('triggerPresenceEvent') ->callback($this->action(...)); } /** * @param array<int, string>|null $permissions + * @param Closure(int, string): void $triggerPresenceUsage + * @param Closure(Server, Realtime, ?Document, User, string, Document): void $triggerPresenceEvent * @return array<string, mixed> */ public function action( @@ -53,6 +58,8 @@ class PresenceHandler extends Action Authorization $authorization, PresenceState $presenceState, ?Document $project, + Closure $triggerPresenceUsage, + Closure $triggerPresenceEvent, ): array { $userId = $realtime->connections[$connection]['userId'] ?? ''; if (empty($userId)) { @@ -83,9 +90,9 @@ class PresenceHandler extends Action $presenceDocument, $presenceId, (string) $user->getSequence(), - function () use ($project): void { + function () use ($project, $triggerPresenceUsage): void { if ($project !== null && !$project->isEmpty()) { - \triggerPresenceUsage(1, $project->getId()); + $triggerPresenceUsage(1, $project->getId()); } }, ); @@ -97,7 +104,7 @@ class PresenceHandler extends Action [$presence->getId()], ); - \triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); + $triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); return [ 'type' => 'response', From b2b6fb6b6947f010c38c375ff9ed949a2e539008 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 17:25:39 +0530 Subject: [PATCH 083/192] Enhance validation logic in Realtime message validators. Update error handling to return specific validation error messages and streamline the validation process in SubscribePayloadValidator and UnsubscribePayloadValidator. --- src/Appwrite/Realtime/Message/Dispatcher.php | 10 ++++++- .../Validators/SubscribePayloadValidator.php | 26 +++++++++---------- .../UnsubscribePayloadValidator.php | 17 ++++++------ 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php index ad766309dd..47ba4a6cb8 100644 --- a/src/Appwrite/Realtime/Message/Dispatcher.php +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -117,9 +117,17 @@ class Dispatcher $validator = $validator(); } if (!$validator->isValid($value)) { + // taking the error directly instead of the message attribute from the validator + // to avoid the race condition between coroutines modifying each others static attributes + // as the validator is a static class + $description = $validator->getDescription(); + if (\is_callable([$validator, 'getValidationError'])) { + $description = $validator->getValidationError($value) ?? $description; + } + throw new Exception( Exception::REALTIME_MESSAGE_FORMAT_INVALID, - \sprintf('%s: %s', $key, $validator->getDescription()) + \sprintf('%s: %s', $key, $description) ); } } diff --git a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php index 5e59f39935..d3c9a4cc37 100644 --- a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php +++ b/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php @@ -6,11 +6,9 @@ use Utopia\Validator; class SubscribePayloadValidator extends Validator { - private string $message = 'Payload is not valid.'; - public function getDescription(): string { - return $this->message; + return 'Payload is not valid.'; } public function isArray(): bool @@ -24,33 +22,33 @@ class SubscribePayloadValidator extends Validator } public function isValid(mixed $value): bool + { + return $this->getValidationError($value) === null; + } + + public function getValidationError(mixed $value): ?string { if (!\is_array($value) || !\array_is_list($value)) { - $this->message = 'Payload is not valid.'; - return false; + return 'Payload is not valid.'; } foreach ($value as $payload) { if (!\is_array($payload)) { - $this->message = 'Each subscribe payload must be an object.'; - return false; + return 'Each subscribe payload must be an object.'; } if (!\array_key_exists('channels', $payload)) { - $this->message = 'channels is not present in payload.'; - return false; + return 'channels is not present in payload.'; } if (!\is_array($payload['channels']) || !\array_is_list($payload['channels'])) { - $this->message = 'channels is not a valid array.'; - return false; + return 'channels is not a valid array.'; } if (\array_key_exists('queries', $payload) && (!\is_array($payload['queries']) || !\array_is_list($payload['queries'])) ) { - $this->message = 'queries is not a valid array.'; - return false; + return 'queries is not a valid array.'; } } - return true; + return null; } } diff --git a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php index eb1676af06..e3e3742f43 100644 --- a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php +++ b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php @@ -6,11 +6,9 @@ use Utopia\Validator; class UnsubscribePayloadValidator extends Validator { - private string $message = 'Payload is not valid.'; - public function getDescription(): string { - return $this->message; + return 'Payload is not valid.'; } public function isArray(): bool @@ -24,10 +22,14 @@ class UnsubscribePayloadValidator extends Validator } public function isValid(mixed $value): bool + { + return $this->getValidationError($value) === null; + } + + public function getValidationError(mixed $value): ?string { if (!\is_array($value) || !\array_is_list($value)) { - $this->message = 'Payload is not valid.'; - return false; + return 'Payload is not valid.'; } foreach ($value as $payload) { @@ -37,11 +39,10 @@ class UnsubscribePayloadValidator extends Validator || !\is_string($payload['subscriptionId']) || $payload['subscriptionId'] === '' ) { - $this->message = 'Each unsubscribe payload must include a non-empty subscriptionId.'; - return false; + return 'Each unsubscribe payload must include a non-empty subscriptionId.'; } } - return true; + return null; } } From 2ed8247fba89329174ae60a0231c698a9b180de0 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 May 2026 17:39:34 +0530 Subject: [PATCH 084/192] fix graphql tests --- tests/e2e/Services/GraphQL/PresenceTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index 077c0aa902..d1fb786ac5 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -22,7 +22,7 @@ class PresenceTest extends Scope $payload = [ 'query' => <<<'GQL' mutation upsertPresence($presenceId: String!, $userId: String!, $status: String!, $metadata: Json) { - presencesUpsert(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { + presencesUpsertPresence(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { _id userId status @@ -45,9 +45,8 @@ class PresenceTest extends Scope 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $apiKey, ], $payload); - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals('online', $response['body']['data']['presencesUpsert']['status']); - $this->assertEquals('graphql', $response['body']['data']['presencesUpsert']['source']); + $this->assertEquals('online', $response['body']['data']['presencesUpsertPresence']['status']); + $this->assertEquals('graphql', $response['body']['data']['presencesUpsertPresence']['source']); } } From b0a2ef271a0440f6b0398a7cfa93eebb5074b7eb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 May 2026 11:35:49 +0530 Subject: [PATCH 085/192] updated the queue for event propagation --- app/realtime.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 17edb7bbbc..87efec02b0 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -322,14 +322,8 @@ if (!function_exists('triggerPresenceUsage')) { if (!function_exists('getQueueForEventsForProject')) { function getQueueForEventsForProject(Document $project, User $user): QueueEvent { - global $register; - - /** @var Group $pools */ - $pools = $register->get('pools'); - - $queueForEvents = new QueueEvent(new BrokerPool( - publisher: $pools->get('publisher') - )); + global $container; + $queueForEvents = $container->get('queueForEvents'); $queueForEvents->setProject($project); $queueForEvents->setUser($user); @@ -340,8 +334,6 @@ if (!function_exists('getQueueForEventsForProject')) { if (!function_exists('triggerPresenceEvent')) { function triggerPresenceEvent( - Server $server, - Realtime $realtime, Document $project, User $user, string $eventName, @@ -407,9 +399,17 @@ if (!function_exists('setPermission')) { } global $container; + $container->set('pools', function ($register) { return $register->get('pools'); }, ['register']); + +$container->set('queueForEvents', function ($pools) { + return new QueueEvent(new BrokerPool( + publisher: $pools->get('publisher') + )); +}, ['pools']); + $container->set('queueForRealtime', function () { return new QueueRealtime(); }, []); @@ -1559,7 +1559,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } } - triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); + triggerPresenceEvent($project, $user, 'presences.[presenceId].upsert', $presence); break; @@ -1613,7 +1613,7 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re } }); -$server->onClose(function (int $connection) use ($server, $realtime, $stats, $register) { +$server->onClose(function (int $connection) use ($realtime, $stats, $register) { $projectId = null; $userId = null; $subscriptionsBeforeClose = 0; @@ -1670,7 +1670,7 @@ $server->onClose(function (int $connection) use ($server, $realtime, $stats, $re foreach ($presences as $presence) { try { - triggerPresenceEvent($server, $realtime, $project, new User([]), 'presences.[presenceId].delete', $presence); + triggerPresenceEvent($project, new User([]), 'presences.[presenceId].delete', $presence); } catch (Throwable) { // Swallow errors to avoid breaking disconnect cleanup } From f455bb7a58c67cc669d94d4a57e517e16ea96dc9 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 May 2026 17:11:49 +0530 Subject: [PATCH 086/192] refactor: add checks for queueForEvents and queueForRealtime in container setup; enhance presence resolution in tests --- app/realtime.php | 21 ++++--- tests/e2e/Services/Presence/PresenceBase.php | 58 +++++++++++++++----- 2 files changed, 57 insertions(+), 22 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 87efec02b0..3221f83e95 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -404,15 +404,20 @@ $container->set('pools', function ($register) { return $register->get('pools'); }, ['register']); -$container->set('queueForEvents', function ($pools) { - return new QueueEvent(new BrokerPool( - publisher: $pools->get('publisher') - )); -}, ['pools']); +if (!$container->has('queueForEvents')) { + $container->set('queueForEvents', function ($pools) { + var_dump("ce"); + return new QueueEvent(new BrokerPool( + publisher: $pools->get('publisher') + )); + }, ['pools']); +} -$container->set('queueForRealtime', function () { - return new QueueRealtime(); -}, []); +if (!$container->has('queueForRealtime')) { + $container->set('queueForRealtime', function () { + return new QueueRealtime(); + }, []); +} $realtime = getRealtime(); $presenceState = new PresenceState(); diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index 9131af18dd..8f05b4144a 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -105,6 +105,26 @@ trait PresenceBase return $presence; } + protected function resolvePresenceForUser(string $userId, array $headers): array + { + $presence = $this->client->call( + Client::METHOD_GET, + '/presences', + $headers, + [ + 'queries' => [ + Query::equal('userId', [$userId])->toString(), + ], + ] + ); + + $this->assertEquals(200, $presence['headers']['status-code']); + $this->assertGreaterThanOrEqual(1, $presence['body']['total'] ?? 0); + $this->assertNotEmpty($presence['body']['presences'][0] ?? []); + + return $presence['body']['presences'][0]; + } + public function testUpsertAndGetPresence(): void { if ($this->getSide() === 'client') { @@ -270,16 +290,12 @@ trait PresenceBase } $projectId = $this->getProject()['$id']; - $user1 = $this->getUser(); - $headersUser1 = $this->getHeaders(false); - + $user1 = $this->getUser(true); $user2 = $this->getUser(true); - - // Avoid overwriting the cached user for the rest of the test run. - self::$user[$projectId] = $user1; - - $headersUser2 = $this->getHeaders(false); - $headersUser2['cookie'] = 'a_session_' . $projectId . '=' . $user2['session']; + $headersUser2 = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user2['session'], + ]; $permissionsForUser2 = [ Permission::read(Role::user($user2['$id'])), @@ -430,7 +446,14 @@ trait PresenceBase ); $this->assertEquals(200, $upsert['headers']['status-code']); - $presenceId = $upsert['body']['$id']; + $presence = $this->resolvePresenceForUser( + $upsert['body']['userId'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)) + ); + $presenceId = $presence['$id']; $update = $this->client->call( Client::METHOD_PATCH, @@ -498,7 +521,14 @@ trait PresenceBase ); $this->assertEquals(200, $upsert['headers']['status-code']); - $presenceId = $upsert['body']['$id']; + $presence = $this->resolvePresenceForUser( + $upsert['body']['userId'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders(false)) + ); + $presenceId = $presence['$id']; $delete = $this->client->call( Client::METHOD_DELETE, @@ -547,11 +577,11 @@ trait PresenceBase ] ); $this->assertEquals(200, $upsert['headers']['status-code']); - $presence = $upsert['body']; $headers = \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(false)); + $presence = $this->resolvePresenceForUser($upsert['body']['userId'], $headers); } else { $presence = $this->setupPresence([ 'status' => 'cache-update-setup', @@ -619,11 +649,11 @@ trait PresenceBase ] ); $this->assertEquals(200, $upsert['headers']['status-code']); - $presence = $upsert['body']; $headers = \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(false)); + $presence = $this->resolvePresenceForUser($upsert['body']['userId'], $headers); } else { $presence = $this->setupPresence([ 'status' => 'cache-purge-only-setup', @@ -690,11 +720,11 @@ trait PresenceBase ] ); $this->assertEquals(200, $upsert['headers']['status-code']); - $presence = $upsert['body']; $headers = \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders(false)); + $presence = $this->resolvePresenceForUser($upsert['body']['userId'], $headers); } else { $presence = $this->setupPresence([ 'status' => 'cache-delete-setup', From d043b4740e41a99f3a92ddda457c1c8fe789c2c3 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 May 2026 19:11:05 +0530 Subject: [PATCH 087/192] updated --- src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php index a9924fdb1e..a608328c99 100644 --- a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php @@ -15,7 +15,6 @@ use Utopia\Platform\Action; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; use Utopia\Validator\Text; -use Utopia\WebSocket\Server; class PresenceHandler extends Action { @@ -29,7 +28,6 @@ class PresenceHandler extends Action ->param('metadata', null, new JSON(), 'Optional metadata payload', true, [], true) ->param('permissions', null, new ArrayList(new Text(2048)), 'Optional permissions list', true) ->inject('connection') - ->inject('server') ->inject('realtime') ->inject('database') ->inject('authorization') @@ -43,7 +41,7 @@ class PresenceHandler extends Action /** * @param array<int, string>|null $permissions * @param Closure(int, string): void $triggerPresenceUsage - * @param Closure(Server, Realtime, ?Document, User, string, Document): void $triggerPresenceEvent + * @param Closure(?Document, User, string, Document): void $triggerPresenceEvent * @return array<string, mixed> */ public function action( @@ -52,7 +50,6 @@ class PresenceHandler extends Action mixed $metadata, ?array $permissions, int $connection, - Server $server, Realtime $realtime, Database $database, Authorization $authorization, @@ -104,7 +101,7 @@ class PresenceHandler extends Action [$presence->getId()], ); - $triggerPresenceEvent($server, $realtime, $project, $user, 'presences.[presenceId].upsert', $presence); + $triggerPresenceEvent($project, $user, 'presences.[presenceId].upsert', $presence); return [ 'type' => 'response', From 5eabeeea209a7ac806d9498e2bb926d9b9e571cd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 12:10:50 +0530 Subject: [PATCH 088/192] refactor: update payload validators to use closures for instantiation and improve error handling --- src/Appwrite/Realtime/Message/Dispatcher.php | 10 +------ .../Message/Handlers/SubscribeHandler.php | 2 +- .../Message/Handlers/UnsubscribeHandler.php | 2 +- .../Validators/SubscribePayloadValidator.php | 28 ++++++++++--------- .../UnsubscribePayloadValidator.php | 17 ++++++----- 5 files changed, 26 insertions(+), 33 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php index 47ba4a6cb8..ad766309dd 100644 --- a/src/Appwrite/Realtime/Message/Dispatcher.php +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -117,17 +117,9 @@ class Dispatcher $validator = $validator(); } if (!$validator->isValid($value)) { - // taking the error directly instead of the message attribute from the validator - // to avoid the race condition between coroutines modifying each others static attributes - // as the validator is a static class - $description = $validator->getDescription(); - if (\is_callable([$validator, 'getValidationError'])) { - $description = $validator->getValidationError($value) ?? $description; - } - throw new Exception( Exception::REALTIME_MESSAGE_FORMAT_INVALID, - \sprintf('%s: %s', $key, $description) + \sprintf('%s: %s', $key, $validator->getDescription()) ); } } diff --git a/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php b/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php index 0e95d869a6..5de891d6c0 100644 --- a/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php @@ -21,7 +21,7 @@ class SubscribeHandler extends Action ->desc('Bulk subscribe to realtime channels') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'subscribe') ->label(Dispatcher::LABEL_PAYLOAD_SHAPE, Dispatcher::PAYLOAD_SHAPE_LIST) - ->param('items', null, new SubscribePayloadValidator(), 'Subscriptions to add') + ->param('items', null, fn () => new SubscribePayloadValidator(), 'Subscriptions to add') ->inject('connection') ->inject('realtime') ->inject('register') diff --git a/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php b/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php index a6e6a38179..4b19f99d4b 100644 --- a/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php @@ -17,7 +17,7 @@ class UnsubscribeHandler extends Action ->desc('Bulk remove subscriptions by id') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'unsubscribe') ->label(Dispatcher::LABEL_PAYLOAD_SHAPE, Dispatcher::PAYLOAD_SHAPE_LIST) - ->param('items', null, new UnsubscribePayloadValidator(), 'Subscriptions to remove') + ->param('items', null, fn () => new UnsubscribePayloadValidator(), 'Subscriptions to remove') ->inject('connection') ->inject('realtime') ->inject('register') diff --git a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php index d3c9a4cc37..763a90f49f 100644 --- a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php +++ b/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php @@ -6,9 +6,11 @@ use Utopia\Validator; class SubscribePayloadValidator extends Validator { + protected string $description = 'Payload is not valid.'; + public function getDescription(): string { - return 'Payload is not valid.'; + return $this->description; } public function isArray(): bool @@ -22,33 +24,33 @@ class SubscribePayloadValidator extends Validator } public function isValid(mixed $value): bool - { - return $this->getValidationError($value) === null; - } - - public function getValidationError(mixed $value): ?string { if (!\is_array($value) || !\array_is_list($value)) { - return 'Payload is not valid.'; + $this->description = 'Payload is not valid.'; + return false; } foreach ($value as $payload) { if (!\is_array($payload)) { - return 'Each subscribe payload must be an object.'; + $this->description = 'Each subscribe payload must be an object.'; + return false; } if (!\array_key_exists('channels', $payload)) { - return 'channels is not present in payload.'; + $this->description = 'channels is not present in payload.'; + return false; } if (!\is_array($payload['channels']) || !\array_is_list($payload['channels'])) { - return 'channels is not a valid array.'; + $this->description = 'channels is not a valid array.'; + return false; } if (\array_key_exists('queries', $payload) && (!\is_array($payload['queries']) || !\array_is_list($payload['queries'])) ) { - return 'queries is not a valid array.'; + $this->description = 'queries is not a valid array.'; + return false; } } - return null; + return true; } -} +} \ No newline at end of file diff --git a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php index e3e3742f43..91c26ac0a2 100644 --- a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php +++ b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php @@ -6,9 +6,11 @@ use Utopia\Validator; class UnsubscribePayloadValidator extends Validator { + protected string $description = 'Payload is not valid.'; + public function getDescription(): string { - return 'Payload is not valid.'; + return $this->description; } public function isArray(): bool @@ -22,14 +24,10 @@ class UnsubscribePayloadValidator extends Validator } public function isValid(mixed $value): bool - { - return $this->getValidationError($value) === null; - } - - public function getValidationError(mixed $value): ?string { if (!\is_array($value) || !\array_is_list($value)) { - return 'Payload is not valid.'; + $this->description = 'Payload is not valid.'; + return false; } foreach ($value as $payload) { @@ -39,10 +37,11 @@ class UnsubscribePayloadValidator extends Validator || !\is_string($payload['subscriptionId']) || $payload['subscriptionId'] === '' ) { - return 'Each unsubscribe payload must include a non-empty subscriptionId.'; + $this->description = 'Each unsubscribe payload must include a non-empty subscriptionId.'; + return false; } } - return null; + return true; } } From 1946ee86b222a5d36292fdf47447c3fe01717437 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 12:20:06 +0530 Subject: [PATCH 089/192] feat: add realtime message handlers for authentication, ping, presence, subscribe, and unsubscribe --- app/realtime.php | 10 +++++----- .../{AuthenticationHandler.php => Authentication.php} | 2 +- .../Message/Handlers/{PingHandler.php => Ping.php} | 2 +- .../Handlers/{PresenceHandler.php => Presence.php} | 10 ++++++---- .../Handlers/{SubscribeHandler.php => Subscribe.php} | 4 ++-- .../{UnsubscribeHandler.php => Unsubscribe.php} | 4 ++-- ...scribePayloadValidator.php => SubscribePayload.php} | 4 ++-- ...ribePayloadValidator.php => UnsubscribePayload.php} | 2 +- 8 files changed, 20 insertions(+), 18 deletions(-) rename src/Appwrite/Realtime/Message/Handlers/{AuthenticationHandler.php => Authentication.php} (98%) rename src/Appwrite/Realtime/Message/Handlers/{PingHandler.php => Ping.php} (94%) rename src/Appwrite/Realtime/Message/Handlers/{PresenceHandler.php => Presence.php} (93%) rename src/Appwrite/Realtime/Message/Handlers/{SubscribeHandler.php => Subscribe.php} (97%) rename src/Appwrite/Realtime/Message/Handlers/{UnsubscribeHandler.php => Unsubscribe.php} (95%) rename src/Appwrite/Realtime/Message/Validators/{SubscribePayloadValidator.php => SubscribePayload.php} (96%) rename src/Appwrite/Realtime/Message/Validators/{UnsubscribePayloadValidator.php => UnsubscribePayload.php} (95%) diff --git a/app/realtime.php b/app/realtime.php index f72609dee8..f20da0291f 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -11,11 +11,11 @@ use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\Realtime\Message\Dispatcher as MessageDispatcher; -use Appwrite\Realtime\Message\Handlers\AuthenticationHandler; -use Appwrite\Realtime\Message\Handlers\PingHandler; -use Appwrite\Realtime\Message\Handlers\PresenceHandler; -use Appwrite\Realtime\Message\Handlers\SubscribeHandler; -use Appwrite\Realtime\Message\Handlers\UnsubscribeHandler; +use Appwrite\Realtime\Message\Handlers\Authentication as AuthenticationHandler; +use Appwrite\Realtime\Message\Handlers\Ping as PingHandler; +use Appwrite\Realtime\Message\Handlers\Presence as PresenceHandler; +use Appwrite\Realtime\Message\Handlers\Subscribe as SubscribeHandler; +use Appwrite\Realtime\Message\Handlers\Unsubscribe as UnsubscribeHandler; use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; diff --git a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php b/src/Appwrite/Realtime/Message/Handlers/Authentication.php similarity index 98% rename from src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php rename to src/Appwrite/Realtime/Message/Handlers/Authentication.php index b6d8616f0b..cdb0fe7bbe 100644 --- a/src/Appwrite/Realtime/Message/Handlers/AuthenticationHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/Authentication.php @@ -17,7 +17,7 @@ use Utopia\Registry\Registry; use Utopia\Span\Span; use Utopia\Validator\Text; -class AuthenticationHandler extends Action +class Authentication extends Action { public function __construct() { diff --git a/src/Appwrite/Realtime/Message/Handlers/PingHandler.php b/src/Appwrite/Realtime/Message/Handlers/Ping.php similarity index 94% rename from src/Appwrite/Realtime/Message/Handlers/PingHandler.php rename to src/Appwrite/Realtime/Message/Handlers/Ping.php index 98fd6ab10b..4bfcfa7060 100644 --- a/src/Appwrite/Realtime/Message/Handlers/PingHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/Ping.php @@ -5,7 +5,7 @@ namespace Appwrite\Realtime\Message\Handlers; use Appwrite\Realtime\Message\Dispatcher; use Utopia\Platform\Action; -class PingHandler extends Action +class Ping extends Action { public function __construct() { diff --git a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php similarity index 93% rename from src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php rename to src/Appwrite/Realtime/Message/Handlers/Presence.php index a608328c99..1d373e172c 100644 --- a/src/Appwrite/Realtime/Message/Handlers/PresenceHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -16,7 +16,7 @@ use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; use Utopia\Validator\Text; -class PresenceHandler extends Action +class Presence extends Action { public function __construct() { @@ -58,6 +58,10 @@ class PresenceHandler extends Action Closure $triggerPresenceUsage, Closure $triggerPresenceEvent, ): array { + if ($project === null || $project->isEmpty()) { + throw new Exception(Exception::REALTIME_POLICY_VIOLATION, 'Presence requires a project context.'); + } + $userId = $realtime->connections[$connection]['userId'] ?? ''; if (empty($userId)) { throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); @@ -88,9 +92,7 @@ class PresenceHandler extends Action $presenceId, (string) $user->getSequence(), function () use ($project, $triggerPresenceUsage): void { - if ($project !== null && !$project->isEmpty()) { - $triggerPresenceUsage(1, $project->getId()); - } + $triggerPresenceUsage(1, $project->getId()); }, ); diff --git a/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php similarity index 97% rename from src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php rename to src/Appwrite/Realtime/Message/Handlers/Subscribe.php index 5de891d6c0..c32ad4f702 100644 --- a/src/Appwrite/Realtime/Message/Handlers/SubscribeHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -5,7 +5,7 @@ namespace Appwrite\Realtime\Message\Handlers; use Appwrite\Extend\Exception; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Realtime\Message\Dispatcher; -use Appwrite\Realtime\Message\Validators\SubscribePayloadValidator; +use Appwrite\Realtime\Message\Validators\SubscribePayload as SubscribePayloadValidator; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Role; @@ -13,7 +13,7 @@ use Utopia\Platform\Action; use Utopia\Registry\Registry; use Utopia\Span\Span; -class SubscribeHandler extends Action +class Subscribe extends Action { public function __construct() { diff --git a/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php b/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php similarity index 95% rename from src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php rename to src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php index 4b19f99d4b..469d2145dd 100644 --- a/src/Appwrite/Realtime/Message/Handlers/UnsubscribeHandler.php +++ b/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php @@ -4,12 +4,12 @@ namespace Appwrite\Realtime\Message\Handlers; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Realtime\Message\Dispatcher; -use Appwrite\Realtime\Message\Validators\UnsubscribePayloadValidator; +use Appwrite\Realtime\Message\Validators\UnsubscribePayload as UnsubscribePayloadValidator; use Utopia\Platform\Action; use Utopia\Registry\Registry; use Utopia\Span\Span; -class UnsubscribeHandler extends Action +class Unsubscribe extends Action { public function __construct() { diff --git a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php similarity index 96% rename from src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php rename to src/Appwrite/Realtime/Message/Validators/SubscribePayload.php index 763a90f49f..d76955d873 100644 --- a/src/Appwrite/Realtime/Message/Validators/SubscribePayloadValidator.php +++ b/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php @@ -4,7 +4,7 @@ namespace Appwrite\Realtime\Message\Validators; use Utopia\Validator; -class SubscribePayloadValidator extends Validator +class SubscribePayload extends Validator { protected string $description = 'Payload is not valid.'; @@ -53,4 +53,4 @@ class SubscribePayloadValidator extends Validator return true; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayload.php similarity index 95% rename from src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php rename to src/Appwrite/Realtime/Message/Validators/UnsubscribePayload.php index 91c26ac0a2..fca065dec8 100644 --- a/src/Appwrite/Realtime/Message/Validators/UnsubscribePayloadValidator.php +++ b/src/Appwrite/Realtime/Message/Validators/UnsubscribePayload.php @@ -4,7 +4,7 @@ namespace Appwrite\Realtime\Message\Validators; use Utopia\Validator; -class UnsubscribePayloadValidator extends Validator +class UnsubscribePayload extends Validator { protected string $description = 'Payload is not valid.'; From d2ea6ef2cae97bc023cee291c79fbaad3e622706 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 12:33:42 +0530 Subject: [PATCH 090/192] removed redundant dumps --- app/realtime.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index f20da0291f..a2a61393ca 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -409,7 +409,6 @@ $container->set('pools', function ($register) { if (!$container->has('queueForEvents')) { $container->set('queueForEvents', function ($pools) { - var_dump("ce"); return new QueueEvent(new BrokerPool( publisher: $pools->get('publisher') )); From f9c18a64622540d4b566a397994188bdb2950ffe Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 13:20:19 +0530 Subject: [PATCH 091/192] updated validator subscribe --- .../Message/Validators/SubscribePayload.php | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php b/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php index d76955d873..da99b8c555 100644 --- a/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php +++ b/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php @@ -2,6 +2,7 @@ namespace Appwrite\Realtime\Message\Validators; +use Appwrite\Utopia\Database\Validator\CustomId; use Utopia\Validator; class SubscribePayload extends Validator @@ -30,11 +31,17 @@ class SubscribePayload extends Validator return false; } + $customId = new CustomId(); + foreach ($value as $payload) { if (!\is_array($payload)) { $this->description = 'Each subscribe payload must be an object.'; return false; } + if (\array_key_exists('subscriptionId', $payload) && !$customId->isValid($payload['subscriptionId'])) { + $this->description = 'subscriptionId is not a valid id.'; + return false; + } if (!\array_key_exists('channels', $payload)) { $this->description = 'channels is not present in payload.'; return false; @@ -43,12 +50,15 @@ class SubscribePayload extends Validator $this->description = 'channels is not a valid array.'; return false; } - if (\array_key_exists('queries', $payload) - && (!\is_array($payload['queries']) || !\array_is_list($payload['queries'])) - ) { - $this->description = 'queries is not a valid array.'; - return false; + foreach ($payload['channels'] as $channel) { + if (!\is_string($channel)) { + $this->description = 'channels must contain only strings.'; + return false; + } } + + // not validating queries here as we will be doing it anyways during the controller level + // kind of expensive validating queries twice as we need to check a lot of cases } return true; From ac80ba270bdbbaf0cf2b57675b2fd81835dd16a3 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 13:24:34 +0530 Subject: [PATCH 092/192] updated queries --- .../Realtime/Message/Validators/SubscribePayload.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php b/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php index da99b8c555..3e7e5cec10 100644 --- a/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php +++ b/src/Appwrite/Realtime/Message/Validators/SubscribePayload.php @@ -56,9 +56,12 @@ class SubscribePayload extends Validator return false; } } - - // not validating queries here as we will be doing it anyways during the controller level - // kind of expensive validating queries twice as we need to check a lot of cases + if (\array_key_exists('queries', $payload) + && (!\is_array($payload['queries']) || !\array_is_list($payload['queries'])) + ) { + $this->description = 'queries is not a valid array.'; + return false; + } } return true; From 6290a664e9f4b48fd0152e726adb279bf7c0edcd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 14:16:59 +0530 Subject: [PATCH 093/192] refactor: rename presence methods for consistency and clarity --- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Get.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- tests/e2e/Services/GraphQL/PresenceTest.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 6963bda7d2..2d3950645f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -39,7 +39,7 @@ class Delete extends PlatformAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'deletePresence', + name: 'delete', description: 'Delete a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 058cb2fa6f..6c6f02e1ab 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -33,7 +33,7 @@ class Get extends PlatformAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'getPresence', + name: 'get', description: 'Get a presence log by its unique ID.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 336264730d..f59e85c0ed 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -50,7 +50,7 @@ class Update extends PlatformAction new Method( namespace: 'presences', group: 'presences', - name: 'updatePresence', + name: 'update', description: 'Update a presence log by its unique ID.', auth: [AuthType::SESSION], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 0be1c58402..e4a6e20da0 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -73,7 +73,7 @@ class Upsert extends PlatformAction new Method( namespace: 'presences', group: 'presences', - name: 'upsertPresence', + name: 'upsert', description: 'Create or update a presence log by its unique ID.', auth: [AuthType::KEY, AuthType::JWT, AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 94710715cc..19883181a5 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -43,7 +43,7 @@ class XList extends PlatformAction ->label('sdk', new Method( namespace: 'presences', group: 'presences', - name: 'listPresences', + name: 'list', description: 'List presence logs.', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index d1fb786ac5..7fa5474e83 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -22,7 +22,7 @@ class PresenceTest extends Scope $payload = [ 'query' => <<<'GQL' mutation upsertPresence($presenceId: String!, $userId: String!, $status: String!, $metadata: Json) { - presencesUpsertPresence(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { + presencesUpsert(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { _id userId status From 63e226c7612030abdf6b904df78a59deba8450e5 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 May 2026 14:50:40 +0530 Subject: [PATCH 094/192] updated Co-authored-by: Copilot <copilot@github.com> --- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 +- tests/e2e/Services/GraphQL/PresenceTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index e4a6e20da0..65a184a805 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -52,7 +52,7 @@ class Upsert extends PlatformAction new Method( namespace: 'presences', group: 'presences', - name: 'upsertPresence', + name: 'upsert', description: 'Create or update a presence log by its unique ID.', auth: [AuthType::SESSION], responses: [ diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index 7fa5474e83..6087b19bde 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -21,7 +21,7 @@ class PresenceTest extends Scope $payload = [ 'query' => <<<'GQL' - mutation upsertPresence($presenceId: String!, $userId: String!, $status: String!, $metadata: Json) { + mutation upsert($presenceId: String!, $userId: String!, $status: String!, $metadata: Json) { presencesUpsert(presenceId: $presenceId, userId: $userId, status: $status, metadata: $metadata) { _id userId @@ -46,7 +46,7 @@ class PresenceTest extends Scope 'x-appwrite-key' => $apiKey, ], $payload); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals('online', $response['body']['data']['presencesUpsertPresence']['status']); - $this->assertEquals('graphql', $response['body']['data']['presencesUpsertPresence']['source']); + $this->assertEquals('online', $response['body']['data']['presencesUpsert']['status']); + $this->assertEquals('graphql', $response['body']['data']['presencesUpsert']['source']); } } From 6679d02a3558997e125dee24e25e399411db2f06 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 7 May 2026 11:48:45 +0530 Subject: [PATCH 095/192] refactor: rename connection to connectionId for consistency across handlers --- app/realtime.php | 2 +- .../Message/Handlers/Authentication.php | 22 +++++++++---------- .../Realtime/Message/Handlers/Presence.php | 10 ++++----- .../Realtime/Message/Handlers/Subscribe.php | 14 ++++++------ .../Realtime/Message/Handlers/Unsubscribe.php | 10 ++++----- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index a2a61393ca..a0572c70ff 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1218,7 +1218,7 @@ $server->onMessage(function (int $connection, string $message) use ($container, // while globally-registered services (pools, queueForRealtime, ...) remain reachable // via the parent. $messageContainer = new Container($container); - $messageContainer->set('connection', fn () => $connection); + $messageContainer->set('connectionId', fn () => $connection); $messageContainer->set('server', fn () => $server); $messageContainer->set('realtime', fn () => $realtime); $messageContainer->set('register', fn () => $register); diff --git a/src/Appwrite/Realtime/Message/Handlers/Authentication.php b/src/Appwrite/Realtime/Message/Handlers/Authentication.php index cdb0fe7bbe..f738d84a23 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Authentication.php +++ b/src/Appwrite/Realtime/Message/Handlers/Authentication.php @@ -25,7 +25,7 @@ class Authentication extends Action ->desc('Authenticate the connection with a session token') ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'authentication') ->param('session', '', new Text(2048), 'Encoded session token') - ->inject('connection') + ->inject('connectionId') ->inject('realtime') ->inject('database') ->inject('register') @@ -38,7 +38,7 @@ class Authentication extends Action */ public function action( string $session, - int $connection, + int $connectionId, Realtime $realtime, Database $database, Registry $register, @@ -63,16 +63,16 @@ class Authentication extends Action $roles = $user->getRoles($database->getAuthorization()); - $authorization = $realtime->connections[$connection]['authorization'] ?? null; - $projectId = $realtime->connections[$connection]['projectId'] ?? null; + $authorization = $realtime->connections[$connectionId]['authorization'] ?? null; + $projectId = $realtime->connections[$connectionId]['projectId'] ?? null; // Capture the pre-auth userId before unsubscribe() clears the connection entry, // so we can rebind any account channels that were stored under it. - $previousUserId = $realtime->connections[$connection]['userId'] ?? ''; + $previousUserId = $realtime->connections[$connectionId]['userId'] ?? ''; - $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); - $meta = $realtime->getSubscriptionMetadata($connection); + $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connectionId)); + $meta = $realtime->getSubscriptionMetadata($connectionId); - $realtime->unsubscribe($connection); + $realtime->unsubscribe($connectionId); if (!empty($projectId)) { foreach ($meta as $subscriptionId => $subscription) { @@ -85,7 +85,7 @@ class Authentication extends Action $realtime->subscribe( $projectId, - $connection, + $connectionId, $subscriptionId, $roles, $channels, @@ -96,10 +96,10 @@ class Authentication extends Action } if ($authorization !== null) { - $realtime->connections[$connection]['authorization'] = $authorization; + $realtime->connections[$connectionId]['authorization'] = $authorization; } - $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connectionId)); $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; if ($subscriptionDelta !== 0) { $register->get('telemetry.workerSubscriptionCounter') diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index 1d373e172c..fbab6ec70e 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -27,7 +27,7 @@ class Presence extends Action ->param('presenceId', 'unique()', new Text(36), 'Presence document ID', true) ->param('metadata', null, new JSON(), 'Optional metadata payload', true, [], true) ->param('permissions', null, new ArrayList(new Text(2048)), 'Optional permissions list', true) - ->inject('connection') + ->inject('connectionId') ->inject('realtime') ->inject('database') ->inject('authorization') @@ -49,7 +49,7 @@ class Presence extends Action string $presenceId, mixed $metadata, ?array $permissions, - int $connection, + int $connectionId, Realtime $realtime, Database $database, Authorization $authorization, @@ -62,7 +62,7 @@ class Presence extends Action throw new Exception(Exception::REALTIME_POLICY_VIOLATION, 'Presence requires a project context.'); } - $userId = $realtime->connections[$connection]['userId'] ?? ''; + $userId = $realtime->connections[$connectionId]['userId'] ?? ''; if (empty($userId)) { throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); } @@ -98,8 +98,8 @@ class Presence extends Action $presence->removeAttribute('hostname'); - $realtime->connections[$connection]['presences'] = \array_merge( - $realtime->connections[$connection]['presences'] ?? [], + $realtime->connections[$connectionId]['presences'] = \array_merge( + $realtime->connections[$connectionId]['presences'] ?? [], [$presence->getId()], ); diff --git a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php index c32ad4f702..76a4e5d3b8 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -22,7 +22,7 @@ class Subscribe extends Action ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'subscribe') ->label(Dispatcher::LABEL_PAYLOAD_SHAPE, Dispatcher::PAYLOAD_SHAPE_LIST) ->param('items', null, fn () => new SubscribePayloadValidator(), 'Subscriptions to add') - ->inject('connection') + ->inject('connectionId') ->inject('realtime') ->inject('register') ->inject('projectId') @@ -35,16 +35,16 @@ class Subscribe extends Action */ public function action( array $items, - int $connection, + int $connectionId, Realtime $realtime, Registry $register, ?string $projectId, ): array { - $roles = $realtime->connections[$connection]['roles'] ?? [Role::guests()->toString()]; - $userId = $realtime->connections[$connection]['userId'] ?? ''; + $roles = $realtime->connections[$connectionId]['roles'] ?? [Role::guests()->toString()]; + $userId = $realtime->connections[$connectionId]['userId'] ?? ''; $parsedPayloads = []; - $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connectionId)); foreach ($items as $payload) { $subscriptionId = \array_key_exists('subscriptionId', $payload) @@ -72,7 +72,7 @@ class Subscribe extends Action foreach ($parsedPayloads as $parsedPayload) { $realtime->subscribe( $projectId, - $connection, + $connectionId, $parsedPayload['subscriptionId'], $roles, $parsedPayload['convertedChannels'], @@ -80,7 +80,7 @@ class Subscribe extends Action ); } - $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connectionId)); $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; $subscriptionsRequested = \count($parsedPayloads); diff --git a/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php b/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php index 469d2145dd..1e23a40a7f 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php @@ -18,7 +18,7 @@ class Unsubscribe extends Action ->label(Dispatcher::LABEL_MESSAGE_TYPE, 'unsubscribe') ->label(Dispatcher::LABEL_PAYLOAD_SHAPE, Dispatcher::PAYLOAD_SHAPE_LIST) ->param('items', null, fn () => new UnsubscribePayloadValidator(), 'Subscriptions to remove') - ->inject('connection') + ->inject('connectionId') ->inject('realtime') ->inject('register') ->callback($this->action(...)); @@ -30,22 +30,22 @@ class Unsubscribe extends Action */ public function action( array $items, - int $connection, + int $connectionId, Realtime $realtime, Registry $register, ): array { - $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionsBefore = \count($realtime->getSubscriptionMetadata($connectionId)); $unsubscribeResults = []; foreach ($items as $payload) { $subscriptionId = $payload['subscriptionId']; $unsubscribeResults[] = [ 'subscriptionId' => $subscriptionId, - 'removed' => $realtime->unsubscribeSubscription($connection, $subscriptionId), + 'removed' => $realtime->unsubscribeSubscription($connectionId, $subscriptionId), ]; } - $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connection)); + $subscriptionsAfter = \count($realtime->getSubscriptionMetadata($connectionId)); $subscriptionDelta = $subscriptionsAfter - $subscriptionsBefore; $subscriptionsRequested = \count($items); $subscriptionsRemoved = \count(\array_filter( From ce07c6ffd5830821be602f7cb1a71a40868584e5 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 7 May 2026 12:24:42 +0530 Subject: [PATCH 096/192] added type error to the subscribe handler --- src/Appwrite/Realtime/Message/Handlers/Subscribe.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php index 76a4e5d3b8..8620a121b5 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -57,6 +57,8 @@ class Subscribe extends Action $convertedQueries = Realtime::convertQueries($queries); } catch (QueryException $e) { throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: ' . $e->getMessage()); + } catch (\TypeError $e) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: query elements must be strings.'); } $convertedChannels = \array_keys(Realtime::convertChannels($payload['channels'], $userId)); From ec8d48327c2e9dd642fd2b5a03270b394acd7a8c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 7 May 2026 12:34:34 +0530 Subject: [PATCH 097/192] reverted type error as query exception only thown --- src/Appwrite/Realtime/Message/Handlers/Subscribe.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php index 8620a121b5..76a4e5d3b8 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -57,8 +57,6 @@ class Subscribe extends Action $convertedQueries = Realtime::convertQueries($queries); } catch (QueryException $e) { throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: ' . $e->getMessage()); - } catch (\TypeError $e) { - throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: query elements must be strings.'); } $convertedChannels = \array_keys(Realtime::convertChannels($payload['channels'], $userId)); From de361573f25327ad57b6ac874452106e879e287b Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 7 May 2026 21:30:13 +1200 Subject: [PATCH 098/192] fix: thread gauges through StatsResources message envelope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHPStan flagged $payload as undefined in StatsResources::action — the gauges fast path was reading from a variable that never existed, so the optimization silently no-op'd and always fell through to the full count. Add a typed $gauges field to the StatsResources message DTO so the worker reads the pre-computed metrics from the parsed envelope, and drop redundant null coalescing on the array{metric, value} shape since PHPStan now proves the keys exist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --- src/Appwrite/Event/Message/StatsResources.php | 7 +++++++ src/Appwrite/Platform/Workers/StatsResources.php | 11 ++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Event/Message/StatsResources.php b/src/Appwrite/Event/Message/StatsResources.php index 584cbc137a..dfca818130 100644 --- a/src/Appwrite/Event/Message/StatsResources.php +++ b/src/Appwrite/Event/Message/StatsResources.php @@ -6,8 +6,13 @@ use Utopia\Database\Document; final class StatsResources extends Base { + /** + * @param Document $project + * @param array<int, array{metric: string, value: int}> $gauges + */ public function __construct( public readonly Document $project, + public readonly array $gauges = [], ) { } @@ -15,6 +20,7 @@ final class StatsResources extends Base { return [ 'project' => $this->project->getArrayCopy(), + 'gauges' => $this->gauges, ]; } @@ -22,6 +28,7 @@ final class StatsResources extends Base { return new self( project: new Document($data['project'] ?? []), + gauges: $data['gauges'] ?? [], ); } } diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index 6c6da66b71..65d78dd818 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -80,9 +80,8 @@ class StatsResources extends Action // Reset documents for each job $this->documents = []; - $gauges = $payload['gauges'] ?? []; - if (!empty($gauges)) { - $this->writeGauges($getLogsDB, $project, $gauges); + if ($statsResources->gauges !== []) { + $this->writeGauges($getLogsDB, $project, $statsResources->gauges); return; } @@ -105,12 +104,10 @@ class StatsResources extends Action $region = $project->getAttribute('region', ''); foreach ($gauges as $gauge) { - $metric = $gauge['metric'] ?? ''; - if ($metric === '') { + if ($gauge['metric'] === '') { continue; } - $value = (int) ($gauge['value'] ?? 0); - $this->createStatsDocuments($region, $metric, $value); + $this->createStatsDocuments($region, $gauge['metric'], $gauge['value']); } if ($this->documents === []) { From 9de9e5bdf0698b17608c734ecd191fd5cb9d09e3 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 7 May 2026 21:37:15 +1200 Subject: [PATCH 099/192] test: stabilise ProjectWebhooks and Proxy e2e suites ProjectWebhooks: bump assertEventually timeouts from 15s to 30/60s. Under ParaTest with 4 parallel processes the column/attribute worker can take longer than the original 15s budget to flip status to 'available', which manifested as a flaky 'available' vs 'processing' assertion in testUpdateRow on retry. The 60s budget covers attribute and column provisioning; the 30s budget covers webhook delivery and auto-disable polling. The function deployment build keeps its existing 120s budget. Proxy: testCreateRedirectRule was deleting the site before its rules and only tracking one of two created rule IDs, so cleanupRule hit a 404 because the site cascade had already removed the rule. Track both rule IDs distinctly (301 and 307) and clean rules up before the site so cleanup is deterministic regardless of cascade behaviour. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --- tests/e2e/Services/ProjectWebhooks/WebhooksBase.php | 10 +++++----- tests/e2e/Services/Proxy/ProxyBase.php | 12 +++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/e2e/Services/ProjectWebhooks/WebhooksBase.php b/tests/e2e/Services/ProjectWebhooks/WebhooksBase.php index 0f1ff7eab3..8e98c8bb48 100644 --- a/tests/e2e/Services/ProjectWebhooks/WebhooksBase.php +++ b/tests/e2e/Services/ProjectWebhooks/WebhooksBase.php @@ -118,7 +118,7 @@ trait WebhooksBase $this->assertCount(2, $collection['body']['attributes']); $this->assertEquals('available', $collection['body']['attributes'][0]['status']); $this->assertEquals('available', $collection['body']['attributes'][1]['status']); - }, 15000, 500); + }, 60000, 500); return ['databaseId' => $databaseId, 'actorsId' => $actorsId]; } @@ -192,7 +192,7 @@ trait WebhooksBase $this->assertCount(2, $table['body']['columns']); $this->assertEquals('available', $table['body']['columns'][0]['status']); $this->assertEquals('available', $table['body']['columns'][1]['status']); - }, 15000, 500); + }, 60000, 500); return ['databaseId' => $databaseId, 'actorsId' => $actorsId]; } @@ -529,7 +529,7 @@ trait WebhooksBase $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertNotEmpty($webhook['data']['key']); $this->assertEquals($webhook['data']['key'], 'extra'); - }, 15000, 500); + }, 30000, 500); $removed = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $actorsId . '/attributes/' . $extra['body']['key'], array_merge([ 'content-type' => 'application/json', @@ -896,7 +896,7 @@ trait WebhooksBase $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertNotEmpty($webhook['data']['key']); $this->assertEquals($webhook['data']['key'], 'extra'); - }, 15000, 500); + }, 30000, 500); $removed = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/columns/' . $extra['body']['key'], array_merge([ 'content-type' => 'application/json', @@ -1833,6 +1833,6 @@ trait WebhooksBase // assert that the webhook is now disabled after 10 consecutive failures $this->assertEquals($webhook['body']['enabled'], false); $this->assertEquals($webhook['body']['attempts'], 10); - }, 15000, 500); + }, 30000, 500); } } diff --git a/tests/e2e/Services/Proxy/ProxyBase.php b/tests/e2e/Services/Proxy/ProxyBase.php index 32ee13b5f7..111176cbd1 100644 --- a/tests/e2e/Services/Proxy/ProxyBase.php +++ b/tests/e2e/Services/Proxy/ProxyBase.php @@ -171,8 +171,8 @@ trait ProxyBase $siteId = $this->setupSite()['siteId']; - $ruleId = $this->setupRedirectRule($domain, 'https://jsonplaceholder.typicode.com/todos/1', 301, 'site', $siteId); - $this->assertNotEmpty($ruleId); + $ruleId301 = $this->setupRedirectRule($domain, 'https://jsonplaceholder.typicode.com/todos/1', 301, 'site', $siteId); + $this->assertNotEmpty($ruleId301); $response = $proxyClient->call(Client::METHOD_GET, '/todos/1'); $this->assertEquals(200, $response['headers']['status-code']); @@ -187,8 +187,8 @@ trait ProxyBase $this->assertEquals('https://jsonplaceholder.typicode.com/todos/1', $response['headers']['location']); $domain = \uniqid() . '-redirect-307.custom.localhost'; - $ruleId = $this->setupRedirectRule($domain, 'https://jsonplaceholder.typicode.com/todos/1', 307, 'site', $siteId); - $this->assertNotEmpty($ruleId); + $ruleId307 = $this->setupRedirectRule($domain, 'https://jsonplaceholder.typicode.com/todos/1', 307, 'site', $siteId); + $this->assertNotEmpty($ruleId307); $proxyClient = new Client(); $proxyClient->setEndpoint('http://appwrite.test'); @@ -209,8 +209,10 @@ trait ProxyBase $this->assertEquals(200, $rules['headers']['status-code']); $this->assertEquals(2, $rules['body']['total']); + // Delete rules before the site to avoid cascade-delete races. + $this->cleanupRule($ruleId301); + $this->cleanupRule($ruleId307); $this->cleanupSite($siteId); - $this->cleanupRule($ruleId); } public function testCreateFunctionRule(): void From a1811570b3d0084c25e6aeaa01d5fa2ee2f6431f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 10:49:38 +0530 Subject: [PATCH 100/192] fix: update presence permissions from read to write in roles and HTTP handlers --- app/config/roles.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config/roles.php b/app/config/roles.php index 1728b7d713..4101a6fe06 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -13,7 +13,7 @@ $member = [ 'teams.read', 'teams.write', 'presences.read', - 'presences.read', + 'presences.write', 'documents.read', 'documents.write', 'rows.read', diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 2d3950645f..f7b76cba07 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -32,7 +32,7 @@ class Delete extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Delete presence') ->groups(['api', 'presences']) - ->label('scope', 'presences.read') + ->label('scope', 'presences.write') ->label('event', 'presences.[presenceId].delete') ->label('audits.event', 'presence.delete') ->label('audits.resource', 'presence/{request.presenceId}') diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index f59e85c0ed..0f164043df 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -41,7 +41,7 @@ class Update extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Update presence') ->groups(['api', 'presences']) - ->label('scope', 'presences.read') + ->label('scope', 'presences.write') ->label('event', 'presences.[presenceId].update') ->label('audits.event', 'presence.update') ->label('audits.resource', 'presence/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 65a184a805..ae7763eae4 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -43,7 +43,7 @@ class Upsert extends PlatformAction ->setHttpPath('/v1/presences/:presenceId') ->desc('Upsert presence') ->groups(['api', 'presences']) - ->label('scope', 'presences.read') + ->label('scope', 'presences.write') ->label('event', 'presences.[presenceId].upsert') ->label('audits.event', 'presence.upsert') ->label('audits.resource', 'presence/{response.$id}') From 31adbe6189f8449918fa433217e568e1a69e265d Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 11:02:25 +0530 Subject: [PATCH 101/192] fix: update presence permissions from read to write in tests and implementation --- .../Platform/Modules/Presences/HTTP/XList.php | 13 ++++++++++++- tests/e2e/General/UsageTest.php | 2 +- tests/e2e/Services/Presence/PresenceBase.php | 2 +- tests/e2e/Services/Presence/PresenceExpiryTest.php | 2 +- .../Presence/PresenceRealtimeClientTest.php | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 19883181a5..0d646278bb 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -11,6 +11,7 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Presences as PresencesQueries; use Appwrite\Utopia\Response; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; @@ -64,7 +65,6 @@ class XList extends PlatformAction public function action(array $queries, bool $includeTotal, int $ttl, Response $response, Database $dbForProject): void { try { - // TODO: make sure to add one more query here if not given -> send only not-expired presence -> presence will be cleared by the maintainance workers $queries = Query::parseQueries($queries); } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); @@ -165,6 +165,17 @@ class XList extends PlatformAction throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage(), previous: $e); } + // Post-filter expired presences in PHP rather than as a query so the cache key stays + // stable across requests (DateTime::now() in a query would bust the list cache every call). + // Null expiresAt is kept: realtime upserts leave it unset because the presence's lifetime + // is bound to the websocket connection. The maintenance worker prunes expired rows; until + // it runs, $total may be slightly inflated relative to the returned page. + $now = DateTime::now(); + $documents = \array_values(\array_filter($documents, function (Document $document) use ($now): bool { + $expiresAt = $document->getAttribute('expiresAt'); + return $expiresAt === null || $expiresAt > $now; + })); + $response->dynamic(new Document([ 'presences' => $documents, 'total' => $total, diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 11fb4f79f3..7d0e858bbb 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -232,7 +232,7 @@ class UsageTest extends Scope { $presenceKey = $this->getNewKey([ 'presences.read', - 'presences.read', + 'presences.write', ]); $projectId = $this->getProject()['$id']; diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index 8f05b4144a..c70379e1fb 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -23,7 +23,7 @@ trait PresenceBase self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ 'presences.read', - 'presences.read', + 'presences.write', ]); return self::$presenceApiKeyCache[$projectId]; diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presence/PresenceExpiryTest.php index ecbd51e147..fa8789ca1b 100644 --- a/tests/e2e/Services/Presence/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presence/PresenceExpiryTest.php @@ -27,7 +27,7 @@ class PresenceExpiryTest extends Scope self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ 'presences.read', - 'presences.read', + 'presences.write', ]); return self::$presenceApiKeyCache[$projectId]; diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php index ce5267b10a..60a66fcaed 100644 --- a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php @@ -54,7 +54,7 @@ class PresenceRealtimeClientTest extends Scope // Realtime tests validate HTTP reads of presences; those endpoints require `presences.read`. self::$presenceApiKeyCache[$projectId] = $this->getNewKey([ 'presences.read', - 'presences.read', + 'presences.write', ]); return self::$presenceApiKeyCache[$projectId]; From 0048d3f9112f32446b9f9788f072c1bc7f71666c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 11:10:36 +0530 Subject: [PATCH 102/192] updated presence worker deletion to cap the 30 days limit --- src/Appwrite/Platform/Workers/Deletes.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index f8a50be443..4e0fc075aa 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -1711,9 +1711,23 @@ class Deletes extends Action { $dbForProject = $getProjectDB($project); + // Drop a presence if either: + // - its expiresAt has passed (HTTP-upserted rows always set this), or + // - it was created more than 30 days ago. The upsert validator caps expiresAt at + // +30 days, so nothing legitimate should outlive that. This branch catches rows + // the expiresAt branch can't — chiefly realtime presences (expiresAt is null, + // lifetime tied to the websocket) whose disconnect-time cleanup never ran. + $now = DateTime::format(new \DateTime()); + $oldestAllowed = DateTime::format((new \DateTime())->sub(\DateInterval::createFromDateString('30 days'))); + $dbForProject->deleteDocuments('presenceLogs', [ - Query::isNotNull('expiresAt'), - Query::lessThan('expiresAt', DateTime::format(new \DateTime())), + Query::or([ + Query::and([ + Query::isNotNull('expiresAt'), + Query::lessThan('expiresAt', $now), + ]), + Query::lessThan('$createdAt', $oldestAllowed), + ]), ], onError: function (Throwable $th) { // Swallow errors to avoid breaking the cleanup process }); From 63333a0cbfda9ce7bacde291b5f59f66d8b5f129 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 11:13:38 +0530 Subject: [PATCH 103/192] updated delete endpoint exceptions --- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index f7b76cba07..a8b9671a53 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -69,9 +69,9 @@ class Delete extends PlatformAction try { $dbForProject->deleteDocument('presenceLogs', $presenceId); } catch (ConflictException) { - throw new Exception(Exception::DOCUMENT_DELETE_RESTRICTED); - } catch (RestrictedException) { throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT); + } catch (RestrictedException) { + throw new Exception(Exception::DOCUMENT_DELETE_RESTRICTED); } (new PresenceState())->purgeListCache($dbForProject); From f526fc85777b4648037ea3eb3fce4139b44bbc05 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 11:14:00 +0530 Subject: [PATCH 104/192] roles updated --- app/config/roles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/roles.php b/app/config/roles.php index 4101a6fe06..8d99ede520 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -50,7 +50,7 @@ $admins = [ 'users.read', 'users.write', 'presences.read', - 'presences.read', + 'presences.write', 'databases.read', 'databases.write', 'collections.read', From c13a0d1010d56d89397682ab68161405eb41b107 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 11:27:11 +0530 Subject: [PATCH 105/192] updated test --- tests/e2e/Services/GraphQL/PresenceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/GraphQL/PresenceTest.php b/tests/e2e/Services/GraphQL/PresenceTest.php index 6087b19bde..b0329e1c97 100644 --- a/tests/e2e/Services/GraphQL/PresenceTest.php +++ b/tests/e2e/Services/GraphQL/PresenceTest.php @@ -16,7 +16,7 @@ class PresenceTest extends Scope public function testUpsertPresenceSourceIsGraphql(): void { $projectId = $this->getProject()['$id']; - $apiKey = $this->getNewKey(['presences.read']); + $apiKey = $this->getNewKey(['presences.write']); $user = $this->getUser(true); $payload = [ From 5002afde09856703ede32fc951cf04ca6e2fe772 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 12:05:03 +0530 Subject: [PATCH 106/192] optimizations fix: update presence handling to include hostname and correct usage trigger parameter improvement: removed an external findOne call to the db and used the timestamps for knowing upsert did an update or a create --- src/Appwrite/Platform/Workers/Deletes.php | 19 ++++++++++++++++--- .../Realtime/Message/Handlers/Presence.php | 15 +++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 4e0fc075aa..7c591cd268 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -6,7 +6,10 @@ use Appwrite\Certificates\Adapter as CertificatesAdapter; use Appwrite\Deletes\Identities; use Appwrite\Deletes\Targets; use Appwrite\Event\Delete as DeleteEvent; +use Appwrite\Event\Message\Usage; +use Appwrite\Event\Publisher\Usage as UsagePublisher; use Appwrite\Extend\Exception; +use Appwrite\Usage\Context as UsageContext; use Executor\Executor; use Throwable; use Utopia\Abuse\Adapters\TimeLimit\Database as AbuseDatabase; @@ -68,6 +71,7 @@ class Deletes extends Action ->inject('log') ->inject('queueForDeletes') ->inject('getAudit') + ->inject('publisherForUsage') ->callback($this->action(...)); } @@ -95,6 +99,7 @@ class Deletes extends Action Log $log, DeleteEvent $queueForDeletes, callable $getAudit, + UsagePublisher $publisherForUsage, ): void { $payload = $message->getPayload(); @@ -214,7 +219,7 @@ class Deletes extends Action $this->deleteUsageStats($project, $getProjectDB, $getLogsDB, $hourlyUsageRetentionDatetime); $this->deleteExpiredSessions($project, $getProjectDB); $this->deleteExpiredTransactions($project, $getProjectDB); - $this->deleteExpiredPresences($project, $getProjectDB); + $this->deleteExpiredPresences($project, $getProjectDB, $publisherForUsage); $this->deleteOldDeployments($queueForDeletes, $project, $getProjectDB); break; default: @@ -1707,7 +1712,7 @@ class Deletes extends Action }); } - private function deleteExpiredPresences(Document $project, callable $getProjectDB): void + private function deleteExpiredPresences(Document $project, callable $getProjectDB, UsagePublisher $publisherForUsage): void { $dbForProject = $getProjectDB($project); @@ -1720,7 +1725,7 @@ class Deletes extends Action $now = DateTime::format(new \DateTime()); $oldestAllowed = DateTime::format((new \DateTime())->sub(\DateInterval::createFromDateString('30 days'))); - $dbForProject->deleteDocuments('presenceLogs', [ + $deleted = $dbForProject->deleteDocuments('presenceLogs', [ Query::or([ Query::and([ Query::isNotNull('expiresAt'), @@ -1731,5 +1736,13 @@ class Deletes extends Action ], onError: function (Throwable $th) { // Swallow errors to avoid breaking the cleanup process }); + + if ($deleted > 0) { + $usage = (new UsageContext())->addMetric(METRIC_USERS_PRESENCE, -$deleted); + $publisherForUsage->enqueue(new Usage( + project: $project, + metrics: $usage->getMetrics(), + )); + } } } diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index fbab6ec70e..0ff7e19328 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -40,7 +40,7 @@ class Presence extends Action /** * @param array<int, string>|null $permissions - * @param Closure(int, string): void $triggerPresenceUsage + * @param Closure(int, Document): void $triggerPresenceUsage * @param Closure(?Document, User, string, Document): void $triggerPresenceEvent * @return array<string, mixed> */ @@ -78,6 +78,9 @@ class Presence extends Action 'userId' => $user->getId(), 'source' => 'realtime', 'status' => $status, + // Pod identity, used by the realtime worker's startup sweep to clean up rows + // orphaned by a previous incarnation of this hostname (i.e. pod crash before onClose ran). + 'hostname' => \gethostname() ?: null, ]; if ($metadata !== null) { $presenceData['metadata'] = $metadata; @@ -92,16 +95,16 @@ class Presence extends Action $presenceId, (string) $user->getSequence(), function () use ($project, $triggerPresenceUsage): void { - $triggerPresenceUsage(1, $project->getId()); + $triggerPresenceUsage(1, $project); }, ); $presence->removeAttribute('hostname'); - $realtime->connections[$connectionId]['presences'] = \array_merge( - $realtime->connections[$connectionId]['presences'] ?? [], - [$presence->getId()], - ); + // Stash the Document keyed by ID so onClose can build delete-event payloads without + // re-reading the row from the DB. hostname is already stripped above so it won't leak + // into the realtime payload sent to subscribers. + $realtime->connections[$connectionId]['presences'][$presence->getId()] = $presence; $triggerPresenceEvent($project, $user, 'presences.[presenceId].upsert', $presence); From 5767ab8ac7ce6d82a5361444123f39670cd39cf3 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 12:09:12 +0530 Subject: [PATCH 107/192] refactor: update triggerPresenceUsage to accept Document and streamline presence cleanup logic --- app/realtime.php | 90 ++++++++++++++++-------- src/Appwrite/Databases/PresenceState.php | 2 +- 2 files changed, 60 insertions(+), 32 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index a0572c70ff..2b764677a5 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -290,25 +290,15 @@ if (!function_exists('triggerStats')) { } if (!function_exists('triggerPresenceUsage')) { - function triggerPresenceUsage(int $value, string $projectId): void + function triggerPresenceUsage(int $value, Document $project): void { - if (empty($projectId)) { + if ($project->isEmpty()) { return; } try { global $publisherForUsage; - $consoleDB = getConsoleDB(); - /** @var Document $project */ - $project = $consoleDB->getAuthorization()->skip( - fn () => $consoleDB->getDocument('projects', $projectId) - ); - - if ($project->isEmpty()) { - return; - } - $usage = new Context(); $usage->addMetric(METRIC_USERS_PRESENCE, $value); @@ -317,7 +307,7 @@ if (!function_exists('triggerPresenceUsage')) { metrics: $usage->getMetrics(), )); } catch (Throwable $th) { - logError($th, 'realtimeStats', tags: ['projectId' => $projectId]); + logError($th, 'realtimeStats', tags: ['projectId' => $project->getId()]); } } } @@ -600,6 +590,34 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, )); $register->get('telemetry.workerCounter')->add(1); + // Orphan sweep on pod restart -> no connections in in-memory realtime connections object. + // So db must be in sync and only one coroutine shall trigger this + if ($workerId === 0) { + go(function (): void { + $hostname = \gethostname(); + if ($hostname === false || $hostname === '') { + return; + } + + try { + $consoleDB = getConsoleDB(); + $consoleDB->getAuthorization()->skip(fn () => $consoleDB->foreach('projects', function (Document $project) use ($hostname): void { + try { + $dbForProject = getProjectDB($project); + $dbForProject->deleteDocuments('presenceLogs', [ + Query::equal('hostname', [$hostname]), + Query::equal('source', ['realtime']), + ]); + } catch (Throwable $th) { + Console::error("Realtime startup orphan sweep failed for project {$project->getId()}: {$th->getMessage()}"); + } + })); + } catch (Throwable $th) { + Console::error('Realtime startup orphan sweep error: ' . $th->getMessage()); + } + }); + } + $attempts = 0; $start = time(); @@ -1321,35 +1339,38 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { } $projectId = $realtime->connections[$connection]['projectId']; - $presenceIds = $realtime->connections[$connection]['presences'] ?? []; + /** @var array<string, Document> $presencesById */ + $presencesById = $realtime->connections[$connection]['presences'] ?? []; if ( - !empty($presenceIds) + !empty($presencesById) && $projectId !== 'console' ) { - /** @var string[] $presenceIds */ - $presenceIds = \array_values(\array_unique($presenceIds)); + go(function () use ($presencesById, $projectId): void { + // Fresh span: the parent realtime.close span finishes before this coroutine + Span::init('realtime.close.presenceCleanup'); + Span::add('realtime.projectId', $projectId); + Span::add('realtime.presenceCount', \count($presencesById)); - if (!empty($presenceIds)) { - $consoleDB = getConsoleDB(); - $project = $consoleDB->getAuthorization()->skip(fn () => $consoleDB->getDocument('projects', $projectId)); + try { + $consoleDB = getConsoleDB(); + $project = $consoleDB->getAuthorization()->skip(fn () => $consoleDB->getDocument('projects', $projectId)); - if (!$project->isEmpty()) { + if ($project->isEmpty()) { + return; + } + + $presenceIds = \array_keys($presencesById); + $presences = \array_values($presencesById); $dbForProject = getProjectDB($project); - $presences = $dbForProject->find('presenceLogs', [ - Query::equal('$id', $presenceIds), - ]); + try { $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); - } catch (Throwable $th) { + } catch (Throwable) { // swallow errors to avoid breaking disconnect cleanup } - $deletedPresences = \count($presences); - - if ($deletedPresences > 0) { - triggerPresenceUsage(-$deletedPresences, $project->getId()); - } + triggerPresenceUsage(-\count($presences), $project); foreach ($presences as $presence) { try { @@ -1358,8 +1379,15 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { // Swallow errors to avoid breaking disconnect cleanup } } + } catch (Throwable $th) { + Span::error($th); + logError($th, 'realtimeOnClosePresenceCleanup', tags: [ + 'projectId' => $projectId, + ]); + } finally { + Span::current()?->finish(); } - } + }); } triggerStats([ diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 8ba5b23eab..981e6ba57d 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -69,8 +69,8 @@ class PresenceState try { if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { - $presenceCreated = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])])->isEmpty(); $presence = $dbForProject->upsertDocument(self::COLLECTION_ID, $presenceDocument); + $presenceCreated = $presence->getCreatedAt() === $presence->getUpdatedAt(); } else { $presence = $this->transactionalUpsertForUser( $dbForProject, From 46e86ce8543b77edfe807093ceccc8c9ddac3590 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 12:28:33 +0530 Subject: [PATCH 108/192] fix: drop expired presences at fetch time and clean up Presence model attributes --- .../Platform/Modules/Presences/HTTP/XList.php | 26 ++++++++----------- .../Utopia/Response/Model/Presence.php | 2 ++ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 0d646278bb..a98235639b 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -93,6 +93,13 @@ class XList extends PlatformAction $groupedQueries = Query::groupByType($queries); $filterQueries = $groupedQueries['filters']; + // should be excluded from the user provided query as user query would be used for caching only + // otherwise cache will always miss due to the datetime now + $expiryFilter = Query::or([ + Query::isNull('expiresAt'), + Query::greaterThan('expiresAt', DateTime::now()), + ]); + try { if ((int)$ttl > 0) { $presenceState = new PresenceState(); @@ -115,7 +122,7 @@ class XList extends PlatformAction }, $cachedDocuments); $documentsCacheHit = true; } else { - $documents = $dbForProject->find('presenceLogs', $queries); + $documents = $dbForProject->find('presenceLogs', [...$queries, $expiryFilter]); $documentsArray = \array_map(function ($doc) { return $doc->getArrayCopy(); }, $documents); @@ -139,7 +146,7 @@ class XList extends PlatformAction if ($cachedTotal !== null && $cachedTotal !== false) { $total = (int) $cachedTotal; } else { - $total = $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT); + $total = $dbForProject->count('presenceLogs', [...$filterQueries, $expiryFilter], APP_LIMIT_COUNT); $presenceState->saveListCacheField( $dbForProject, $roles, @@ -154,8 +161,8 @@ class XList extends PlatformAction $response->addHeader('X-Appwrite-Cache', $documentsCacheHit ? 'hit' : 'miss'); } else { - $documents = $dbForProject->find('presenceLogs', $queries); - $total = $includeTotal ? $dbForProject->count('presenceLogs', $filterQueries, APP_LIMIT_COUNT) : 0; + $documents = $dbForProject->find('presenceLogs', [...$queries, $expiryFilter]); + $total = $includeTotal ? $dbForProject->count('presenceLogs', [...$filterQueries, $expiryFilter], APP_LIMIT_COUNT) : 0; } } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); @@ -165,17 +172,6 @@ class XList extends PlatformAction throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage(), previous: $e); } - // Post-filter expired presences in PHP rather than as a query so the cache key stays - // stable across requests (DateTime::now() in a query would bust the list cache every call). - // Null expiresAt is kept: realtime upserts leave it unset because the presence's lifetime - // is bound to the websocket connection. The maintenance worker prunes expired rows; until - // it runs, $total may be slightly inflated relative to the returned page. - $now = DateTime::now(); - $documents = \array_values(\array_filter($documents, function (Document $document) use ($now): bool { - $expiresAt = $document->getAttribute('expiresAt'); - return $expiresAt === null || $expiresAt > $now; - })); - $response->dynamic(new Document([ 'presences' => $documents, 'total' => $total, diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php index ea4092cff1..3a2899d095 100644 --- a/src/Appwrite/Utopia/Response/Model/Presence.php +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -96,6 +96,8 @@ class Presence extends Any { $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); + $document->removeAttribute('hostname'); + $document->removeAttribute('perms_md5'); if (!$document->isEmpty()) { $document->setAttribute('$sequence', (string) $document->getAttribute('$sequence', '')); From ffeb27e5a371c6e092892a6663daa88410badd17 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 14:36:59 +0530 Subject: [PATCH 109/192] updated presence test --- tests/e2e/Services/Presence/PresenceBase.php | 91 ++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index c70379e1fb..f04afbbec1 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -908,4 +908,95 @@ trait PresenceBase $this->assertEquals($userId, $list['body']['presences'][0]['userId']); $this->assertEquals('away', $list['body']['presences'][0]['status']); } + + public function testUpsertSameUserDifferentIdsReplacesRow(): void + { + if ($this->getSide() !== 'server') { + $this->expectNotToPerformAssertions(); + return; + } + + $projectId = $this->getProject()['$id']; + $originalUser = $this->getUser(); + // Fresh user so this test isn't entangled with rows seeded by other tests in the suite. + $targetUserId = $this->getUser(true)['$id']; + // Restore the suite's cached user/session so subsequent tests aren't affected. + self::$user[$projectId] = $originalUser; + + $headers = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getPresenceServerHeaders()); + + $firstId = ID::unique(); + $first = $this->client->call( + Client::METHOD_PUT, + '/presences/' . $firstId, + $headers, + [ + 'userId' => $targetUserId, + 'status' => 'online', + 'metadata' => ['source' => 'first'], + ] + ); + $this->assertEquals(200, $first['headers']['status-code']); + $this->assertEquals($firstId, $first['body']['$id']); + $this->assertEquals($targetUserId, $first['body']['userId']); + + $secondId = ID::unique(); + $this->assertNotEquals($firstId, $secondId); + + $second = $this->client->call( + Client::METHOD_PUT, + '/presences/' . $secondId, + $headers, + [ + 'userId' => $targetUserId, + 'status' => 'away', + 'metadata' => ['source' => 'second'], + ] + ); + $this->assertEquals(200, $second['headers']['status-code']); + // Returned $id must be the one we asked for — not silently aliased to the prior row. + $this->assertEquals($secondId, $second['body']['$id']); + $this->assertEquals($targetUserId, $second['body']['userId']); + $this->assertEquals('away', $second['body']['status']); + $this->assertEquals(['source' => 'second'], $second['body']['metadata']); + + // Old presenceId is gone (the unique-key-on-userInternalId guarantees one row per user; + // an ID change must replace the prior row, not coexist with it). + $oldGet = $this->client->call( + Client::METHOD_GET, + '/presences/' . $firstId, + $headers + ); + $this->assertEquals(404, $oldGet['headers']['status-code']); + + // New presenceId is reachable and matches the upsert response. + $newGet = $this->client->call( + Client::METHOD_GET, + '/presences/' . $secondId, + $headers + ); + $this->assertEquals(200, $newGet['headers']['status-code']); + $this->assertEquals($secondId, $newGet['body']['$id']); + $this->assertEquals($targetUserId, $newGet['body']['userId']); + $this->assertEquals('away', $newGet['body']['status']); + + // Listing the user surfaces exactly one row, carrying the new $id. + $list = $this->client->call( + Client::METHOD_GET, + '/presences', + $headers, + [ + 'queries' => [ + Query::equal('userId', [$targetUserId])->toString(), + ], + ] + ); + $this->assertEquals(200, $list['headers']['status-code']); + $this->assertEquals(1, $list['body']['total']); + $this->assertCount(1, $list['body']['presences']); + $this->assertEquals($secondId, $list['body']['presences'][0]['$id']); + } } From 6b7fb918cce4e8c7badfb99b2a558161bf372609 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 8 May 2026 19:09:50 +0530 Subject: [PATCH 110/192] refactor: streamline presence upsert logic and remove redundant presenceId parameter --- src/Appwrite/Databases/PresenceState.php | 15 ++-- tests/e2e/Services/Presence/PresenceBase.php | 91 -------------------- 2 files changed, 7 insertions(+), 99 deletions(-) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 981e6ba57d..ce2c51420e 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -69,13 +69,13 @@ class PresenceState try { if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { + // $id will not be updated if new id provided. id is always stable $presence = $dbForProject->upsertDocument(self::COLLECTION_ID, $presenceDocument); $presenceCreated = $presence->getCreatedAt() === $presence->getUpdatedAt(); } else { $presence = $this->transactionalUpsertForUser( $dbForProject, $presenceDocument, - $presenceId, $userInternalId, $presenceCreated ); @@ -100,11 +100,10 @@ class PresenceState private function transactionalUpsertForUser( Database $dbForProject, Document $presenceDocument, - string $presenceId, mixed $userInternalId, ?bool &$presenceCreated = null ): Document { - return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $presenceId, $userInternalId, &$presenceCreated) { + return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $userInternalId, &$presenceCreated) { $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); if ($existingPresence->isEmpty()) { @@ -119,11 +118,11 @@ class PresenceState throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); } - if ($presenceId !== 'unique()' && $currentPresence->getId() !== $presenceId) { - $presenceDocument->setAttribute('$id', $presenceId); - $dbForProject->deleteDocument(self::COLLECTION_ID, $currentPresence->getId()); - return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); - } + // Mirror the native upsertDocument path: the unique key is userInternalId, so an + // existing row's $id is preserved even if the caller asked for a different one. + // Only the other fields land. Realign the input doc's $id to the existing row so + // updateDocument doesn't trip its own $id-consistency check. + $presenceDocument->setAttribute('$id', $currentPresence->getId()); return $dbForProject->updateDocument(self::COLLECTION_ID, $currentPresence->getId(), $presenceDocument); }); diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presence/PresenceBase.php index f04afbbec1..c70379e1fb 100644 --- a/tests/e2e/Services/Presence/PresenceBase.php +++ b/tests/e2e/Services/Presence/PresenceBase.php @@ -908,95 +908,4 @@ trait PresenceBase $this->assertEquals($userId, $list['body']['presences'][0]['userId']); $this->assertEquals('away', $list['body']['presences'][0]['status']); } - - public function testUpsertSameUserDifferentIdsReplacesRow(): void - { - if ($this->getSide() !== 'server') { - $this->expectNotToPerformAssertions(); - return; - } - - $projectId = $this->getProject()['$id']; - $originalUser = $this->getUser(); - // Fresh user so this test isn't entangled with rows seeded by other tests in the suite. - $targetUserId = $this->getUser(true)['$id']; - // Restore the suite's cached user/session so subsequent tests aren't affected. - self::$user[$projectId] = $originalUser; - - $headers = \array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - ], $this->getPresenceServerHeaders()); - - $firstId = ID::unique(); - $first = $this->client->call( - Client::METHOD_PUT, - '/presences/' . $firstId, - $headers, - [ - 'userId' => $targetUserId, - 'status' => 'online', - 'metadata' => ['source' => 'first'], - ] - ); - $this->assertEquals(200, $first['headers']['status-code']); - $this->assertEquals($firstId, $first['body']['$id']); - $this->assertEquals($targetUserId, $first['body']['userId']); - - $secondId = ID::unique(); - $this->assertNotEquals($firstId, $secondId); - - $second = $this->client->call( - Client::METHOD_PUT, - '/presences/' . $secondId, - $headers, - [ - 'userId' => $targetUserId, - 'status' => 'away', - 'metadata' => ['source' => 'second'], - ] - ); - $this->assertEquals(200, $second['headers']['status-code']); - // Returned $id must be the one we asked for — not silently aliased to the prior row. - $this->assertEquals($secondId, $second['body']['$id']); - $this->assertEquals($targetUserId, $second['body']['userId']); - $this->assertEquals('away', $second['body']['status']); - $this->assertEquals(['source' => 'second'], $second['body']['metadata']); - - // Old presenceId is gone (the unique-key-on-userInternalId guarantees one row per user; - // an ID change must replace the prior row, not coexist with it). - $oldGet = $this->client->call( - Client::METHOD_GET, - '/presences/' . $firstId, - $headers - ); - $this->assertEquals(404, $oldGet['headers']['status-code']); - - // New presenceId is reachable and matches the upsert response. - $newGet = $this->client->call( - Client::METHOD_GET, - '/presences/' . $secondId, - $headers - ); - $this->assertEquals(200, $newGet['headers']['status-code']); - $this->assertEquals($secondId, $newGet['body']['$id']); - $this->assertEquals($targetUserId, $newGet['body']['userId']); - $this->assertEquals('away', $newGet['body']['status']); - - // Listing the user surfaces exactly one row, carrying the new $id. - $list = $this->client->call( - Client::METHOD_GET, - '/presences', - $headers, - [ - 'queries' => [ - Query::equal('userId', [$targetUserId])->toString(), - ], - ] - ); - $this->assertEquals(200, $list['headers']['status-code']); - $this->assertEquals(1, $list['body']['total']); - $this->assertCount(1, $list['body']['presences']); - $this->assertEquals($secondId, $list['body']['presences'][0]['$id']); - } } From 4b98579adfe70fd5d836c7e7b3cdd731c18301c4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 11 May 2026 14:29:47 +0530 Subject: [PATCH 111/192] refactor: simplify user retrieval in Presence handler by directly instantiating User object --- src/Appwrite/Databases/PresenceState.php | 5 ----- src/Appwrite/Realtime/Message/Handlers/Presence.php | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index ce2c51420e..bb0f218a85 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -111,17 +111,12 @@ class PresenceState return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); } - // Lock current state to avoid races while resolving upsert by userInternalId. $currentPresence = $dbForProject->getDocument(self::COLLECTION_ID, $existingPresence->getId(), forUpdate: true); if ($currentPresence->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); } - // Mirror the native upsertDocument path: the unique key is userInternalId, so an - // existing row's $id is preserved even if the caller asked for a different one. - // Only the other fields land. Realign the input doc's $id to the existing row so - // updateDocument doesn't trip its own $id-consistency check. $presenceDocument->setAttribute('$id', $currentPresence->getId()); return $dbForProject->updateDocument(self::COLLECTION_ID, $currentPresence->getId(), $presenceDocument); diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index 0ff7e19328..4a764da5c1 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -67,8 +67,7 @@ class Presence extends Action throw new Exception(Exception::USER_UNAUTHORIZED, 'User must be authorized'); } - /** @var User $user */ - $user = $database->getDocument('users', $userId); + $user = new User($database->getDocument('users', $userId)->getArrayCopy()); if ($user->isEmpty()) { throw new Exception(Exception::USER_NOT_FOUND, params: [$userId]); } From 28621678dd60369dca610333658a0f876869b256 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 11 May 2026 14:35:01 +0530 Subject: [PATCH 112/192] changed presence to presences for the e2e tests --- .github/workflows/ci.yml | 2 +- tests/e2e/Services/{Presence => Presences}/PresenceBase.php | 0 .../{Presence => Presences}/PresenceConsoleClientTest.php | 0 .../{Presence => Presences}/PresenceCustomClientTest.php | 0 .../{Presence => Presences}/PresenceCustomServerTest.php | 0 .../e2e/Services/{Presence => Presences}/PresenceExpiryTest.php | 0 .../{Presence => Presences}/PresenceRealtimeClientTest.php | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename tests/e2e/Services/{Presence => Presences}/PresenceBase.php (100%) rename tests/e2e/Services/{Presence => Presences}/PresenceConsoleClientTest.php (100%) rename tests/e2e/Services/{Presence => Presences}/PresenceCustomClientTest.php (100%) rename tests/e2e/Services/{Presence => Presences}/PresenceCustomServerTest.php (100%) rename tests/e2e/Services/{Presence => Presences}/PresenceExpiryTest.php (100%) rename tests/e2e/Services/{Presence => Presences}/PresenceRealtimeClientTest.php (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1044ef7dcb..3736c62f3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -442,7 +442,7 @@ jobs: Messaging, Migrations, Project, - Presence + Presences ] include: - service: Databases diff --git a/tests/e2e/Services/Presence/PresenceBase.php b/tests/e2e/Services/Presences/PresenceBase.php similarity index 100% rename from tests/e2e/Services/Presence/PresenceBase.php rename to tests/e2e/Services/Presences/PresenceBase.php diff --git a/tests/e2e/Services/Presence/PresenceConsoleClientTest.php b/tests/e2e/Services/Presences/PresenceConsoleClientTest.php similarity index 100% rename from tests/e2e/Services/Presence/PresenceConsoleClientTest.php rename to tests/e2e/Services/Presences/PresenceConsoleClientTest.php diff --git a/tests/e2e/Services/Presence/PresenceCustomClientTest.php b/tests/e2e/Services/Presences/PresenceCustomClientTest.php similarity index 100% rename from tests/e2e/Services/Presence/PresenceCustomClientTest.php rename to tests/e2e/Services/Presences/PresenceCustomClientTest.php diff --git a/tests/e2e/Services/Presence/PresenceCustomServerTest.php b/tests/e2e/Services/Presences/PresenceCustomServerTest.php similarity index 100% rename from tests/e2e/Services/Presence/PresenceCustomServerTest.php rename to tests/e2e/Services/Presences/PresenceCustomServerTest.php diff --git a/tests/e2e/Services/Presence/PresenceExpiryTest.php b/tests/e2e/Services/Presences/PresenceExpiryTest.php similarity index 100% rename from tests/e2e/Services/Presence/PresenceExpiryTest.php rename to tests/e2e/Services/Presences/PresenceExpiryTest.php diff --git a/tests/e2e/Services/Presence/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php similarity index 100% rename from tests/e2e/Services/Presence/PresenceRealtimeClientTest.php rename to tests/e2e/Services/Presences/PresenceRealtimeClientTest.php From 9f65c6ce419586da05a2416e3d0ef4caa54a8412 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 11 May 2026 15:27:54 +0530 Subject: [PATCH 113/192] updated namespace --- tests/e2e/Services/Presences/PresenceBase.php | 2 +- tests/e2e/Services/Presences/PresenceConsoleClientTest.php | 2 +- tests/e2e/Services/Presences/PresenceCustomClientTest.php | 2 +- tests/e2e/Services/Presences/PresenceCustomServerTest.php | 2 +- tests/e2e/Services/Presences/PresenceExpiryTest.php | 2 +- tests/e2e/Services/Presences/PresenceRealtimeClientTest.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/Services/Presences/PresenceBase.php b/tests/e2e/Services/Presences/PresenceBase.php index c70379e1fb..2c3917151a 100644 --- a/tests/e2e/Services/Presences/PresenceBase.php +++ b/tests/e2e/Services/Presences/PresenceBase.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Presence; +namespace Tests\E2E\Services\Presences; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; diff --git a/tests/e2e/Services/Presences/PresenceConsoleClientTest.php b/tests/e2e/Services/Presences/PresenceConsoleClientTest.php index fbb00d6cab..c3c2233256 100644 --- a/tests/e2e/Services/Presences/PresenceConsoleClientTest.php +++ b/tests/e2e/Services/Presences/PresenceConsoleClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Presence; +namespace Tests\E2E\Services\Presences; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; diff --git a/tests/e2e/Services/Presences/PresenceCustomClientTest.php b/tests/e2e/Services/Presences/PresenceCustomClientTest.php index 19260e7c6b..0679fefb00 100644 --- a/tests/e2e/Services/Presences/PresenceCustomClientTest.php +++ b/tests/e2e/Services/Presences/PresenceCustomClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Presence; +namespace Tests\E2E\Services\Presences; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; diff --git a/tests/e2e/Services/Presences/PresenceCustomServerTest.php b/tests/e2e/Services/Presences/PresenceCustomServerTest.php index 7cf0129e08..0ac3661819 100644 --- a/tests/e2e/Services/Presences/PresenceCustomServerTest.php +++ b/tests/e2e/Services/Presences/PresenceCustomServerTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Presence; +namespace Tests\E2E\Services\Presences; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; diff --git a/tests/e2e/Services/Presences/PresenceExpiryTest.php b/tests/e2e/Services/Presences/PresenceExpiryTest.php index fa8789ca1b..8c6557ab32 100644 --- a/tests/e2e/Services/Presences/PresenceExpiryTest.php +++ b/tests/e2e/Services/Presences/PresenceExpiryTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Presence; +namespace Tests\E2E\Services\Presences; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; diff --git a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php index 60a66fcaed..ea82f27c3c 100644 --- a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Presence; +namespace Tests\E2E\Services\Presences; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; From cad35c7d5cce85af269aad19106ab77c0ccdd759 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 11 May 2026 16:47:36 +0530 Subject: [PATCH 114/192] refactor: enhance presence deletion logic and add expiration check in Get action Co-authored-by: Copilot <copilot@github.com> --- app/realtime.php | 19 +++++++++++++------ .../Platform/Modules/Presences/HTTP/Get.php | 7 +++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 2b764677a5..ae83e4200a 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -604,12 +604,16 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, $consoleDB->getAuthorization()->skip(fn () => $consoleDB->foreach('projects', function (Document $project) use ($hostname): void { try { $dbForProject = getProjectDB($project); - $dbForProject->deleteDocuments('presenceLogs', [ + $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [ Query::equal('hostname', [$hostname]), Query::equal('source', ['realtime']), ]); + triggerPresenceUsage($deletionCount, $project); } catch (Throwable $th) { Console::error("Realtime startup orphan sweep failed for project {$project->getId()}: {$th->getMessage()}"); + logError($th, 'realtimeOrphanPresenceCleanup', tags: [ + 'projectId' => $project->getId(), + ]); } })); } catch (Throwable $th) { @@ -1365,13 +1369,16 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { $dbForProject = getProjectDB($project); try { - $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); - } catch (Throwable) { - // swallow errors to avoid breaking disconnect cleanup + $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); + triggerPresenceUsage($deletionCount, $project); + } catch (Throwable $th) { + Span::error($th); + logError($th, 'realtimeOnClosePresenceDeletion', tags: [ + 'projectId' => $projectId, + 'presences' => \count($presences) + ]); } - triggerPresenceUsage(-\count($presences), $project); - foreach ($presences as $presence) { try { triggerPresenceEvent($project, new User([]), 'presences.[presenceId].delete', $presence); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 6c6f02e1ab..0f15cb86bc 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -9,6 +9,7 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; @@ -56,6 +57,12 @@ class Get extends PlatformAction throw new Exception(Exception::PRESENCE_NOT_FOUND); } + $presenceExpiresAt = $presence->getAttribute('expiresAt'); + + if (!empty($presenceExpiresAt) && DateTime::formatTz($presenceExpiresAt) < DateTime::formatTz(DateTime::now())) { + throw new Exception(Exception::PRESENCE_NOT_FOUND); + } + $response->dynamic($presence, Response::MODEL_PRESENCE); } } From 95dd44115d98aa9bb856f8e76a1d347ffed06577 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 12 May 2026 15:49:59 +0530 Subject: [PATCH 115/192] refactor: update Dockerfile to remove composer stage and adjust presence handling in tests --- app/config/collections/projects.php | 1 - src/Appwrite/Databases/PresenceState.php | 9 +++++++-- .../Presences/PresenceRealtimeClientTest.php | 13 +++++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index ff723d2345..75f7b5508c 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2815,7 +2815,6 @@ return [ 'array' => false, 'filters' => [], ], - // TODO: the current pod? Shall we make it the region? instead of the hostname? So that when its restarted it can delete all the presence? [ '$id' => ID::custom('hostname'), 'type' => Database::VAR_STRING, diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index bb0f218a85..6342ca8dd5 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -69,9 +69,14 @@ class PresenceState try { if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { - // $id will not be updated if new id provided. id is always stable + // in v2 use permsmd5 in the queries as well to find the doc + $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); + if ($existingPresence->isEmpty()) { + $presenceCreated = true; + } else { + $presenceDocument->setAttribute('$id', $existingPresence->getId()); + } $presence = $dbForProject->upsertDocument(self::COLLECTION_ID, $presenceDocument); - $presenceCreated = $presence->getCreatedAt() === $presence->getUpdatedAt(); } else { $presence = $this->transactionalUpsertForUser( $dbForProject, diff --git a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php index ea82f27c3c..f3e4aac1a7 100644 --- a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php @@ -342,7 +342,9 @@ class PresenceRealtimeClientTest extends Scope $secondMetadata, $this->getPresencePermissions(Role::any()) ); - $this->collectPresenceOutcome($publisher, $secondPresenceId, 'busy', $secondMetadata, $user['$id']); + // The server keeps one row per user keyed by userInternalId and anchors $id to the + // first claim, so the second upsert's response/event come back under $firstPresenceId. + $this->collectPresenceOutcome($publisher, $firstPresenceId, 'busy', $secondMetadata, $user['$id']); $list = $this->client->call( Client::METHOD_GET, @@ -543,12 +545,15 @@ class PresenceRealtimeClientTest extends Scope $metadataOwner, $this->getPresencePermissions(Role::user($user1['$id'])) ); - $this->collectPresenceOutcome($publisher, $presenceIdOwner, 'busy', $metadataOwner, $user1['$id']); - $this->receivePresenceEvent($listener1, $presenceIdOwner, 'upsert', 'busy', $metadataOwner, $user1['$id']); + // Same user, so the server reuses the original record's $id ($presenceIdAny); + // only permissions/status/metadata change — which is what permission routing should filter on. + $this->collectPresenceOutcome($publisher, $presenceIdAny, 'busy', $metadataOwner, $user1['$id']); + $this->receivePresenceEvent($listener1, $presenceIdAny, 'upsert', 'busy', $metadataOwner, $user1['$id']); $this->assertQuietFor( $listener2, fn (array $frame): bool => ($frame['type'] ?? null) === 'event' - && ($frame['data']['payload']['$id'] ?? null) === $presenceIdOwner + && ($frame['data']['payload']['$id'] ?? null) === $presenceIdAny + && ($frame['data']['payload']['metadata']['visibility'] ?? null) === 'owner' ); } finally { $publisher->close(); From c1cab2e41aefc8a7f950a57e57d0ad4243e94d7e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 12 May 2026 17:33:21 +0530 Subject: [PATCH 116/192] removed redundant --- app/init/constants.php | 4 ---- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 1 - 2 files changed, 5 deletions(-) diff --git a/app/init/constants.php b/app/init/constants.php index 91a6dc73f9..9dcdf09817 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -412,10 +412,6 @@ const METRIC_REALTIME_CONNECTIONS_MESSAGES_SENT = 'realtime.messages.sent'; const METRIC_REALTIME_INBOUND = 'realtime.inbound'; const METRIC_REALTIME_OUTBOUND = 'realtime.outbound'; -// Presence API metrics -const METRIC_PRESENCE_UPSERTED = 'presences.upserted'; -const METRIC_PRESENCE_DELETED = 'presence.deleted'; - // Resource types const RESOURCE_TYPE_PROJECTS = 'projects'; const RESOURCE_TYPE_FUNCTIONS = 'functions'; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index a8b9671a53..8edb364e55 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -76,7 +76,6 @@ class Delete extends PlatformAction (new PresenceState())->purgeListCache($dbForProject); - $usage->addMetric(METRIC_PRESENCE_DELETED, 1); $usage->addMetric(METRIC_USERS_PRESENCE, -1); $queueForEvents From 62de39b858ff0a5e8d1983aefa88829053744e0c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 12 May 2026 17:44:28 +0530 Subject: [PATCH 117/192] removed todo comment --- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index ae7763eae4..298bd77f49 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -162,8 +162,6 @@ class Upsert extends PlatformAction 'status' => $status, 'source' => $isGraphQL ? 'graphql' : 'rest', 'expiresAt' => $expiresAt ?? DateTime::addSeconds(new \DateTime(), 15 * 60), - // TODO: finding a way to find hostname - // 'hostname' => $hostname, 'metadata' => $metadata, ]; From 5827f2ece6cdca88c79b7f133a8a2b9624a73f8a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 12 May 2026 18:05:51 +0530 Subject: [PATCH 118/192] fix: correct presence usage decrement in triggerPresenceUsage calls --- app/realtime.php | 4 ++-- src/Appwrite/Utopia/Response/Model/Presence.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index ae83e4200a..1300c8c91c 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -608,7 +608,7 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, Query::equal('hostname', [$hostname]), Query::equal('source', ['realtime']), ]); - triggerPresenceUsage($deletionCount, $project); + triggerPresenceUsage(-$deletionCount, $project); } catch (Throwable $th) { Console::error("Realtime startup orphan sweep failed for project {$project->getId()}: {$th->getMessage()}"); logError($th, 'realtimeOrphanPresenceCleanup', tags: [ @@ -1370,7 +1370,7 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { try { $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); - triggerPresenceUsage($deletionCount, $project); + triggerPresenceUsage(-$deletionCount, $project); } catch (Throwable $th) { Span::error($th); logError($th, 'realtimeOnClosePresenceDeletion', tags: [ diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php index 3a2899d095..b6da06c0a3 100644 --- a/src/Appwrite/Utopia/Response/Model/Presence.php +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -87,7 +87,6 @@ class Presence extends Any 'default' => null, 'example' => self::TYPE_DATETIME_EXAMPLE, ]); - // `hostname` is intentionally not exposed. // User-defined extras flow through Any's generic mapping, surfaced under // the "metadata" key declared via setAdditionalPropertiesKey() above. } From 84f18341ed876af28f484f530daac648ec94e127 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 11:09:56 +0530 Subject: [PATCH 119/192] feat: add setOwnerPermissions method and update presence ownership logic --- src/Appwrite/Databases/PresenceState.php | 21 ++++ .../Modules/Presences/HTTP/Update.php | 2 + tests/e2e/Services/Presences/PresenceBase.php | 108 ++++++++++++++++++ 3 files changed, 131 insertions(+) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 6342ca8dd5..af7185f94a 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -128,6 +128,27 @@ class PresenceState }); } + public function setOwnerPermissions(Document $document, string $userId): Document + { + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + Database::PERMISSION_WRITE, + ]; + + $ownerPermissions = []; + foreach ($allowedPermissions as $permission) { + $ownerPermissions[] = (new Permission($permission, 'user', $userId))->toString(); + } + + sort($ownerPermissions, SORT_STRING); + $document->setAttribute('$permissions', $ownerPermissions); + $document->setAttribute('perms_md5', \md5(\json_encode($ownerPermissions))); + + return $document; + } + private function assertPermissionsAgainstAuthorization(array $permissions, Authorization $authorization): void { foreach (Database::PERMISSIONS as $type) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 0f164043df..68c6909f62 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -166,6 +166,8 @@ class Update extends PlatformAction if ($permissions !== null) { $presenceState->setPermissions($updates, $permissions, $user, $authorization); + } elseif ($userId !== null && $userId !== $presence->getAttribute('userId')) { + $presenceState->setOwnerPermissions($updates, $userId); } if (empty($updateData) && $permissions === null) { diff --git a/tests/e2e/Services/Presences/PresenceBase.php b/tests/e2e/Services/Presences/PresenceBase.php index 2c3917151a..b640952501 100644 --- a/tests/e2e/Services/Presences/PresenceBase.php +++ b/tests/e2e/Services/Presences/PresenceBase.php @@ -504,6 +504,114 @@ trait PresenceBase $this->assertEquals(['source' => 'update'], $update['body']['metadata']); } + public function testUpdatePresenceUserIdReassignsDefaultPermissions(): void + { + if ($this->getSide() !== 'server') { + $this->expectNotToPerformAssertions(); + return; + } + + $projectId = $this->getProject()['$id']; + $user1 = $this->getUser(true); + $user2 = $this->getUser(true); + + $headersUser1 = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user1['session'], + ]; + + $headersUser2 = [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user2['session'], + ]; + + $create = $this->client->call( + Client::METHOD_PUT, + '/presences/' . ID::unique(), + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser1), + [ + 'status' => 'online', + 'metadata' => ['owner' => 'user1'], + ] + ); + + $this->assertEquals(200, $create['headers']['status-code']); + $presence = $this->resolvePresenceForUser( + $user1['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser1) + ); + + $reassign = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getPresenceServerHeaders()), + [ + 'userId' => $user2['$id'], + 'status' => 'busy', + ] + ); + + $this->assertEquals(200, $reassign['headers']['status-code']); + $this->assertSame($user2['$id'], $reassign['body']['userId']); + + $getOldOwner = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser1) + ); + $this->assertEquals(404, $getOldOwner['headers']['status-code']); + + $getNewOwner = $this->client->call( + Client::METHOD_GET, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2) + ); + $this->assertEquals(200, $getNewOwner['headers']['status-code']); + $this->assertSame($user2['$id'], $getNewOwner['body']['userId']); + + $patchOldOwner = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser1), + [ + 'status' => 'offline', + ] + ); + $this->assertEquals(404, $patchOldOwner['headers']['status-code']); + + $patchNewOwner = $this->client->call( + Client::METHOD_PATCH, + '/presences/' . $presence['$id'], + \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $headersUser2), + [ + 'status' => 'away', + ] + ); + $this->assertEquals(200, $patchNewOwner['headers']['status-code']); + $this->assertSame('away', $patchNewOwner['body']['status']); + } + public function testDeletePresence(): void { if ($this->getSide() === 'client') { From efadf1d74b5872b41d46f39e1dc4e143fe0ec098 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 11:18:09 +0530 Subject: [PATCH 120/192] removed redundant --- app/realtime.php | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 1300c8c91c..4c542c9672 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -39,7 +39,6 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; -use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; @@ -360,37 +359,6 @@ if (!function_exists('triggerPresenceEvent')) { } } -if (!function_exists('setPermission')) { - function setPermission(Document $document, ?array $permissions, Authorization $authorization): void - { - $allowedPermissions = [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - Database::PERMISSION_WRITE, - ]; - $permissions = Permission::aggregate($permissions, $allowedPermissions); - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!$authorization->hasRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $authorization->getRoles()) . ')'); - } - } - } - sort($permissions, SORT_STRING); - $document->setAttribute('$permissions', $permissions); - } -} - global $container; $container->set('pools', function ($register) { From e799589d11fc61c502bdb4b8baea652cf4bb710f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 12:20:12 +0530 Subject: [PATCH 121/192] feat: implement deduplication for presence delete events and enhance presence management --- app/realtime.php | 10 ++ src/Appwrite/Messaging/Adapter/Realtime.php | 68 ++++++++++++++ .../Realtime/Message/Handlers/Presence.php | 6 +- .../Presences/PresenceRealtimeClientTest.php | 91 +++++++++++++++++++ tests/unit/Messaging/MessagingTest.php | 80 ++++++++++++++++ 5 files changed, 252 insertions(+), 3 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 4c542c9672..b4c76c6b6f 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -773,6 +773,16 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, } } + // Strip deleted presences from in-memory connection state so onClose doesn't + // re-fire delete events for rows already removed via HTTP DELETE. + $deletedPresenceId = Realtime::extractDeletedPresenceId($event); + if ($deletedPresenceId !== null) { + $realtime->removePresenceFromConnections( + (string) ($event['project'] ?? ''), + $deletedPresenceId, + ); + } + $receivers = $realtime->getSubscribers($event); if (System::getEnv('_APP_ENV', 'production') === 'development' && !empty($receivers)) { diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 5015aa5465..29ee048977 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -204,6 +204,74 @@ class Realtime extends MessagingAdapter return $subscriptions; } + /** + * Dedup delete presence triggers. + * Scenario: when client is connected to realtime and a delete call is made throught rest. + * If not dedupe then two delete events will get triggered. So remove the presenceIds + * + * @param string $projectId + * @param string $presenceId + * @return int Number of connections whose presences map was updated. + */ + public function removePresenceFromConnections(string $projectId, string $presenceId): int + { + if ($projectId === '' || $presenceId === '') { + return 0; + } + + $removed = 0; + foreach ($this->connections as $connectionId => $connection) { + if (($connection['projectId'] ?? null) !== $projectId) { + continue; + } + if (!isset($connection['presences'][$presenceId])) { + continue; + } + unset($this->connections[$connectionId]['presences'][$presenceId]); + $removed++; + } + + return $removed; + } + + /** + * Returns the presence ID carried by a `presences.{id}.delete` event payload, + * or null when the event is not a presence delete. + * + * @param array $event Decoded pubsub payload produced by self::send(). + * @return string|null + */ + public static function extractDeletedPresenceId(array $event): ?string + { + $events = $event['data']['events'] ?? []; + if (!\is_array($events)) { + return null; + } + + $isPresenceDelete = false; + foreach ($events as $eventName) { + if ( + \is_string($eventName) + && \str_starts_with($eventName, 'presences.') + && \str_ends_with($eventName, '.delete') + ) { + $isPresenceDelete = true; + break; + } + } + + if (!$isPresenceDelete) { + return null; + } + + $presenceId = $event['data']['payload']['$id'] ?? null; + if (!\is_string($presenceId) || $presenceId === '') { + return null; + } + + return $presenceId; + } + /** * Removes all subscriptions for a connection. * diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index 4a764da5c1..76ed48f47e 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -98,11 +98,11 @@ class Presence extends Action }, ); + $presence->removeAttribute('$collection'); + $presence->removeAttribute('$tenant'); $presence->removeAttribute('hostname'); + $presence->removeAttribute('perms_md5'); - // Stash the Document keyed by ID so onClose can build delete-event payloads without - // re-reading the row from the DB. hostname is already stripped above so it won't leak - // into the realtime payload sent to subscribers. $realtime->connections[$connectionId]['presences'][$presence->getId()] = $presence; $triggerPresenceEvent($project, $user, 'presences.[presenceId].upsert', $presence); diff --git a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php index f3e4aac1a7..bf2baf9ede 100644 --- a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Presences; +use Appwrite\Tests\Async\Exceptions\Critical; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -589,4 +590,94 @@ class PresenceRealtimeClientTest extends Scope $listener->close(); } } + + public function testHttpDeleteThenCloseDoesNotDuplicateDeleteEvent(): void + { + [$project, $user, $headers] = $this->bootstrapIsolatedProject(); + $presenceId = ID::unique(); + $metadata = ['testRunId' => ID::unique(), 'source' => 'http-delete-then-close']; + + $publisher = $this->connectRealtimeAndSubscribe($project, $headers, ['presences', 'presences.' . $presenceId], timeout: 1); + $listener = $this->connectRealtimeAndSubscribe($project, $headers, ['presences', 'presences.' . $presenceId], timeout: 1); + + try { + // Publish a presence over WebSocket so the realtime worker tracks it in + // its in-memory connection map under the publisher connection. + $this->sendPresenceMessage( + $publisher, + $presenceId, + 'online', + $metadata, + $this->getPresencePermissions(Role::any()) + ); + $this->collectPresenceOutcome($publisher, $presenceId, 'online', $metadata, $user['$id']); + $this->receivePresenceEvent($listener, $presenceId, 'upsert', 'online', $metadata, $user['$id']); + + // HTTP DELETE removes the row from the DB and emits the delete event via pubsub. + // The realtime worker is expected to strip the presence from the publisher's + // in-memory connection state when it processes the pubsub message. + $delete = $this->client->call( + Client::METHOD_DELETE, + '/presences/' . $presenceId, + $this->getServerHeaders($project) + ); + $this->assertSame(204, $delete['headers']['status-code']); + + // Synchronization point: wait for the listener to receive the legitimate + // delete event before closing the publisher. Redis pubsub broadcasts to + // every realtime worker simultaneously, so the listener's worker observing + // the event implies the publisher's worker has also processed it (and run + // the in-memory cleanup) by the time onClose fires. + $deleteEvents = []; + $deleteEvents[] = $this->receivePresenceEvent($listener, $presenceId, 'delete', 'online', $metadata, $user['$id']); + + $publisher->close(); + + // Watch for any additional presences.{id}.delete frame. A second one would + // be the regression: onClose re-firing the event for a presence already + // removed via HTTP DELETE. + $deadline = \microtime(true) + 2.0; + + $this->assertEventually( + function () use ($listener, $presenceId, $deadline, &$deleteEvents): void { + try { + $raw = $listener->receive(); + $frame = \json_decode($raw, true); + if ( + \is_array($frame) + && ($frame['type'] ?? null) === 'event' + && ($frame['data']['payload']['$id'] ?? null) === $presenceId + && \in_array('presences.' . $presenceId . '.delete', $frame['data']['events'] ?? [], true) + ) { + $deleteEvents[] = $frame; + if (\count($deleteEvents) > 1) { + throw new Critical( + 'Duplicate presence delete event after HTTP DELETE + WebSocket close: ' + . \json_encode($frame) + ); + } + } + } catch (TimeoutException) { + // No frame this poll; fall through to deadline check. + } + + if (\microtime(true) < $deadline) { + // Throw a non-Critical exception so assertEventually retries. + throw new \RuntimeException('still watching for duplicate delete event'); + } + }, + timeoutMs: 3000, + waitMs: 0 + ); + + $this->assertCount( + 1, + $deleteEvents, + 'Expected exactly one presences.' . $presenceId . '.delete event; got ' . \count($deleteEvents) + ); + $this->assertPresenceRealtimeEvent($deleteEvents[0], $presenceId, 'delete', 'online', $metadata, $user['$id']); + } finally { + $listener->close(); + } + } } diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index d2b125251a..12c99a83ef 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -1046,4 +1046,84 @@ class MessagingTest extends TestCase $this->assertContains('presences.' . $presenceId, $result['channels']); $this->assertContains(Role::any()->toString(), $result['roles']); } + + public function testExtractDeletedPresenceIdReturnsIdForDeleteEvent(): void + { + $event = [ + 'project' => 'proj', + 'data' => [ + 'events' => [ + 'presences.abc.delete', + 'presences.*.delete', + 'presences.abc', + ], + 'payload' => ['$id' => 'abc'], + ], + ]; + + $this->assertSame('abc', Realtime::extractDeletedPresenceId($event)); + } + + public function testExtractDeletedPresenceIdRejectsNonDeleteEvents(): void + { + $this->assertNull(Realtime::extractDeletedPresenceId([ + 'data' => [ + 'events' => ['presences.abc.upsert'], + 'payload' => ['$id' => 'abc'], + ], + ])); + + // Unrelated resource that happens to end with `.delete` must not trigger. + $this->assertNull(Realtime::extractDeletedPresenceId([ + 'data' => [ + 'events' => ['documents.abc.delete'], + 'payload' => ['$id' => 'abc'], + ], + ])); + + // Missing payload ID — the event names look right but we have nothing to remove. + $this->assertNull(Realtime::extractDeletedPresenceId([ + 'data' => [ + 'events' => ['presences.abc.delete'], + 'payload' => [], + ], + ])); + } + + public function testRemovePresenceFromConnectionsScopedToProject(): void + { + $realtime = new Realtime(); + + // Two connections in different projects both holding the same presence ID; only + // the matching project should be touched. + $realtime->connections[1] = [ + 'projectId' => 'proj-a', + 'presences' => ['p1' => new Document(['$id' => 'p1']), 'p2' => new Document(['$id' => 'p2'])], + ]; + $realtime->connections[2] = [ + 'projectId' => 'proj-b', + 'presences' => ['p1' => new Document(['$id' => 'p1'])], + ]; + + $removed = $realtime->removePresenceFromConnections('proj-a', 'p1'); + + $this->assertSame(1, $removed); + $this->assertArrayNotHasKey('p1', $realtime->connections[1]['presences']); + $this->assertArrayHasKey('p2', $realtime->connections[1]['presences']); + $this->assertArrayHasKey('p1', $realtime->connections[2]['presences']); + } + + public function testRemovePresenceFromConnectionsNoMatchIsNoOp(): void + { + $realtime = new Realtime(); + $realtime->connections[1] = [ + 'projectId' => 'proj-a', + 'presences' => ['p1' => new Document(['$id' => 'p1'])], + ]; + + $this->assertSame(0, $realtime->removePresenceFromConnections('proj-a', 'missing')); + $this->assertSame(0, $realtime->removePresenceFromConnections('', 'p1')); + $this->assertSame(0, $realtime->removePresenceFromConnections('proj-a', '')); + $this->assertArrayHasKey('p1', $realtime->connections[1]['presences']); + } } From 4e2bd9c3077c77f953d259952f4d07ff5bbe8168 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 12:30:54 +0530 Subject: [PATCH 122/192] feat: add presence already exists error handling and update exception messages --- app/config/errors.php | 5 +++++ src/Appwrite/Databases/PresenceState.php | 4 ++-- src/Appwrite/Extend/Exception.php | 1 + src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 67ddc68312..4a6f08d432 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -731,6 +731,11 @@ return [ 'description' => 'Presence with the requested ID could not be found.', 'code' => 404, ], + Exception::PRESENCE_ALREADY_EXISTS => [ + 'name' => Exception::PRESENCE_ALREADY_EXISTS, + 'description' => 'Presence with the requested ID \'%s\' already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', + 'code' => 409, + ], /** Databases */ Exception::DATABASE_NOT_FOUND => [ diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index af7185f94a..0dab0bed63 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -92,9 +92,9 @@ class PresenceState return $presence; } catch (DuplicateException $e) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); + throw new Exception(Exception::PRESENCE_ALREADY_EXISTS, params: [$presenceId], previous: $e); } catch (NotFoundException $e) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$presenceId], previous: $e); + throw new Exception(Exception::PRESENCE_NOT_FOUND, params: [$presenceId], previous: $e); } catch (StructureException $e) { throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); } catch (ConflictException $e) { diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 0cac0f4262..6506127c59 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -204,6 +204,7 @@ class Exception extends \Exception /** Presence */ public const string PRESENCE_NOT_FOUND = 'presence_not_found'; + public const string PRESENCE_ALREADY_EXISTS = 'presence_already_exists'; /** Databases */ public const string DATABASE_NOT_FOUND = 'database_not_found'; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 68c6909f62..5e040701bb 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -181,7 +181,7 @@ class Update extends PlatformAction try { $presence = $dbForProject->updateDocument('presenceLogs', $presenceId, $updates); } catch (Duplicate $e) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS, params: [$presenceId], previous: $e); + throw new Exception(Exception::PRESENCE_ALREADY_EXISTS, params: [$presenceId], previous: $e); } catch (StructureException $e) { throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage(), previous: $e); } catch (ConflictException $e) { From a1f321d92e245fae984783f4ddd10f06b9a329ea Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 12:38:47 +0530 Subject: [PATCH 123/192] updated presence model --- src/Appwrite/Realtime/Message/Handlers/Presence.php | 1 + src/Appwrite/Utopia/Response/Model/Presence.php | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index 76ed48f47e..7cdff4828c 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -102,6 +102,7 @@ class Presence extends Action $presence->removeAttribute('$tenant'); $presence->removeAttribute('hostname'); $presence->removeAttribute('perms_md5'); + $presence->removeAttribute('userInternalId'); $realtime->connections[$connectionId]['presences'][$presence->getId()] = $presence; diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php index b6da06c0a3..6efd58aabe 100644 --- a/src/Appwrite/Utopia/Response/Model/Presence.php +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -55,12 +55,6 @@ class Presence extends Any 'example' => ['read("any")'], 'array' => true, ]) - ->addRule('userInternalId', [ - 'type' => self::TYPE_STRING, - 'description' => 'User internal ID.', - 'default' => '', - 'example' => '1', - ]) ->addRule('userId', [ 'type' => self::TYPE_STRING, 'description' => 'User ID.', @@ -97,6 +91,7 @@ class Presence extends Any $document->removeAttribute('$tenant'); $document->removeAttribute('hostname'); $document->removeAttribute('perms_md5'); + $document->removeAttribute('userInternalId'); if (!$document->isEmpty()) { $document->setAttribute('$sequence', (string) $document->getAttribute('$sequence', '')); From f1e0ef29913e92e1e5dd6d82f9c1df2a363fec14 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 14:04:41 +0530 Subject: [PATCH 124/192] feat: refactor queue handling for events and realtime to use coroutine context --- app/realtime.php | 53 +++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index b4c76c6b6f..6d4f002520 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -314,13 +314,34 @@ if (!function_exists('triggerPresenceUsage')) { if (!function_exists('getQueueForEventsForProject')) { function getQueueForEventsForProject(Document $project, User $user): QueueEvent { - global $container; - $queueForEvents = $container->get('queueForEvents'); + $ctx = Coroutine::getContext(); - $queueForEvents->setProject($project); - $queueForEvents->setUser($user); + if (!isset($ctx['queueForEvents'])) { + global $register; + /** @var Group $pools */ + $pools = $register->get('pools'); + $ctx['queueForEvents'] = new QueueEvent(new BrokerPool( + publisher: $pools->get('publisher') + )); + } - return $queueForEvents; + return $ctx['queueForEvents'] + ->reset() + ->setProject($project) + ->setUser($user); + } +} + +if (!function_exists('getQueueForRealtime')) { + function getQueueForRealtime(): QueueRealtime + { + $ctx = Coroutine::getContext(); + + if (!isset($ctx['queueForRealtime'])) { + $ctx['queueForRealtime'] = new QueueRealtime(); + } + + return $ctx['queueForRealtime']->reset(); } } @@ -336,16 +357,13 @@ if (!function_exists('triggerPresenceEvent')) { } try { - global $container; $queueForEvents = getQueueForEventsForProject($project, $user); $queueForEvents ->setEvent($eventName) ->setParam('presenceId', $presence->getId()) ->setPayload($presence->getArrayCopy()); - /** @var QueueRealtime $queueForRealtime */ - $queueForRealtime = $container->get('queueForRealtime'); - $queueForRealtime + getQueueForRealtime() ->setProject($project) ->setUser($user) ->from($queueForEvents) @@ -365,20 +383,6 @@ $container->set('pools', function ($register) { return $register->get('pools'); }, ['register']); -if (!$container->has('queueForEvents')) { - $container->set('queueForEvents', function ($pools) { - return new QueueEvent(new BrokerPool( - publisher: $pools->get('publisher') - )); - }, ['pools']); -} - -if (!$container->has('queueForRealtime')) { - $container->set('queueForRealtime', function () { - return new QueueRealtime(); - }, []); -} - $realtime = getRealtime(); $presenceState = new PresenceState(); @@ -1215,8 +1219,7 @@ $server->onMessage(function (int $connection, string $message) use ($container, // Child of the global container: per-message values like $connection and $project // live on this scope so concurrent message coroutines don't clobber each other, - // while globally-registered services (pools, queueForRealtime, ...) remain reachable - // via the parent. + // while globally-registered services (pools, ...) remain reachable via the parent. $messageContainer = new Container($container); $messageContainer->set('connectionId', fn () => $connection); $messageContainer->set('server', fn () => $server); From 20162a69be3dd6bd0436d08c37f418f88916a48a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 14:26:23 +0530 Subject: [PATCH 125/192] feat: ensure unique ID assignment for new presence documents --- src/Appwrite/Databases/PresenceState.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 0dab0bed63..63c69afd52 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -10,6 +10,7 @@ use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\NotFound as NotFoundException; use Utopia\Database\Exception\Structure as StructureException; +use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; @@ -61,9 +62,10 @@ class PresenceState mixed $userInternalId, ?callable $onPresenceCreated = null ): Document { - if ($presenceId !== 'unique()') { - $presenceDocument->setAttribute('$id', $presenceId); + if ($presenceId === 'unique()') { + $presenceId = ID::unique(); } + $presenceDocument->setAttribute('$id', $presenceId); $presenceCreated = false; From f818f16ebe30c5ea5c2dea30ef40ff54b87329bf Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 18:25:06 +0530 Subject: [PATCH 126/192] feat: simplify presence parameter validation by removing Nullable wrapper --- .../Platform/Modules/Presences/HTTP/Update.php | 13 ++++++------- .../Platform/Modules/Presences/HTTP/Upsert.php | 9 ++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 5e040701bb..545612ca62 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -24,7 +24,6 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Validator\Boolean; use Utopia\Validator\JSON; -use Utopia\Validator\Nullable; use Utopia\Validator\Text; class Update extends PlatformAction @@ -93,15 +92,15 @@ class Update extends PlatformAction ), ]) ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) - ->param('userId', null, new Nullable(new UID()), 'User ID.', true) - ->param('status', null, new Nullable(new Text(Database::LENGTH_KEY)), 'Presence status.', true) - ->param('expiresAt', null, new Nullable(new DatetimeValidator( + ->param('userId', null, new UID(), 'User ID.', true) + ->param('status', null, new Text(Database::LENGTH_KEY), 'Presence status.', true) + ->param('expiresAt', null, new DatetimeValidator( new \DateTime(), (new \DateTime())->modify('+30 days'), requireDateInFuture: true - )), 'Presence expiry datetime.', true) - ->param('metadata', null, new Nullable(new JSON()), 'Presence metadata object.', true) - ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ), 'Presence expiry datetime.', true) + ->param('metadata', null, new JSON(), 'Presence metadata object.', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('purge', false, new Boolean(true), 'When true, purge cached responses used by list presences endpoint.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 298bd77f49..f9408c72a9 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -24,7 +24,6 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\JSON; -use Utopia\Validator\Nullable; use Utopia\Validator\Text; class Upsert extends PlatformAction @@ -93,14 +92,14 @@ class Upsert extends PlatformAction ), ]) ->param('presenceId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Presence unique ID.', false, ['dbForProject']) - ->param('userId', null, new Nullable(new UID()), 'User ID.', true) + ->param('userId', null, new UID(), 'User ID.', true) ->param('status', '', new Text(Database::LENGTH_KEY), 'Presence status.', false) - ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE])), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) - ->param('expiresAt', null, new Nullable(new DatetimeValidator( + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('expiresAt', null, new DatetimeValidator( new \DateTime(), (new \DateTime())->modify('+30 days'), requireDateInFuture: true - )), 'Presence expiry datetime.', true) + ), 'Presence expiry datetime.', true) ->param('metadata', [], new JSON(), 'Presence metadata object.', true) ->inject('response') ->inject('request') From f09aec76515d6bd7d38e6b446fd7790cc58c9036 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 18:52:14 +0530 Subject: [PATCH 127/192] feat: update presence handling and refactor related attributes for consistency --- app/config/collections/projects.php | 12 +- app/realtime.php | 149 ++++++++++-------- src/Appwrite/Databases/PresenceState.php | 18 +-- .../Platform/Modules/Presences/HTTP/XList.php | 8 +- src/Appwrite/Realtime/Message/Dispatcher.php | 2 +- .../Realtime/Message/Handlers/Presence.php | 2 +- .../Utopia/Response/Model/Presence.php | 13 +- .../Realtime/RealtimeConsoleClientTest.php | 2 +- .../Realtime/RealtimeCustomClientTest.php | 2 +- 9 files changed, 109 insertions(+), 99 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 75f7b5508c..0ba93e46fc 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -2828,7 +2828,7 @@ return [ ], [ '$id' => ID::custom('metadata'), - 'type' => Database::VAR_STRING, + 'type' => Database::VAR_TEXT, 'format' => '', 'size' => 65535, 'signed' => true, @@ -2838,7 +2838,7 @@ return [ 'filters' => ['json'], ], [ - '$id' => ID::custom('perms_md5'), + '$id' => ID::custom('permissionsHash'), 'type' => Database::VAR_STRING, 'format' => '', 'size' => 32, @@ -2888,13 +2888,13 @@ return [ '$id' => ID::custom('_key_source_status'), 'type' => Database::INDEX_KEY, 'attributes' => ['source', 'status'], - 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC] + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC] ], [ - '$id' => ID::custom('_key_perms_md5'), + '$id' => ID::custom('_key_permissionsHash'), 'type' => Database::INDEX_KEY, - 'attributes' => ['perms_md5'], + 'attributes' => ['permissionsHash'], 'lengths' => [32], 'orders' => [Database::ORDER_ASC] ] diff --git a/app/realtime.php b/app/realtime.php index 6d4f002520..70ff2f35df 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -64,29 +64,6 @@ if (System::getEnv('_APP_EDITION', 'self-hosted') === 'self-hosted') { /** @var Registry $register */ $register = $GLOBALS['register'] ?? throw new \RuntimeException('Registry not initialized'); -/** @var Group $pools */ -$pools = $register->get('pools'); -$statsUsageConnection = System::getEnv('_APP_CONNECTIONS_QUEUE_STATS_USAGE', ''); -$publisherPoolName = 'publisher'; - -if (!empty($statsUsageConnection)) { - try { - $pools->get('publisher_' . $statsUsageConnection); - $publisherPoolName = 'publisher_' . $statsUsageConnection; - } catch (Throwable) { - // Fallback to default publisher pool when custom one is unavailable. - } -} - -$broker = new BrokerPool(publisher: $pools->get($publisherPoolName)); -$publisherForUsage = new UsagePublisher( - $broker, - new Queue(System::getEnv( - '_APP_STATS_USAGE_QUEUE_NAME', - \Appwrite\Event\Event::STATS_USAGE_QUEUE_NAME - )) -); - $registerConnectionResources ??= require __DIR__ . '/init/realtime/connection.php'; Runtime::enableCoroutine(SWOOLE_HOOK_ALL); @@ -282,35 +259,6 @@ if (!function_exists('getTelemetry')) { } } -if (!function_exists('triggerStats')) { - function triggerStats(array $event, string $projectId): void - { - } -} - -if (!function_exists('triggerPresenceUsage')) { - function triggerPresenceUsage(int $value, Document $project): void - { - if ($project->isEmpty()) { - return; - } - - try { - global $publisherForUsage; - - $usage = new Context(); - $usage->addMetric(METRIC_USERS_PRESENCE, $value); - - $publisherForUsage->enqueue(new UsageMessage( - project: $project, - metrics: $usage->getMetrics(), - )); - } catch (Throwable $th) { - logError($th, 'realtimeStats', tags: ['projectId' => $project->getId()]); - } - } -} - if (!function_exists('getQueueForEventsForProject')) { function getQueueForEventsForProject(Document $project, User $user): QueueEvent { @@ -345,6 +293,37 @@ if (!function_exists('getQueueForRealtime')) { } } +if (!function_exists('triggerStats')) { + function triggerStats(array $event, string $projectId): void + { + } +} + +if (!function_exists('triggerPresenceUsage')) { + function triggerPresenceUsage(int $value, Document $project): void + { + if ($project->isEmpty()) { + return; + } + + try { + global $container; + /** @var UsagePublisher $publisherForUsage */ + $publisherForUsage = $container->get('publisherForUsage'); + + $usage = new Context(); + $usage->addMetric(METRIC_USERS_PRESENCE, $value); + + $publisherForUsage->enqueue(new UsageMessage( + project: $project, + metrics: $usage->getMetrics(), + )); + } catch (Throwable $th) { + logError($th, 'realtimeStats', tags: ['projectId' => $project->getId()]); + } + } +} + if (!function_exists('triggerPresenceEvent')) { function triggerPresenceEvent( Document $project, @@ -379,19 +358,45 @@ if (!function_exists('triggerPresenceEvent')) { global $container; -$container->set('pools', function ($register) { - return $register->get('pools'); -}, ['register']); +if (!$container->has('pools')) { + $container->set('pools', function ($register) { + return $register->get('pools'); + }, ['register']); +} + +if (!$container->has('publisherForUsage')) { + $container->set('publisherForUsage', function (Group $pools): UsagePublisher { + $statsUsageConnection = System::getEnv('_APP_CONNECTIONS_QUEUE_STATS_USAGE', ''); + $publisherPoolName = 'publisher'; + + if (!empty($statsUsageConnection)) { + try { + $pools->get('publisher_' . $statsUsageConnection); + $publisherPoolName = 'publisher_' . $statsUsageConnection; + } catch (Throwable) { + // Fallback to default publisher pool when custom one is unavailable. + } + } + + return new UsagePublisher( + new BrokerPool(publisher: $pools->get($publisherPoolName)), + new Queue(System::getEnv( + '_APP_STATS_USAGE_QUEUE_NAME', + QueueEvent::STATS_USAGE_QUEUE_NAME + )) + ); + }, ['pools']); +} $realtime = getRealtime(); $presenceState = new PresenceState(); $messageDispatcher = (new MessageDispatcher()) - ->register(new PingHandler()) - ->register(new AuthenticationHandler()) - ->register(new SubscribeHandler()) - ->register(new UnsubscribeHandler()) - ->register(new PresenceHandler()); + ->addHandler(new PingHandler()) + ->addHandler(new AuthenticationHandler()) + ->addHandler(new SubscribeHandler()) + ->addHandler(new UnsubscribeHandler()) + ->addHandler(new PresenceHandler()); /** * Table for statistics across all workers. @@ -1331,15 +1336,15 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { !empty($presencesById) && $projectId !== 'console' ) { - go(function () use ($presencesById, $projectId): void { + go(function () use ($presencesById, $projectId, $userId): void { // Fresh span: the parent realtime.close span finishes before this coroutine Span::init('realtime.close.presenceCleanup'); Span::add('realtime.projectId', $projectId); Span::add('realtime.presenceCount', \count($presencesById)); try { - $consoleDB = getConsoleDB(); - $project = $consoleDB->getAuthorization()->skip(fn () => $consoleDB->getDocument('projects', $projectId)); + $dbForPlatform = getConsoleDB(); + $project = $dbForPlatform->getAuthorization()->skip(fn () => $dbForPlatform->getDocument('projects', $projectId)); if ($project->isEmpty()) { return; @@ -1349,6 +1354,22 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { $presences = \array_values($presencesById); $dbForProject = getProjectDB($project); + // Resolve the disconnecting user so event payloads carry proper actor context. + $user = new User([]); + if (!empty($userId)) { + try { + /** @var User $fetched */ + $fetched = $dbForProject->getAuthorization()->skip( + fn () => $dbForProject->getDocument('users', $userId) + ); + if (!$fetched->isEmpty()) { + $user = $fetched; + } + } catch (Throwable) { + // Fall back to empty User if lookup fails. + } + } + try { $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); triggerPresenceUsage(-$deletionCount, $project); @@ -1362,7 +1383,7 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { foreach ($presences as $presence) { try { - triggerPresenceEvent($project, new User([]), 'presences.[presenceId].delete', $presence); + triggerPresenceEvent($project, $user, 'presences.[presenceId].delete', $presence); } catch (Throwable) { // Swallow errors to avoid breaking disconnect cleanup } diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Databases/PresenceState.php index 63c69afd52..97479dad5a 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Databases/PresenceState.php @@ -45,12 +45,12 @@ class PresenceState } if (!$isAPIKey && !$isPrivilegedUser) { - $this->assertPermissionsAgainstAuthorization($permissions, $authorization); + $this->checkPermissions($permissions, $authorization); } sort($permissions, SORT_STRING); $document->setAttribute('$permissions', $permissions); - $document->setAttribute('perms_md5', \md5(\json_encode($permissions))); + $document->setAttribute('permissionsHash', \md5(\json_encode($permissions))); return $document; } @@ -146,12 +146,12 @@ class PresenceState sort($ownerPermissions, SORT_STRING); $document->setAttribute('$permissions', $ownerPermissions); - $document->setAttribute('perms_md5', \md5(\json_encode($ownerPermissions))); + $document->setAttribute('permissionsHash', \md5(\json_encode($ownerPermissions))); return $document; } - private function assertPermissionsAgainstAuthorization(array $permissions, Authorization $authorization): void + private function checkPermissions(array $permissions, Authorization $authorization): void { foreach (Database::PERMISSIONS as $type) { foreach ($permissions as $permission) { @@ -185,7 +185,7 @@ class PresenceState ); } - private function getListCacheField(array $roles, array $queries, string $type): string + private function getListCacheFieldKey(array $roles, array $queries, string $type): string { $serialized = \array_map( static fn ($query) => $query instanceof Query ? $query->toArray() : $query, @@ -200,14 +200,14 @@ class PresenceState ); } - public function loadListCacheField( + public function getListCacheField( Database $dbForProject, array $roles, array $queries, string $type, int $ttl ): mixed { - $cacheField = $this->getListCacheField($roles, $queries, $type); + $cacheField = $this->getListCacheFieldKey($roles, $queries, $type); try { return $dbForProject->getCache()->load($this->getListCacheKey($dbForProject), $ttl, $cacheField); @@ -216,14 +216,14 @@ class PresenceState } } - public function saveListCacheField( + public function setListCacheField( Database $dbForProject, array $roles, array $queries, string $type, mixed $value ): void { - $cacheField = $this->getListCacheField($roles, $queries, $type); + $cacheField = $this->getListCacheFieldKey($roles, $queries, $type); try { $dbForProject->getCache()->save($this->getListCacheKey($dbForProject), $value, $cacheField); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index a98235639b..33f5c6b399 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -106,7 +106,7 @@ class XList extends PlatformAction $roles = $dbForProject->getAuthorization()->getRoles(); $documentsCacheHit = false; - $cachedDocuments = $presenceState->loadListCacheField( + $cachedDocuments = $presenceState->getListCacheField( $dbForProject, $roles, $queries, @@ -126,7 +126,7 @@ class XList extends PlatformAction $documentsArray = \array_map(function ($doc) { return $doc->getArrayCopy(); }, $documents); - $presenceState->saveListCacheField( + $presenceState->setListCacheField( $dbForProject, $roles, $queries, @@ -136,7 +136,7 @@ class XList extends PlatformAction } if ($includeTotal) { - $cachedTotal = $presenceState->loadListCacheField( + $cachedTotal = $presenceState->getListCacheField( $dbForProject, $roles, $filterQueries, @@ -147,7 +147,7 @@ class XList extends PlatformAction $total = (int) $cachedTotal; } else { $total = $dbForProject->count('presenceLogs', [...$filterQueries, $expiryFilter], APP_LIMIT_COUNT); - $presenceState->saveListCacheField( + $presenceState->setListCacheField( $dbForProject, $roles, $filterQueries, diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php index ad766309dd..1b29bff617 100644 --- a/src/Appwrite/Realtime/Message/Dispatcher.php +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -22,7 +22,7 @@ class Dispatcher */ private array $handlers = []; - public function register(Action $handler): self + public function addHandler(Action $handler): self { $labels = $handler->getLabels(); $type = $labels[self::LABEL_MESSAGE_TYPE] diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index 7cdff4828c..c65259c6f5 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -101,7 +101,7 @@ class Presence extends Action $presence->removeAttribute('$collection'); $presence->removeAttribute('$tenant'); $presence->removeAttribute('hostname'); - $presence->removeAttribute('perms_md5'); + $presence->removeAttribute('permissionsHash'); $presence->removeAttribute('userInternalId'); $realtime->connections[$connectionId]['presences'][$presence->getId()] = $presence; diff --git a/src/Appwrite/Utopia/Response/Model/Presence.php b/src/Appwrite/Utopia/Response/Model/Presence.php index 6efd58aabe..ecc3755bae 100644 --- a/src/Appwrite/Utopia/Response/Model/Presence.php +++ b/src/Appwrite/Utopia/Response/Model/Presence.php @@ -29,13 +29,6 @@ class Presence extends Any 'default' => '', 'example' => '5e5ea5c16897e', ]) - ->addRule('$sequence', [ - 'type' => self::TYPE_ID, - 'description' => 'Presence sequence ID.', - 'default' => '', - 'example' => '1', - 'readOnly' => true, - ]) ->addRule('$createdAt', [ 'type' => self::TYPE_DATETIME, 'description' => 'Presence creation date in ISO 8601 format.', @@ -90,13 +83,9 @@ class Presence extends Any $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); $document->removeAttribute('hostname'); - $document->removeAttribute('perms_md5'); + $document->removeAttribute('permissionsHash'); $document->removeAttribute('userInternalId'); - if (!$document->isEmpty()) { - $document->setAttribute('$sequence', (string) $document->getAttribute('$sequence', '')); - } - foreach ($document->getAttributes() as $attribute) { if (\is_array($attribute)) { foreach ($attribute as $subAttribute) { diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index feebe8839e..e8946e54d5 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -257,7 +257,7 @@ class RealtimeConsoleClientTest extends Scope $this->assertEquals('error', $response['type']); $this->assertNotEmpty($response['data']); $this->assertEquals(1003, $response['data']['code']); - $this->assertEquals('Payload is not valid. session is required', $response['data']['message']); + $this->assertEquals('Payload is not valid. Session is required', $response['data']['message']); $client->send(\json_encode([ 'type' => 'unknown', diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 436de5b1d0..7fccd6839f 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -239,7 +239,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('error', $response['type']); $this->assertNotEmpty($response['data']); $this->assertEquals(1003, $response['data']['code']); - $this->assertEquals('Payload is not valid. session is required', $response['data']['message']); + $this->assertEquals('Payload is not valid. Session is required', $response['data']['message']); $client->send(\json_encode([ 'type' => 'unknown', From 602ceb55ef4608914637e3f9ecb354ebf6307521 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 18:57:09 +0530 Subject: [PATCH 128/192] feat: refactor presence state usage across multiple files for consistency --- app/realtime.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 2 +- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- .../{Databases/PresenceState.php => Presences/State.php} | 4 ++-- src/Appwrite/Realtime/Message/Handlers/Presence.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename src/Appwrite/{Databases/PresenceState.php => Presences/State.php} (99%) diff --git a/app/realtime.php b/app/realtime.php index 70ff2f35df..16bd99cadb 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1,6 +1,6 @@ <?php -use Appwrite\Databases\PresenceState; +use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event as QueueEvent; use Appwrite\Event\Message\Usage as UsageMessage; use Appwrite\Event\Publisher\Usage as UsagePublisher; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 8edb364e55..81fc5aafe9 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Databases\PresenceState; +use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 545612ca62..9b76ada542 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Databases\PresenceState; +use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index f9408c72a9..83379118ea 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Databases\PresenceState; +use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 33f5c6b399..dcacdc2809 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Databases\PresenceState; +use Appwrite\Presences\State as PresenceState; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; use Appwrite\SDK\AuthType; diff --git a/src/Appwrite/Databases/PresenceState.php b/src/Appwrite/Presences/State.php similarity index 99% rename from src/Appwrite/Databases/PresenceState.php rename to src/Appwrite/Presences/State.php index 97479dad5a..a475340caf 100644 --- a/src/Appwrite/Databases/PresenceState.php +++ b/src/Appwrite/Presences/State.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Databases; +namespace Appwrite\Presences; use Appwrite\Extend\Exception; use Appwrite\Utopia\Database\Documents\User; @@ -16,7 +16,7 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; -class PresenceState +class State { public const LIST_CACHE_FIELD_PRESENCES = 'presences'; public const LIST_CACHE_FIELD_TOTAL = 'total'; diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index c65259c6f5..95538dbd62 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -2,7 +2,7 @@ namespace Appwrite\Realtime\Message\Handlers; -use Appwrite\Databases\PresenceState; +use Appwrite\Presences\State as PresenceState; use Appwrite\Extend\Exception; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Realtime\Message\Dispatcher; From 42d3240d05307c8d610c4a17a88a20480789b6b2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 19:12:11 +0530 Subject: [PATCH 129/192] feat: refactor presence state usage and telemetry span naming for consistency --- app/realtime.php | 6 +- .../Modules/Presences/HTTP/Delete.php | 2 +- .../Modules/Presences/HTTP/Update.php | 4 +- .../Modules/Presences/HTTP/Upsert.php | 2 +- .../Platform/Modules/Presences/HTTP/XList.php | 2 +- src/Appwrite/Presences/State.php | 111 +++++++----------- .../Message/Handlers/Authentication.php | 2 +- .../Realtime/Message/Handlers/Presence.php | 2 +- .../Realtime/Message/Handlers/Subscribe.php | 6 +- .../Realtime/Message/Handlers/Unsubscribe.php | 6 +- 10 files changed, 58 insertions(+), 85 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index ca57184c1a..10bf4fcd84 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1,6 +1,5 @@ <?php -use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event as QueueEvent; use Appwrite\Event\Message\Usage as UsageMessage; use Appwrite\Event\Publisher\Usage as UsagePublisher; @@ -9,6 +8,7 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; +use Appwrite\Presences\State as PresenceState; use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\Realtime\Message\Dispatcher as MessageDispatcher; use Appwrite\Realtime\Message\Handlers\Authentication as AuthenticationHandler; @@ -1289,10 +1289,6 @@ $server->onMessage(function (int $connection, string $message) use ($container, } finally { Span::add('realtime.success', $success); Span::add('realtime.response_code', $responseCode); - Span::add('realtime.subscription_delta', $subscriptionDelta); - Span::add('realtime.subscriptions_requested', $subscriptionsRequested); - Span::add('realtime.subscriptions_removed', $subscriptionsRemoved); - Span::add('realtime.subscribe.subscriptions_count', $subscriptionsRequested); Span::add('realtime.outbound_bytes', $outboundBytes); Span::add('project.id', $project?->getId() ?? $projectId); Span::add('user.id', $realtime->connections[$connection]['userId'] ?? null); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 81fc5aafe9..6005ad183e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -2,10 +2,10 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; +use Appwrite\Presences\State as PresenceState; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 9b76ada542..5d2159daa2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -2,10 +2,10 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; +use Appwrite\Presences\State as PresenceState; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Parameter; @@ -166,7 +166,7 @@ class Update extends PlatformAction if ($permissions !== null) { $presenceState->setPermissions($updates, $permissions, $user, $authorization); } elseif ($userId !== null && $userId !== $presence->getAttribute('userId')) { - $presenceState->setOwnerPermissions($updates, $userId); + $presenceState->setPermissions($updates, null, $user, $authorization, ownerOverride: $userId); } if (empty($updateData) && $permissions === null) { diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 83379118ea..8a8d8ba2f2 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -2,10 +2,10 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Presences\State as PresenceState; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; +use Appwrite\Presences\State as PresenceState; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Parameter; diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index dcacdc2809..2f5034504f 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -2,9 +2,9 @@ namespace Appwrite\Platform\Modules\Presences\HTTP; -use Appwrite\Presences\State as PresenceState; use Appwrite\Extend\Exception; use Appwrite\Platform\Action as PlatformAction; +use Appwrite\Presences\State as PresenceState; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; diff --git a/src/Appwrite/Presences/State.php b/src/Appwrite/Presences/State.php index a475340caf..becded6074 100644 --- a/src/Appwrite/Presences/State.php +++ b/src/Appwrite/Presences/State.php @@ -21,11 +21,14 @@ class State public const LIST_CACHE_FIELD_PRESENCES = 'presences'; public const LIST_CACHE_FIELD_TOTAL = 'total'; public const COLLECTION_ID = 'presenceLogs'; - public function setPermissions(Document $document, ?array $permissions, User $user, Authorization $authorization): Document - { - $isAPIKey = $user->isApp($authorization->getRoles()); - $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); + public function setPermissions( + Document $document, + ?array $permissions, + User $user, + Authorization $authorization, + ?string $ownerOverride = null, + ): Document { $allowedPermissions = [ Database::PERMISSION_READ, Database::PERMISSION_UPDATE, @@ -33,19 +36,29 @@ class State Database::PERMISSION_WRITE, ]; - $permissions = Permission::aggregate($permissions, $allowedPermissions); - - if (\is_null($permissions)) { + if ($ownerOverride !== null) { $permissions = []; - if (!empty($user->getId()) && !$isPrivilegedUser) { - foreach ($allowedPermissions as $permission) { - $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $ownerOverride))->toString(); + } + } else { + $isAPIKey = $user->isApp($authorization->getRoles()); + $isPrivilegedUser = $user->isPrivileged($authorization->getRoles()); + + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId()) && !$isPrivilegedUser) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } } } - } - if (!$isAPIKey && !$isPrivilegedUser) { - $this->checkPermissions($permissions, $authorization); + if (!$isAPIKey && !$isPrivilegedUser) { + $this->checkPermissions($permissions, $authorization); + } } sort($permissions, SORT_STRING); @@ -71,7 +84,6 @@ class State try { if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { - // in v2 use permsmd5 in the queries as well to find the doc $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); if ($existingPresence->isEmpty()) { $presenceCreated = true; @@ -80,12 +92,24 @@ class State } $presence = $dbForProject->upsertDocument(self::COLLECTION_ID, $presenceDocument); } else { - $presence = $this->transactionalUpsertForUser( - $dbForProject, - $presenceDocument, - $userInternalId, - $presenceCreated - ); + $presence = $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $userInternalId, &$presenceCreated) { + $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); + + if ($existingPresence->isEmpty()) { + $presenceCreated = true; + return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); + } + + $currentPresence = $dbForProject->getDocument(self::COLLECTION_ID, $existingPresence->getId(), forUpdate: true); + + if ($currentPresence->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); + } + + $presenceDocument->setAttribute('$id', $currentPresence->getId()); + + return $dbForProject->updateDocument(self::COLLECTION_ID, $currentPresence->getId(), $presenceDocument); + }); } if ($presenceCreated && $onPresenceCreated !== null) { @@ -104,53 +128,6 @@ class State } } - private function transactionalUpsertForUser( - Database $dbForProject, - Document $presenceDocument, - mixed $userInternalId, - ?bool &$presenceCreated = null - ): Document { - return $dbForProject->withTransaction(function () use ($dbForProject, $presenceDocument, $userInternalId, &$presenceCreated) { - $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); - - if ($existingPresence->isEmpty()) { - $presenceCreated = true; - return $dbForProject->createDocument(self::COLLECTION_ID, $presenceDocument); - } - - $currentPresence = $dbForProject->getDocument(self::COLLECTION_ID, $existingPresence->getId(), forUpdate: true); - - if ($currentPresence->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND, params: [$existingPresence->getId()]); - } - - $presenceDocument->setAttribute('$id', $currentPresence->getId()); - - return $dbForProject->updateDocument(self::COLLECTION_ID, $currentPresence->getId(), $presenceDocument); - }); - } - - public function setOwnerPermissions(Document $document, string $userId): Document - { - $allowedPermissions = [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - Database::PERMISSION_WRITE, - ]; - - $ownerPermissions = []; - foreach ($allowedPermissions as $permission) { - $ownerPermissions[] = (new Permission($permission, 'user', $userId))->toString(); - } - - sort($ownerPermissions, SORT_STRING); - $document->setAttribute('$permissions', $ownerPermissions); - $document->setAttribute('permissionsHash', \md5(\json_encode($ownerPermissions))); - - return $document; - } - private function checkPermissions(array $permissions, Authorization $authorization): void { foreach (Database::PERMISSIONS as $type) { diff --git a/src/Appwrite/Realtime/Message/Handlers/Authentication.php b/src/Appwrite/Realtime/Message/Handlers/Authentication.php index f738d84a23..88e1b7f629 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Authentication.php +++ b/src/Appwrite/Realtime/Message/Handlers/Authentication.php @@ -106,7 +106,7 @@ class Authentication extends Action ->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); } - Span::add('realtime.subscriptionDelta', $subscriptionDelta); + Span::add('realtime.subscription_delta', $subscriptionDelta); return [ 'type' => 'response', diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index 95538dbd62..ac3e409ad7 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -2,9 +2,9 @@ namespace Appwrite\Realtime\Message\Handlers; -use Appwrite\Presences\State as PresenceState; use Appwrite\Extend\Exception; use Appwrite\Messaging\Adapter\Realtime; +use Appwrite\Presences\State as PresenceState; use Appwrite\Realtime\Message\Dispatcher; use Appwrite\Utopia\Database\Documents\User; use Closure; diff --git a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php index 76a4e5d3b8..140cd800c3 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -89,9 +89,9 @@ class Subscribe extends Action ->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); } - Span::add('realtime.subscriptionDelta', $subscriptionDelta); - Span::add('realtime.subscriptionsRequested', $subscriptionsRequested); - Span::add('realtime.subscribe.subscriptionsCount', $subscriptionsRequested); + Span::add('realtime.subscription_delta', $subscriptionDelta); + Span::add('realtime.subscriptions_requested', $subscriptionsRequested); + Span::add('realtime.subscribe.subscriptions_count', $subscriptionsRequested); return [ 'type' => 'response', diff --git a/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php b/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php index 1e23a40a7f..e1bc163f68 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Unsubscribe.php @@ -58,9 +58,9 @@ class Unsubscribe extends Action ->add($subscriptionDelta, $register->get('telemetry.workerAttributes')); } - Span::add('realtime.subscriptionDelta', $subscriptionDelta); - Span::add('realtime.subscriptionsRequested', $subscriptionsRequested); - Span::add('realtime.subscriptionsRemoved', $subscriptionsRemoved); + Span::add('realtime.subscription_delta', $subscriptionDelta); + Span::add('realtime.subscriptions_requested', $subscriptionsRequested); + Span::add('realtime.subscriptions_removed', $subscriptionsRemoved); return [ 'type' => 'response', From 18a26809af4567a6fcfcdf70debb3b7b801eb9ae Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 19:13:59 +0530 Subject: [PATCH 130/192] feat: improve user resolution during disconnect event for accurate actor context --- app/realtime.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 10bf4fcd84..e3c1b2faf2 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1347,16 +1347,14 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { $presences = \array_values($presencesById); $dbForProject = getProjectDB($project); - // Resolve the disconnecting user so event payloads carry proper actor context. $user = new User([]); if (!empty($userId)) { try { - /** @var User $fetched */ $fetched = $dbForProject->getAuthorization()->skip( fn () => $dbForProject->getDocument('users', $userId) ); if (!$fetched->isEmpty()) { - $user = $fetched; + $user = new User($fetched->getArrayCopy()); } } catch (Throwable) { // Fall back to empty User if lookup fails. From 995f84425461f3c1246d9f0bc55b6d58b0d503ea Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 19:19:00 +0530 Subject: [PATCH 131/192] feat: refine permissions parameter handling in Presence action for clarity and consistency --- app/config/collections/projects.php | 12 +++--------- src/Appwrite/Realtime/Message/Handlers/Presence.php | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 0ba93e46fc..f18d289531 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -280,9 +280,7 @@ return [ [ '$id' => ID::custom('_key_db_collection'), 'type' => Database::INDEX_KEY, - 'attributes' => ['databaseInternalId', 'collectionInternalId'], - 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + 'attributes' => ['databaseInternalId', 'collectionInternalId'] ], ], ], @@ -2887,16 +2885,12 @@ return [ [ '$id' => ID::custom('_key_source_status'), 'type' => Database::INDEX_KEY, - 'attributes' => ['source', 'status'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC] + 'attributes' => ['source', 'status'] ], [ '$id' => ID::custom('_key_permissionsHash'), 'type' => Database::INDEX_KEY, - 'attributes' => ['permissionsHash'], - 'lengths' => [32], - 'orders' => [Database::ORDER_ASC] + 'attributes' => ['permissionsHash'] ] ] ] diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index ac3e409ad7..a3bdbf3305 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -11,8 +11,8 @@ use Closure; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; +use Utopia\Database\Validator\Permissions; use Utopia\Platform\Action; -use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; use Utopia\Validator\Text; @@ -26,7 +26,7 @@ class Presence extends Action ->param('status', '', new Text(2048), 'Presence status') ->param('presenceId', 'unique()', new Text(36), 'Presence document ID', true) ->param('metadata', null, new JSON(), 'Optional metadata payload', true, [], true) - ->param('permissions', null, new ArrayList(new Text(2048)), 'Optional permissions list', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('connectionId') ->inject('realtime') ->inject('database') From 0466c82a42e3faeaa78c0dcd221d5d4753cd8b9a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 13 May 2026 19:22:43 +0530 Subject: [PATCH 132/192] fix: update error message for invalid permissions in PresenceRealtimeClientTest --- tests/e2e/Services/Presences/PresenceRealtimeClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php index bf2baf9ede..bf283a6e7c 100644 --- a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php @@ -401,7 +401,7 @@ class PresenceRealtimeClientTest extends Scope ], ])); $invalidPermissions = $this->receiveErrorMessage($client); - $this->assertStringContainsString('permissions: Value must a valid array', $invalidPermissions['data']['message'] ?? ''); + $this->assertStringContainsString('permissions: Permissions must be an array of strings', $invalidPermissions['data']['message'] ?? ''); $this->assertQuietFor( $client, fn (array $frame): bool => ($frame['type'] ?? null) === 'event' From 0aa8d402aeababd29c48a1733f4aadd05d2c47ea Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 11:36:55 +0530 Subject: [PATCH 133/192] feat: streamline presence cleanup logic and enhance stale presence deletion --- app/realtime.php | 32 ----------------- .../Platform/Modules/Presences/HTTP/XList.php | 5 +-- src/Appwrite/Platform/Workers/Deletes.php | 35 ++++++++++++------- .../Realtime/Message/Handlers/Presence.php | 4 +-- 4 files changed, 25 insertions(+), 51 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index e3c1b2faf2..98e90e594d 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -567,38 +567,6 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, )); $register->get('telemetry.workerCounter')->add(1); - // Orphan sweep on pod restart -> no connections in in-memory realtime connections object. - // So db must be in sync and only one coroutine shall trigger this - if ($workerId === 0) { - go(function (): void { - $hostname = \gethostname(); - if ($hostname === false || $hostname === '') { - return; - } - - try { - $consoleDB = getConsoleDB(); - $consoleDB->getAuthorization()->skip(fn () => $consoleDB->foreach('projects', function (Document $project) use ($hostname): void { - try { - $dbForProject = getProjectDB($project); - $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [ - Query::equal('hostname', [$hostname]), - Query::equal('source', ['realtime']), - ]); - triggerPresenceUsage(-$deletionCount, $project); - } catch (Throwable $th) { - Console::error("Realtime startup orphan sweep failed for project {$project->getId()}: {$th->getMessage()}"); - logError($th, 'realtimeOrphanPresenceCleanup', tags: [ - 'projectId' => $project->getId(), - ]); - } - })); - } catch (Throwable $th) { - Console::error('Realtime startup orphan sweep error: ' . $th->getMessage()); - } - }); - } - $attempts = 0; $start = time(); diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 2f5034504f..bf7e40ad84 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -95,10 +95,7 @@ class XList extends PlatformAction // should be excluded from the user provided query as user query would be used for caching only // otherwise cache will always miss due to the datetime now - $expiryFilter = Query::or([ - Query::isNull('expiresAt'), - Query::greaterThan('expiresAt', DateTime::now()), - ]); + $expiryFilter = Query::greaterThan('expiresAt', DateTime::now()); try { if ((int)$ttl > 0) { diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 72dcd6b287..807f5f3623 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -220,6 +220,7 @@ class Deletes extends Action $this->deleteExpiredSessions($project, $getProjectDB); $this->deleteExpiredTransactions($project, $getProjectDB); $this->deleteExpiredPresences($project, $getProjectDB, $publisherForUsage); + $this->deleteStalePresences($project, $getProjectDB, $publisherForUsage); $this->deleteOldDeployments($queueForDeletes, $project, $getProjectDB); break; case DELETE_TYPE_REPORT: @@ -1750,23 +1751,31 @@ class Deletes extends Action { $dbForProject = $getProjectDB($project); - // Drop a presence if either: - // - its expiresAt has passed (HTTP-upserted rows always set this), or - // - it was created more than 30 days ago. The upsert validator caps expiresAt at - // +30 days, so nothing legitimate should outlive that. This branch catches rows - // the expiresAt branch can't — chiefly realtime presences (expiresAt is null, - // lifetime tied to the websocket) whose disconnect-time cleanup never ran. $now = DateTime::format(new \DateTime()); + + $deleted = $dbForProject->deleteDocuments('presenceLogs', [ + Query::lessThan('expiresAt', $now), + ], onError: function (Throwable $th) { + // Swallow errors to avoid breaking the cleanup process + }); + + if ($deleted > 0) { + $usage = (new UsageContext())->addMetric(METRIC_USERS_PRESENCE, -$deleted); + $publisherForUsage->enqueue(new Usage( + project: $project, + metrics: $usage->getMetrics(), + )); + } + } + + private function deleteStalePresences(Document $project, callable $getProjectDB, UsagePublisher $publisherForUsage): void + { + $dbForProject = $getProjectDB($project); + $oldestAllowed = DateTime::format((new \DateTime())->sub(\DateInterval::createFromDateString('30 days'))); $deleted = $dbForProject->deleteDocuments('presenceLogs', [ - Query::or([ - Query::and([ - Query::isNotNull('expiresAt'), - Query::lessThan('expiresAt', $now), - ]), - Query::lessThan('$createdAt', $oldestAllowed), - ]), + Query::lessThan('$createdAt', $oldestAllowed), ], onError: function (Throwable $th) { // Swallow errors to avoid breaking the cleanup process }); diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index a3bdbf3305..d3bf65b0e3 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -9,6 +9,7 @@ use Appwrite\Realtime\Message\Dispatcher; use Appwrite\Utopia\Database\Documents\User; use Closure; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; @@ -77,8 +78,7 @@ class Presence extends Action 'userId' => $user->getId(), 'source' => 'realtime', 'status' => $status, - // Pod identity, used by the realtime worker's startup sweep to clean up rows - // orphaned by a previous incarnation of this hostname (i.e. pod crash before onClose ran). + 'expiresAt' => DateTime::format((new \DateTime())->modify('+30 days')), 'hostname' => \gethostname() ?: null, ]; if ($metadata !== null) { From a3542ed7fa40eef01aff24b6b4175abd952f7b2e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 11:48:41 +0530 Subject: [PATCH 134/192] feat: enhance presence handling by refactoring usage and event triggering logic --- app/realtime.php | 99 +++++-------------- src/Appwrite/Presences/State.php | 89 ++++++++++++++--- .../Realtime/Message/Handlers/Presence.php | 29 ++++-- 3 files changed, 117 insertions(+), 100 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 98e90e594d..6361cd7a0b 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1,7 +1,6 @@ <?php use Appwrite\Event\Event as QueueEvent; -use Appwrite\Event\Message\Usage as UsageMessage; use Appwrite\Event\Publisher\Usage as UsagePublisher; use Appwrite\Event\Realtime as QueueRealtime; use Appwrite\Extend\Exception; @@ -16,7 +15,6 @@ use Appwrite\Realtime\Message\Handlers\Ping as PingHandler; use Appwrite\Realtime\Message\Handlers\Presence as PresenceHandler; use Appwrite\Realtime\Message\Handlers\Subscribe as SubscribeHandler; use Appwrite\Realtime\Message\Handlers\Unsubscribe as UnsubscribeHandler; -use Appwrite\Usage\Context; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; @@ -259,8 +257,8 @@ if (!function_exists('getTelemetry')) { } } -if (!function_exists('getQueueForEventsForProject')) { - function getQueueForEventsForProject(Document $project, User $user): QueueEvent +if (!function_exists('getQueueForEvents')) { + function getQueueForEvents(): QueueEvent { $ctx = Coroutine::getContext(); @@ -273,10 +271,7 @@ if (!function_exists('getQueueForEventsForProject')) { )); } - return $ctx['queueForEvents'] - ->reset() - ->setProject($project) - ->setUser($user); + return $ctx['queueForEvents']; } } @@ -289,7 +284,7 @@ if (!function_exists('getQueueForRealtime')) { $ctx['queueForRealtime'] = new QueueRealtime(); } - return $ctx['queueForRealtime']->reset(); + return $ctx['queueForRealtime']; } } @@ -299,63 +294,6 @@ if (!function_exists('triggerStats')) { } } -if (!function_exists('triggerPresenceUsage')) { - function triggerPresenceUsage(int $value, Document $project): void - { - if ($project->isEmpty()) { - return; - } - - try { - global $container; - /** @var UsagePublisher $publisherForUsage */ - $publisherForUsage = $container->get('publisherForUsage'); - - $usage = new Context(); - $usage->addMetric(METRIC_USERS_PRESENCE, $value); - - $publisherForUsage->enqueue(new UsageMessage( - project: $project, - metrics: $usage->getMetrics(), - )); - } catch (Throwable $th) { - logError($th, 'realtimeStats', tags: ['projectId' => $project->getId()]); - } - } -} - -if (!function_exists('triggerPresenceEvent')) { - function triggerPresenceEvent( - Document $project, - User $user, - string $eventName, - Document $presence - ): void { - if ($project->isEmpty() || $presence->isEmpty()) { - return; - } - - try { - $queueForEvents = getQueueForEventsForProject($project, $user); - $queueForEvents - ->setEvent($eventName) - ->setParam('presenceId', $presence->getId()) - ->setPayload($presence->getArrayCopy()); - - getQueueForRealtime() - ->setProject($project) - ->setUser($user) - ->from($queueForEvents) - ->trigger(); - } catch (Throwable $th) { - logError($th, 'realtimePresenceEvent', tags: [ - 'projectId' => $project->getId(), - 'event' => $eventName, - ]); - } - } -} - global $container; if (!$container->has('pools')) { @@ -1197,11 +1135,9 @@ $server->onMessage(function (int $connection, string $message) use ($container, $messageContainer->set('authorization', fn () => $authorization); $messageContainer->set('project', fn () => $project); $messageContainer->set('projectId', fn () => $projectId); - // Wrap the global helpers as first-class callables so handlers receive them via - // injection rather than reaching into the global namespace. Keeps PresenceHandler - // unit-testable without bootstrapping app/realtime.php. - $messageContainer->set('triggerPresenceUsage', fn () => triggerPresenceUsage(...)); - $messageContainer->set('triggerPresenceEvent', fn () => triggerPresenceEvent(...)); + $messageContainer->set('publisherForUsage', fn () => $container->get('publisherForUsage')); + $messageContainer->set('queueForEvents', fn () => getQueueForEvents()); + $messageContainer->set('queueForRealtime', fn () => getQueueForRealtime()); $responsePayload = $messageDispatcher->dispatch($messageContainer, $message); @@ -1265,7 +1201,7 @@ $server->onMessage(function (int $connection, string $message) use ($container, } }); -$server->onClose(function (int $connection) use ($realtime, $stats, $register) { +$server->onClose(function (int $connection) use ($realtime, $stats, $register, $container, $presenceState) { $projectId = null; $userId = null; $subscriptionsBeforeClose = 0; @@ -1297,7 +1233,7 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { !empty($presencesById) && $projectId !== 'console' ) { - go(function () use ($presencesById, $projectId, $userId): void { + go(function () use ($presencesById, $projectId, $userId, $container, $presenceState): void { // Fresh span: the parent realtime.close span finishes before this coroutine Span::init('realtime.close.presenceCleanup'); Span::add('realtime.projectId', $projectId); @@ -1329,9 +1265,12 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { } } + /** @var UsagePublisher $publisherForUsage */ + $publisherForUsage = $container->get('publisherForUsage'); + try { $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); - triggerPresenceUsage(-$deletionCount, $project); + $presenceState->triggerUsage($publisherForUsage, $project, -$deletionCount); } catch (Throwable $th) { Span::error($th); logError($th, 'realtimeOnClosePresenceDeletion', tags: [ @@ -1340,9 +1279,19 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register) { ]); } + $queueForEvents = getQueueForEvents(); + $queueForRealtime = getQueueForRealtime(); + foreach ($presences as $presence) { try { - triggerPresenceEvent($project, $user, 'presences.[presenceId].delete', $presence); + $presenceState->triggerEvent( + $queueForEvents, + $queueForRealtime, + $project, + $user, + 'presences.[presenceId].delete', + $presence, + ); } catch (Throwable) { // Swallow errors to avoid breaking disconnect cleanup } diff --git a/src/Appwrite/Presences/State.php b/src/Appwrite/Presences/State.php index becded6074..19e7dc98b7 100644 --- a/src/Appwrite/Presences/State.php +++ b/src/Appwrite/Presences/State.php @@ -2,8 +2,14 @@ namespace Appwrite\Presences; +use Appwrite\Event\Event as QueueEvent; +use Appwrite\Event\Message\Usage as UsageMessage; +use Appwrite\Event\Publisher\Usage as UsagePublisher; +use Appwrite\Event\Realtime as QueueRealtime; use Appwrite\Extend\Exception; +use Appwrite\Usage\Context as UsageContext; use Appwrite\Utopia\Database\Documents\User; +use Throwable; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Conflict as ConflictException; @@ -150,18 +156,6 @@ class State } } - private function getListCacheKey(Database $dbForProject): string - { - return \sprintf( - '%s-cache:%s:%s:%s:collection:%s', - $dbForProject->getCacheName(), - $dbForProject->getAdapter()->getHostname(), - $dbForProject->getNamespace(), - $dbForProject->getTenant(), - self::COLLECTION_ID - ); - } - private function getListCacheFieldKey(array $roles, array $queries, string $type): string { $serialized = \array_map( @@ -185,9 +179,10 @@ class State int $ttl ): mixed { $cacheField = $this->getListCacheFieldKey($roles, $queries, $type); + [$collectionKey] = $dbForProject->getCacheKeys(self::COLLECTION_ID); try { - return $dbForProject->getCache()->load($this->getListCacheKey($dbForProject), $ttl, $cacheField); + return $dbForProject->getCache()->load($collectionKey, $ttl, $cacheField); } catch (\Throwable) { return null; } @@ -201,15 +196,79 @@ class State mixed $value ): void { $cacheField = $this->getListCacheFieldKey($roles, $queries, $type); + [$collectionKey] = $dbForProject->getCacheKeys(self::COLLECTION_ID); try { - $dbForProject->getCache()->save($this->getListCacheKey($dbForProject), $value, $cacheField); + $dbForProject->getCache()->save($collectionKey, $value, $cacheField); } catch (\Throwable) { } } public function purgeListCache(Database $dbForProject): bool { - return $dbForProject->getCache()->purge($this->getListCacheKey($dbForProject)); + [$collectionKey] = $dbForProject->getCacheKeys(self::COLLECTION_ID); + + return $dbForProject->getCache()->purge($collectionKey); + } + + public function triggerUsage( + UsagePublisher $publisher, + Document $project, + int $value, + ): void { + if ($project->isEmpty()) { + return; + } + + try { + $usage = new UsageContext(); + $usage->addMetric(METRIC_USERS_PRESENCE, $value); + + $publisher->enqueue(new UsageMessage( + project: $project, + metrics: $usage->getMetrics(), + )); + } catch (Throwable $th) { + if (\function_exists('logError')) { + \logError($th, 'realtimeStats', tags: ['projectId' => $project->getId()]); + } + } + } + + public function triggerEvent( + QueueEvent $queueForEvents, + QueueRealtime $queueForRealtime, + Document $project, + User $user, + string $eventName, + Document $presence, + ): void { + if ($project->isEmpty() || $presence->isEmpty()) { + return; + } + + try { + $queueForEvents + ->reset() + ->setProject($project) + ->setUser($user) + ->setEvent($eventName) + ->setParam('presenceId', $presence->getId()) + ->setPayload($presence->getArrayCopy()); + + $queueForRealtime + ->reset() + ->setProject($project) + ->setUser($user) + ->from($queueForEvents) + ->trigger(); + } catch (Throwable $th) { + if (\function_exists('logError')) { + \logError($th, 'realtimePresenceEvent', tags: [ + 'projectId' => $project->getId(), + 'event' => $eventName, + ]); + } + } } } diff --git a/src/Appwrite/Realtime/Message/Handlers/Presence.php b/src/Appwrite/Realtime/Message/Handlers/Presence.php index d3bf65b0e3..1787bc0682 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Presence.php +++ b/src/Appwrite/Realtime/Message/Handlers/Presence.php @@ -2,12 +2,14 @@ namespace Appwrite\Realtime\Message\Handlers; +use Appwrite\Event\Event as QueueEvent; +use Appwrite\Event\Publisher\Usage as UsagePublisher; +use Appwrite\Event\Realtime as QueueRealtime; use Appwrite\Extend\Exception; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Presences\State as PresenceState; use Appwrite\Realtime\Message\Dispatcher; use Appwrite\Utopia\Database\Documents\User; -use Closure; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -34,15 +36,14 @@ class Presence extends Action ->inject('authorization') ->inject('presenceState') ->inject('project') - ->inject('triggerPresenceUsage') - ->inject('triggerPresenceEvent') + ->inject('publisherForUsage') + ->inject('queueForEvents') + ->inject('queueForRealtime') ->callback($this->action(...)); } /** * @param array<int, string>|null $permissions - * @param Closure(int, Document): void $triggerPresenceUsage - * @param Closure(?Document, User, string, Document): void $triggerPresenceEvent * @return array<string, mixed> */ public function action( @@ -56,8 +57,9 @@ class Presence extends Action Authorization $authorization, PresenceState $presenceState, ?Document $project, - Closure $triggerPresenceUsage, - Closure $triggerPresenceEvent, + UsagePublisher $publisherForUsage, + QueueEvent $queueForEvents, + QueueRealtime $queueForRealtime, ): array { if ($project === null || $project->isEmpty()) { throw new Exception(Exception::REALTIME_POLICY_VIOLATION, 'Presence requires a project context.'); @@ -93,8 +95,8 @@ class Presence extends Action $presenceDocument, $presenceId, (string) $user->getSequence(), - function () use ($project, $triggerPresenceUsage): void { - $triggerPresenceUsage(1, $project); + function () use ($presenceState, $publisherForUsage, $project): void { + $presenceState->triggerUsage($publisherForUsage, $project, 1); }, ); @@ -106,7 +108,14 @@ class Presence extends Action $realtime->connections[$connectionId]['presences'][$presence->getId()] = $presence; - $triggerPresenceEvent($project, $user, 'presences.[presenceId].upsert', $presence); + $presenceState->triggerEvent( + $queueForEvents, + $queueForRealtime, + $project, + $user, + 'presences.[presenceId].upsert', + $presence, + ); return [ 'type' => 'response', From ad0b2ebb060db80597e6721ab8419a5d88bba57b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 11:53:40 +0530 Subject: [PATCH 135/192] changed to sentence case for the dispatcher messages --- src/Appwrite/Realtime/Message/Dispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Realtime/Message/Dispatcher.php b/src/Appwrite/Realtime/Message/Dispatcher.php index 1b29bff617..827588f624 100644 --- a/src/Appwrite/Realtime/Message/Dispatcher.php +++ b/src/Appwrite/Realtime/Message/Dispatcher.php @@ -107,7 +107,7 @@ class Dispatcher if (!$present && !$param['optional']) { throw new Exception( Exception::REALTIME_MESSAGE_FORMAT_INVALID, - \sprintf(self::REQUIRED_PARAM_ERROR_FORMAT, $key), + \sprintf(self::REQUIRED_PARAM_ERROR_FORMAT, \ucfirst($key)), ); } From 28d0348ef5bd0422d82fc8a5654bfc60467671c4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 11:55:25 +0530 Subject: [PATCH 136/192] fixed case --- tests/e2e/Services/Presences/PresenceRealtimeClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php index bf283a6e7c..d824412a51 100644 --- a/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php +++ b/tests/e2e/Services/Presences/PresenceRealtimeClientTest.php @@ -385,7 +385,7 @@ class PresenceRealtimeClientTest extends Scope ], ])); $missingStatus = $this->receiveErrorMessage($client); - $this->assertStringContainsString('Payload is not valid. status is required', $missingStatus['data']['message'] ?? ''); + $this->assertStringContainsString('Payload is not valid. Status is required', $missingStatus['data']['message'] ?? ''); $this->assertQuietFor( $client, fn (array $frame): bool => ($frame['type'] ?? null) === 'event' From 512395679022bab0a81dd45dee6f745a4f1910e1 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 11:57:23 +0530 Subject: [PATCH 137/192] reverted schema --- app/config/collections/projects.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index f18d289531..933de12290 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -280,7 +280,9 @@ return [ [ '$id' => ID::custom('_key_db_collection'), 'type' => Database::INDEX_KEY, - 'attributes' => ['databaseInternalId', 'collectionInternalId'] + 'attributes' => ['databaseInternalId', 'collectionInternalId'], + 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], ], ], ], From 2b7ed2aa242e2f8b26280d2456234ddecad99180 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 12:15:15 +0530 Subject: [PATCH 138/192] removed stale --- src/Appwrite/Platform/Workers/Deletes.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 807f5f3623..93b0686f57 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -220,7 +220,6 @@ class Deletes extends Action $this->deleteExpiredSessions($project, $getProjectDB); $this->deleteExpiredTransactions($project, $getProjectDB); $this->deleteExpiredPresences($project, $getProjectDB, $publisherForUsage); - $this->deleteStalePresences($project, $getProjectDB, $publisherForUsage); $this->deleteOldDeployments($queueForDeletes, $project, $getProjectDB); break; case DELETE_TYPE_REPORT: @@ -1767,25 +1766,4 @@ class Deletes extends Action )); } } - - private function deleteStalePresences(Document $project, callable $getProjectDB, UsagePublisher $publisherForUsage): void - { - $dbForProject = $getProjectDB($project); - - $oldestAllowed = DateTime::format((new \DateTime())->sub(\DateInterval::createFromDateString('30 days'))); - - $deleted = $dbForProject->deleteDocuments('presenceLogs', [ - Query::lessThan('$createdAt', $oldestAllowed), - ], onError: function (Throwable $th) { - // Swallow errors to avoid breaking the cleanup process - }); - - if ($deleted > 0) { - $usage = (new UsageContext())->addMetric(METRIC_USERS_PRESENCE, -$deleted); - $publisherForUsage->enqueue(new Usage( - project: $project, - metrics: $usage->getMetrics(), - )); - } - } } From 5e4de3931afda27d67bfac6c8c9240e3a89e4733 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 12:17:45 +0530 Subject: [PATCH 139/192] added presences leaf names --- src/Appwrite/Messaging/Adapter/Realtime.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 29ee048977..dbb2c826bd 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -34,6 +34,7 @@ class Realtime extends MessagingAdapter 'account', 'teams', 'memberships', + 'presences' ]; /** From 43da03ef6333c186604a9bce9ab3bf9eecda2bec Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 12:38:11 +0530 Subject: [PATCH 140/192] removed redundant container set --- app/realtime.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index 6361cd7a0b..09f7adf811 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1135,7 +1135,6 @@ $server->onMessage(function (int $connection, string $message) use ($container, $messageContainer->set('authorization', fn () => $authorization); $messageContainer->set('project', fn () => $project); $messageContainer->set('projectId', fn () => $projectId); - $messageContainer->set('publisherForUsage', fn () => $container->get('publisherForUsage')); $messageContainer->set('queueForEvents', fn () => getQueueForEvents()); $messageContainer->set('queueForRealtime', fn () => getQueueForRealtime()); From faf13c502bb9ec3bed91921a17717579e01b3a68 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 12:46:58 +0530 Subject: [PATCH 141/192] reordered set in the realtime --- app/realtime.php | 64 ++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 09f7adf811..0e952e0de0 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -76,6 +76,38 @@ set_exception_handler(function (\Throwable $e) { )); }); +global $container; + +if (!$container->has('pools')) { + $container->set('pools', function ($register) { + return $register->get('pools'); + }, ['register']); +} + +if (!$container->has('publisherForUsage')) { + $container->set('publisherForUsage', function (Group $pools): UsagePublisher { + $statsUsageConnection = System::getEnv('_APP_CONNECTIONS_QUEUE_STATS_USAGE', ''); + $publisherPoolName = 'publisher'; + + if (!empty($statsUsageConnection)) { + try { + $pools->get('publisher_' . $statsUsageConnection); + $publisherPoolName = 'publisher_' . $statsUsageConnection; + } catch (Throwable) { + // Fallback to default publisher pool when custom one is unavailable. + } + } + + return new UsagePublisher( + new BrokerPool(publisher: $pools->get($publisherPoolName)), + new Queue(System::getEnv( + '_APP_STATS_USAGE_QUEUE_NAME', + QueueEvent::STATS_USAGE_QUEUE_NAME + )) + ); + }, ['pools']); +} + // Allows overriding if (!function_exists('getConsoleDB')) { function getConsoleDB(): Database @@ -294,38 +326,6 @@ if (!function_exists('triggerStats')) { } } -global $container; - -if (!$container->has('pools')) { - $container->set('pools', function ($register) { - return $register->get('pools'); - }, ['register']); -} - -if (!$container->has('publisherForUsage')) { - $container->set('publisherForUsage', function (Group $pools): UsagePublisher { - $statsUsageConnection = System::getEnv('_APP_CONNECTIONS_QUEUE_STATS_USAGE', ''); - $publisherPoolName = 'publisher'; - - if (!empty($statsUsageConnection)) { - try { - $pools->get('publisher_' . $statsUsageConnection); - $publisherPoolName = 'publisher_' . $statsUsageConnection; - } catch (Throwable) { - // Fallback to default publisher pool when custom one is unavailable. - } - } - - return new UsagePublisher( - new BrokerPool(publisher: $pools->get($publisherPoolName)), - new Queue(System::getEnv( - '_APP_STATS_USAGE_QUEUE_NAME', - QueueEvent::STATS_USAGE_QUEUE_NAME - )) - ); - }, ['pools']); -} - $realtime = getRealtime(); $presenceState = new PresenceState(); From 7dd85f9143813404ebe8df589130a8749612722e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 13:28:47 +0530 Subject: [PATCH 142/192] add ownership guard to prevent cross-user presence overwrite --- .../Modules/Presences/HTTP/Upsert.php | 11 ++- src/Appwrite/Presences/State.php | 15 +++ tests/e2e/Services/Presences/PresenceBase.php | 91 ++++++++++++++++++- 3 files changed, 115 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 8a8d8ba2f2..2f93f4eb04 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -166,7 +166,16 @@ class Upsert extends PlatformAction $presenceState = new PresenceState(); $presenceDocument = new Document($presenceData); - $presenceState->setPermissions($presenceDocument, $permissions, $user, $authorization); + $ownerOverride = $permissions === null && ($isAPIKey || $isPrivilegedUser) + ? $resolvedUserId + : null; + $presenceState->setPermissions( + $presenceDocument, + $permissions, + $user, + $authorization, + ownerOverride: $ownerOverride, + ); $presence = $presenceState->upsertForUser( $dbForProject, $presenceDocument, diff --git a/src/Appwrite/Presences/State.php b/src/Appwrite/Presences/State.php index 19e7dc98b7..f12bd65b75 100644 --- a/src/Appwrite/Presences/State.php +++ b/src/Appwrite/Presences/State.php @@ -92,6 +92,21 @@ class State if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); if ($existingPresence->isEmpty()) { + // Guard against cross-user overwrite: upsertDocument matches on primary key, + // so a caller-supplied $presenceId that collides with another user's record + $existingById = $dbForProject->getDocument( + self::COLLECTION_ID, + $presenceDocument->getId(), + ); + if ( + !$existingById->isEmpty() + && $existingById->getAttribute('userInternalId') !== $userInternalId + ) { + throw new Exception( + Exception::PRESENCE_ALREADY_EXISTS, + params: [$presenceDocument->getId()], + ); + } $presenceCreated = true; } else { $presenceDocument->setAttribute('$id', $existingPresence->getId()); diff --git a/tests/e2e/Services/Presences/PresenceBase.php b/tests/e2e/Services/Presences/PresenceBase.php index b640952501..739dce54cb 100644 --- a/tests/e2e/Services/Presences/PresenceBase.php +++ b/tests/e2e/Services/Presences/PresenceBase.php @@ -1016,4 +1016,93 @@ trait PresenceBase $this->assertEquals($userId, $list['body']['presences'][0]['userId']); $this->assertEquals('away', $list['body']['presences'][0]['status']); } -} + + /** + * Regression test for cross-user overwrite on the native-upsert path. + * + * Scenario: + * - User A has a presence row with $id = $sharedPresenceId. + * - User B (different userInternalId, no existing presence) issues an upsert that + * re-uses $sharedPresenceId. + * + * Without the ownership guard in State::upsertForUser, the second call would silently + * UPDATE A's row (because upsertDocument matches on the primary key) leaving B's data + * under A's $id. With the guard, the second call must fail with PRESENCE_ALREADY_EXISTS + * and A's row must be untouched. + */ + public function testCrossUserUpsertDoesNotOverwriteForeignPresence(): void + { + if ($this->getSide() !== 'server') { + $this->expectNotToPerformAssertions(); + return; + } + + $projectId = $this->getProject()['$id']; + $adminHeaders = \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()); + $presenceHeaders = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getPresenceApiKey(), + ]; + + $suffix = \uniqid(); + + $userA = $this->client->call(Client::METHOD_POST, '/users', $adminHeaders, [ + 'userId' => ID::unique(), + 'email' => 'cross-upsert-a-' . $suffix . '@test.io', + 'password' => 'password-a-' . $suffix, + ]); + $this->assertEquals(201, $userA['headers']['status-code']); + $userAId = $userA['body']['$id']; + + $userB = $this->client->call(Client::METHOD_POST, '/users', $adminHeaders, [ + 'userId' => ID::unique(), + 'email' => 'cross-upsert-b-' . $suffix . '@test.io', + 'password' => 'password-b-' . $suffix, + ]); + $this->assertEquals(201, $userB['headers']['status-code']); + $userBId = $userB['body']['$id']; + $this->assertNotSame($userAId, $userBId); + + $sharedPresenceId = ID::unique(); + + $victim = $this->client->call( + Client::METHOD_PUT, + '/presences/' . $sharedPresenceId, + $presenceHeaders, + [ + 'userId' => $userAId, + 'status' => 'online', + 'metadata' => ['owner' => 'A'], + ] + ); + $this->assertEquals(200, $victim['headers']['status-code']); + $this->assertEquals($sharedPresenceId, $victim['body']['$id']); + $this->assertEquals($userAId, $victim['body']['userId']); + + $attack = $this->client->call( + Client::METHOD_PUT, + '/presences/' . $sharedPresenceId, + $presenceHeaders, + [ + 'userId' => $userBId, + 'status' => 'online', + 'metadata' => ['owner' => 'B'], + ] + ); + $this->assertEquals(409, $attack['headers']['status-code']); + $this->assertSame('presence_already_exists', $attack['body']['type'] ?? null); + + $check = $this->client->call( + Client::METHOD_GET, + '/presences/' . $sharedPresenceId, + $presenceHeaders + ); + $this->assertEquals(200, $check['headers']['status-code']); + $this->assertEquals($userAId, $check['body']['userId']); + $this->assertEquals(['owner' => 'A'], $check['body']['metadata']); + } +} \ No newline at end of file From a4acd000c4795d44916fbc7567d5a07eb1802745 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 13:57:35 +0530 Subject: [PATCH 143/192] linting --- tests/e2e/Services/Presences/PresenceBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Presences/PresenceBase.php b/tests/e2e/Services/Presences/PresenceBase.php index 739dce54cb..40a15da474 100644 --- a/tests/e2e/Services/Presences/PresenceBase.php +++ b/tests/e2e/Services/Presences/PresenceBase.php @@ -1104,5 +1104,5 @@ trait PresenceBase $this->assertEquals(200, $check['headers']['status-code']); $this->assertEquals($userAId, $check['body']['userId']); $this->assertEquals(['owner' => 'A'], $check['body']['metadata']); - } -} \ No newline at end of file + } +} From 3703da188e7cef9130563eb256de5e77b75888f7 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 17:17:27 +0530 Subject: [PATCH 144/192] refactor: enhance presence management to prevent cross-user overwrites --- app/realtime.php | 2 +- src/Appwrite/Presences/State.php | 15 ---- tests/e2e/Services/Presences/PresenceBase.php | 75 +++++++++---------- 3 files changed, 38 insertions(+), 54 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 0e952e0de0..8066b99bc8 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1268,7 +1268,7 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register, $ $publisherForUsage = $container->get('publisherForUsage'); try { - $deletionCount = $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)]); + $deletionCount = $dbForProject->getAuthorization()->skip(fn () => $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)])); $presenceState->triggerUsage($publisherForUsage, $project, -$deletionCount); } catch (Throwable $th) { Span::error($th); diff --git a/src/Appwrite/Presences/State.php b/src/Appwrite/Presences/State.php index f12bd65b75..19e7dc98b7 100644 --- a/src/Appwrite/Presences/State.php +++ b/src/Appwrite/Presences/State.php @@ -92,21 +92,6 @@ class State if ($dbForProject->getAdapter()->getSupportForUpsertOnUniqueIndex()) { $existingPresence = $dbForProject->findOne(self::COLLECTION_ID, [Query::equal('userInternalId', [$userInternalId])]); if ($existingPresence->isEmpty()) { - // Guard against cross-user overwrite: upsertDocument matches on primary key, - // so a caller-supplied $presenceId that collides with another user's record - $existingById = $dbForProject->getDocument( - self::COLLECTION_ID, - $presenceDocument->getId(), - ); - if ( - !$existingById->isEmpty() - && $existingById->getAttribute('userInternalId') !== $userInternalId - ) { - throw new Exception( - Exception::PRESENCE_ALREADY_EXISTS, - params: [$presenceDocument->getId()], - ); - } $presenceCreated = true; } else { $presenceDocument->setAttribute('$id', $existingPresence->getId()); diff --git a/tests/e2e/Services/Presences/PresenceBase.php b/tests/e2e/Services/Presences/PresenceBase.php index 40a15da474..1c94ade61b 100644 --- a/tests/e2e/Services/Presences/PresenceBase.php +++ b/tests/e2e/Services/Presences/PresenceBase.php @@ -1032,77 +1032,76 @@ trait PresenceBase */ public function testCrossUserUpsertDoesNotOverwriteForeignPresence(): void { - if ($this->getSide() !== 'server') { + if ($this->getSide() !== 'client') { $this->expectNotToPerformAssertions(); return; } $projectId = $this->getProject()['$id']; - $adminHeaders = \array_merge([ + $originalUser = $this->getUser(); + + $user1 = $this->getUser(true); + $user2 = $this->getUser(true); + + // Preserve the cached session for the rest of the test run. + self::$user[$projectId] = $originalUser; + + $headersUser1 = [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, - ], $this->getHeaders()); - $presenceHeaders = [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - 'x-appwrite-key' => $this->getPresenceApiKey(), + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user1['session'], + ]; + $headersUser2 = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $user2['session'], ]; - - $suffix = \uniqid(); - - $userA = $this->client->call(Client::METHOD_POST, '/users', $adminHeaders, [ - 'userId' => ID::unique(), - 'email' => 'cross-upsert-a-' . $suffix . '@test.io', - 'password' => 'password-a-' . $suffix, - ]); - $this->assertEquals(201, $userA['headers']['status-code']); - $userAId = $userA['body']['$id']; - - $userB = $this->client->call(Client::METHOD_POST, '/users', $adminHeaders, [ - 'userId' => ID::unique(), - 'email' => 'cross-upsert-b-' . $suffix . '@test.io', - 'password' => 'password-b-' . $suffix, - ]); - $this->assertEquals(201, $userB['headers']['status-code']); - $userBId = $userB['body']['$id']; - $this->assertNotSame($userAId, $userBId); $sharedPresenceId = ID::unique(); $victim = $this->client->call( Client::METHOD_PUT, '/presences/' . $sharedPresenceId, - $presenceHeaders, + $headersUser1, [ - 'userId' => $userAId, 'status' => 'online', - 'metadata' => ['owner' => 'A'], + 'metadata' => ['owner' => 'user1'], ] ); $this->assertEquals(200, $victim['headers']['status-code']); $this->assertEquals($sharedPresenceId, $victim['body']['$id']); - $this->assertEquals($userAId, $victim['body']['userId']); + $this->assertEquals($user1['$id'], $victim['body']['userId']); $attack = $this->client->call( Client::METHOD_PUT, '/presences/' . $sharedPresenceId, - $presenceHeaders, + $headersUser2, [ - 'userId' => $userBId, 'status' => 'online', - 'metadata' => ['owner' => 'B'], + 'metadata' => ['owner' => 'user2'], ] ); - $this->assertEquals(409, $attack['headers']['status-code']); - $this->assertSame('presence_already_exists', $attack['body']['type'] ?? null); + $this->assertNotEquals( + 200, + $attack['headers']['status-code'], + 'Cross-user upsert must not succeed silently. Got body: ' . \json_encode($attack['body'] ?? []) + ); + // Verify User1's row is intact. Read via a presence-scoped API key to bypass + // any read-permission ambiguity and inspect the persisted state directly. $check = $this->client->call( Client::METHOD_GET, '/presences/' . $sharedPresenceId, - $presenceHeaders + [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getPresenceApiKey(), + ] ); $this->assertEquals(200, $check['headers']['status-code']); - $this->assertEquals($userAId, $check['body']['userId']); - $this->assertEquals(['owner' => 'A'], $check['body']['metadata']); + $this->assertEquals($user1['$id'], $check['body']['userId']); + $this->assertEquals(['owner' => 'user1'], $check['body']['metadata']); } } From 2cbd8bbb472fd90e0a71f283b1f287b0585adbae Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 14 May 2026 17:33:53 +0530 Subject: [PATCH 145/192] linting --- src/Appwrite/Platform/Workers/Deletes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 907d6c72a0..03ef72a163 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -6,8 +6,8 @@ use Appwrite\Certificates\Adapter as CertificatesAdapter; use Appwrite\Deletes\Identities; use Appwrite\Deletes\Targets; use Appwrite\Event\Message\Delete as DeleteMessage; -use Appwrite\Event\Publisher\Delete as DeletePublisher; use Appwrite\Event\Message\Usage; +use Appwrite\Event\Publisher\Delete as DeletePublisher; use Appwrite\Event\Publisher\Usage as UsagePublisher; use Appwrite\Extend\Exception; use Appwrite\Usage\Context as UsageContext; From a8670ee8fb6b1071082e708a1fe93c3737fb432a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 15 May 2026 13:17:14 +0530 Subject: [PATCH 146/192] fix: update authorization handling in message processing to prevent state leakage --- app/realtime.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 8066b99bc8..2bc8123fd9 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1055,15 +1055,17 @@ $server->onMessage(function (int $connection, string $message) use ($container, try { $response = new Response(new SwooleResponse()); - // Get authorization from connection (stored during onOpen) - $authorization = $realtime->connections[$connection]['authorization'] ?? null; - if ($authorization === null) { - $authorization = new Authorization(); + // Build a fresh Authorization per message. The connection-scoped instance is shared + // across coroutines, and `Authorization::skip()` toggles instance state — concurrent + // messages on the same connection (e.g. `authentication` + `presence` sent back-to-back) + // would interleave skip/restore and leak permission checks into supposedly-skipped lookups. + $authorization = new Authorization(); + $connectionAuthorization = $realtime->connections[$connection]['authorization'] ?? null; + if ($connectionAuthorization !== null) { + foreach ($connectionAuthorization->getRoles() as $role) { + $authorization->addRole($role); + } } - - // Ensure `$authorization` contains the same roles as the realtime connection. - // `setPermission()` validates against `$authorization->getRoles()`, but roles are - // computed/stored separately in the realtime adapter connection tree. $connectionRoles = $realtime->connections[$connection]['roles'] ?? []; foreach ($connectionRoles as $role) { if ($authorization->hasRole($role)) { From 2c2e8bcabdec04ee83259733864678545ac1f21b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 15 May 2026 17:51:08 +0530 Subject: [PATCH 147/192] fix: add expiration check for presence updates to prevent outdated entries --- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index 5d2159daa2..fcd76d0fbc 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -13,6 +13,7 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Response; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Duplicate; @@ -138,6 +139,11 @@ class Update extends PlatformAction throw new Exception(Exception::PRESENCE_NOT_FOUND, params: [$presenceId]); } + $presenceExpiresAt = $presence->getAttribute('expiresAt'); + if (!empty($presenceExpiresAt) && DateTime::formatTz($presenceExpiresAt) < DateTime::formatTz(DateTime::now())) { + throw new Exception(Exception::PRESENCE_NOT_FOUND, params: [$presenceId]); + } + $updateData = []; if ($userId !== null) { From cf80efbc3c5d6155beeb773e039136a52bb4f7a2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 15 May 2026 18:01:32 +0530 Subject: [PATCH 148/192] feat: add support for 'getUsage' method in presences with range parameter --- src/Appwrite/SDK/Specification/Format.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index fc67dedb13..6e752d528e 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -915,6 +915,16 @@ abstract class Format break; } break; + case 'presences': + switch ($method) { + case 'getUsage': + switch ($param) { + case 'range': + return 'UsageRange'; + } + break; + } + break; } return null; } From 1b945bdeeabee58773f1d1b5cf5046c8f26076b9 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Sun, 17 May 2026 17:11:05 +0100 Subject: [PATCH 149/192] chore: bump utopia-php/cache to ^3.0 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --- composer.json | 4 ++-- composer.lock | 58 +++++++++++++++++++++++++-------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/composer.json b/composer.json index 400e3c1822..d4472c6868 100644 --- a/composer.json +++ b/composer.json @@ -56,14 +56,14 @@ "utopia-php/analytics": "0.15.*", "utopia-php/audit": "2.3.*", "utopia-php/auth": "0.5.*", - "utopia-php/cache": "^2.1", + "utopia-php/cache": "^3.0", "utopia-php/cli": "0.23.*", "utopia-php/compression": "0.1.*", "utopia-php/config": "1.*", "utopia-php/console": "0.1.*", "utopia-php/database": "5.*", "utopia-php/detector": "0.2.*", - "utopia-php/domains": "2.*", + "utopia-php/domains": "^2.1", "utopia-php/emails": "0.7.*", "utopia-php/dns": "1.7.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 66d8f62925..1d71d75447 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": "035685d1335039f13e16d0532c874b21", + "content-hash": "b645c7da1728536497fe8186b158f9c6", "packages": [ { "name": "adhocore/jwt", @@ -3615,16 +3615,16 @@ }, { "name": "utopia-php/cache", - "version": "2.1.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "fc3b9ae33c4b83e0e2c91ecf60b4f40fb7ee8f8e" + "reference": "ece1f4d11ec2804cd7e05b9717dc7a2bc66e4176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/fc3b9ae33c4b83e0e2c91ecf60b4f40fb7ee8f8e", - "reference": "fc3b9ae33c4b83e0e2c91ecf60b4f40fb7ee8f8e", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/ece1f4d11ec2804cd7e05b9717dc7a2bc66e4176", + "reference": "ece1f4d11ec2804cd7e05b9717dc7a2bc66e4176", "shasum": "" }, "require": { @@ -3663,9 +3663,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/2.1.0" + "source": "https://github.com/utopia-php/cache/tree/3.0.0" }, - "time": "2026-05-12T15:03:23+00:00" + "time": "2026-05-14T14:13:17+00:00" }, { "name": "utopia-php/circuit-breaker", @@ -3923,16 +3923,16 @@ }, { "name": "utopia-php/database", - "version": "5.8.0", + "version": "5.9.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "3391c97318f0e7f94d2c1ea0f7d09e5ba8aad696" + "reference": "477bae83e27631f78c159f45b0441c0c7dc69050" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/3391c97318f0e7f94d2c1ea0f7d09e5ba8aad696", - "reference": "3391c97318f0e7f94d2c1ea0f7d09e5ba8aad696", + "url": "https://api.github.com/repos/utopia-php/database/zipball/477bae83e27631f78c159f45b0441c0c7dc69050", + "reference": "477bae83e27631f78c159f45b0441c0c7dc69050", "shasum": "" }, "require": { @@ -3941,7 +3941,7 @@ "ext-pdo": "*", "ext-redis": "*", "php": ">=8.4", - "utopia-php/cache": "^2.0", + "utopia-php/cache": "^3.0", "utopia-php/console": "0.1.*", "utopia-php/mongo": "1.*", "utopia-php/pools": "1.*", @@ -3977,9 +3977,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/5.8.0" + "source": "https://github.com/utopia-php/database/tree/5.9.0" }, - "time": "2026-05-12T12:52:44+00:00" + "time": "2026-05-17T15:57:21+00:00" }, { "name": "utopia-php/detector", @@ -4136,21 +4136,21 @@ }, { "name": "utopia-php/domains", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/utopia-php/domains.git", - "reference": "7f76390998359ef67fcea168f614cbd63a4001e8" + "reference": "1b1fea8674e8712e0344d3abb5a7acd558dede50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/7f76390998359ef67fcea168f614cbd63a4001e8", - "reference": "7f76390998359ef67fcea168f614cbd63a4001e8", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/1b1fea8674e8712e0344d3abb5a7acd558dede50", + "reference": "1b1fea8674e8712e0344d3abb5a7acd558dede50", "shasum": "" }, "require": { - "php": ">=8.2", - "utopia-php/cache": "^2.0", + "php": ">=8.3", + "utopia-php/cache": "^3.0", "utopia-php/validators": "0.*" }, "require-dev": { @@ -4192,9 +4192,9 @@ ], "support": { "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/2.0.0" + "source": "https://github.com/utopia-php/domains/tree/2.1.0" }, - "time": "2026-05-12T12:52:53+00:00" + "time": "2026-05-14T14:33:46+00:00" }, { "name": "utopia-php/dsn", @@ -5400,22 +5400,22 @@ }, { "name": "utopia-php/vcs", - "version": "4.1.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/utopia-php/vcs.git", - "reference": "2850dbe975ee69b9466ee6df385fe1679394ce78" + "reference": "49d7751f0ae94634b00057177d9823928f6777c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/vcs/zipball/2850dbe975ee69b9466ee6df385fe1679394ce78", - "reference": "2850dbe975ee69b9466ee6df385fe1679394ce78", + "url": "https://api.github.com/repos/utopia-php/vcs/zipball/49d7751f0ae94634b00057177d9823928f6777c6", + "reference": "49d7751f0ae94634b00057177d9823928f6777c6", "shasum": "" }, "require": { "adhocore/jwt": "^1.1", "php": ">=8.2", - "utopia-php/cache": "^2.0", + "utopia-php/cache": "^3.0", "utopia-php/fetch": "^1.1" }, "require-dev": { @@ -5443,9 +5443,9 @@ ], "support": { "issues": "https://github.com/utopia-php/vcs/issues", - "source": "https://github.com/utopia-php/vcs/tree/4.1.0" + "source": "https://github.com/utopia-php/vcs/tree/4.2.0" }, - "time": "2026-05-14T10:04:10+00:00" + "time": "2026-05-17T15:58:27+00:00" }, { "name": "utopia-php/websocket", From d18de7d1e8a09609d50124788bdfbe9c3c3060ec Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 10:42:11 +0530 Subject: [PATCH 150/192] feat: add checkForProjectUsage function and integrate it into message handling --- app/realtime.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/realtime.php b/app/realtime.php index 2bc8123fd9..26041fea1d 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -326,6 +326,12 @@ if (!function_exists('triggerStats')) { } } +if (!function_exists('checkForProjectUsage')) { + function checkForProjectUsage(Document $project): void + { + } +} + $realtime = getRealtime(); $presenceState = new PresenceState(); @@ -1086,6 +1092,10 @@ $server->onMessage(function (int $connection, string $message) use ($container, $project = null; } + if ($project !== null) { + checkForProjectUsage($project); + } + /* * Abuse Check * From febe332050d5a94072e6b7e69399556fedec277d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Mon, 18 May 2026 10:56:29 +0530 Subject: [PATCH 151/192] Add Unity SDK getting started docs --- docs/sdks/unity/GETTING_STARTED.md | 113 +++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 docs/sdks/unity/GETTING_STARTED.md diff --git a/docs/sdks/unity/GETTING_STARTED.md b/docs/sdks/unity/GETTING_STARTED.md new file mode 100644 index 0000000000..ae932eebc2 --- /dev/null +++ b/docs/sdks/unity/GETTING_STARTED.md @@ -0,0 +1,113 @@ +## Getting Started + +Before you begin, create an Appwrite project and add a Unity platform in your Appwrite Console. + +This SDK requires the following Unity packages and libraries: + +- [**UniTask**](https://github.com/Cysharp/UniTask): For async/await support in Unity. +- [**NativeWebSocket**](https://github.com/endel/NativeWebSocket): For WebSocket realtime subscriptions. +- **System.Text.Json**: For JSON serialization, provided as a DLL in the project. + +After installing the SDK, open **Appwrite → Setup Assistant** in Unity and install the required dependencies. + +### Configure the SDK + +Create an Appwrite configuration using the **QuickStart** window in the **Appwrite Setup Assistant**, or through **Appwrite → Create Configuration**. + +### Using AppwriteManager + +```csharp +[SerializeField] private AppwriteConfig config; +private AppwriteManager _manager; + +private async UniTask ExampleWithManager() +{ + _manager = AppwriteManager.Instance ?? new GameObject("AppwriteManager").AddComponent<AppwriteManager>(); + _manager.SetConfig(config); + + var success = await _manager.Initialize(); + if (!success) + { + Debug.LogError("Failed to initialize AppwriteManager"); + return; + } + + var client = _manager.Client; + var pingResult = await client.Ping(); + Debug.Log($"Ping result: {pingResult}"); + + var account = _manager.GetService<Account>(); + var databases = _manager.GetService<Databases>(); + + var realtime = _manager.Realtime; + var subscription = realtime.Subscribe( + new[] { "databases.*.collections.*.documents" }, + response => Debug.Log($"Realtime event: {response.Events[0]}") + ); +} +``` + +### Using Client directly + +```csharp +[SerializeField] private AppwriteConfig config; + +private async UniTask ExampleWithDirectClient() +{ + var client = new Client() + .SetEndpoint(config.Endpoint) + .SetProject(config.ProjectId); + + if (!string.IsNullOrEmpty(config.DevKey)) + { + client.SetDevKey(config.DevKey); + } + + if (!string.IsNullOrEmpty(config.RealtimeEndpoint)) + { + client.SetEndPointRealtime(config.RealtimeEndpoint); + } + + var pingResult = await client.Ping(); + Debug.Log($"Direct client ping: {pingResult}"); + + var account = new Account(client); + var databases = new Databases(client); +} +``` + +### Error handling + +```csharp +try +{ + var result = await client.Ping(); +} +catch (AppwriteException ex) +{ + Debug.LogError($"Appwrite Error: {ex.Message}"); + Debug.LogError($"Status Code: {ex.Code}"); + Debug.LogError($"Response: {ex.Response}"); +} +``` + +## Preparing Models for Databases API + +When working with the Databases API in Unity, models should be prepared for serialization using the System.Text.Json library. By default, System.Text.Json converts property names from PascalCase to camelCase when serializing to JSON. If your Appwrite collection attributes are not in camelCase, this can cause errors due to mismatches between serialized property names and actual attribute names in your collection. + +To avoid this, add the `JsonPropertyName` attribute to each property in your model class to match the attribute name in Appwrite: + +```csharp +using System.Text.Json.Serialization; + +public class TestModel +{ + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("release_date")] + public System.DateTime ReleaseDate { get; set; } +} +``` + +The `JsonPropertyName` attribute ensures your data object is serialized with the correct attribute names for Appwrite databases. From b2809c911d274aa860f9ec9e0c3903a31194b497 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 11:02:21 +0530 Subject: [PATCH 152/192] fix: improve presence log deletion handling and ensure accurate event triggering --- app/realtime.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index 26041fea1d..98d11f5b88 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1279,8 +1279,15 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register, $ /** @var UsagePublisher $publisherForUsage */ $publisherForUsage = $container->get('publisherForUsage'); + $deletedIds = []; try { - $deletionCount = $dbForProject->getAuthorization()->skip(fn () => $dbForProject->deleteDocuments('presenceLogs', [Query::equal('$id', $presenceIds)])); + $deletionCount = $dbForProject->getAuthorization()->skip(fn () => $dbForProject->deleteDocuments( + 'presenceLogs', + [Query::equal('$id', $presenceIds)], + onNext: function (Document $deleted) use (&$deletedIds): void { + $deletedIds[$deleted->getId()] = true; + }, + )); $presenceState->triggerUsage($publisherForUsage, $project, -$deletionCount); } catch (Throwable $th) { Span::error($th); @@ -1294,6 +1301,9 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register, $ $queueForRealtime = getQueueForRealtime(); foreach ($presences as $presence) { + if (!isset($deletedIds[$presence->getId()])) { + continue; + } try { $presenceState->triggerEvent( $queueForEvents, From 5b3af53bddbf3ddf85d0f5db6b89cd3a194c7fa1 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Mon, 18 May 2026 11:04:07 +0530 Subject: [PATCH 153/192] Address Unity SDK docs review --- docs/sdks/unity/GETTING_STARTED.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/sdks/unity/GETTING_STARTED.md b/docs/sdks/unity/GETTING_STARTED.md index ae932eebc2..174e932366 100644 --- a/docs/sdks/unity/GETTING_STARTED.md +++ b/docs/sdks/unity/GETTING_STARTED.md @@ -36,13 +36,17 @@ private async UniTask ExampleWithManager() var pingResult = await client.Ping(); Debug.Log($"Ping result: {pingResult}"); - var account = _manager.GetService<Account>(); - var databases = _manager.GetService<Databases>(); - var realtime = _manager.Realtime; var subscription = realtime.Subscribe( new[] { "databases.*.collections.*.documents" }, - response => Debug.Log($"Realtime event: {response.Events[0]}") + response => + { + var eventName = response.Events != null && response.Events.Length > 0 + ? response.Events[0] + : "unknown"; + + Debug.Log($"Realtime event: {eventName}"); + } ); } ``` @@ -70,9 +74,6 @@ private async UniTask ExampleWithDirectClient() var pingResult = await client.Ping(); Debug.Log($"Direct client ping: {pingResult}"); - - var account = new Account(client); - var databases = new Databases(client); } ``` @@ -93,7 +94,7 @@ catch (AppwriteException ex) ## Preparing Models for Databases API -When working with the Databases API in Unity, models should be prepared for serialization using the System.Text.Json library. By default, System.Text.Json converts property names from PascalCase to camelCase when serializing to JSON. If your Appwrite collection attributes are not in camelCase, this can cause errors due to mismatches between serialized property names and actual attribute names in your collection. +When working with the Databases API in Unity, models should be prepared for serialization using the System.Text.Json library. System.Text.Json uses CLR property names by default unless a naming policy is configured. If your project or SDK configuration serializes property names differently from your Appwrite collection attributes, this can cause errors due to mismatches between serialized property names and actual attribute names in your collection. To avoid this, add the `JsonPropertyName` attribute to each property in your model class to match the attribute name in Appwrite: @@ -111,3 +112,10 @@ public class TestModel ``` The `JsonPropertyName` attribute ensures your data object is serialized with the correct attribute names for Appwrite databases. + +### Learn more +You can use the following resources to learn more and get help: + +- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-client) +- 📜 [Appwrite Docs](https://appwrite.io/docs) +- 💬 [Discord Community](https://appwrite.io/discord) From 664c24173e8d65a125c00b5a37360803082a6a9c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 11:06:33 +0530 Subject: [PATCH 154/192] feat: update checkForProjectUsage function to return the project document --- app/realtime.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index 98d11f5b88..a3d49bbbf5 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -327,8 +327,9 @@ if (!function_exists('triggerStats')) { } if (!function_exists('checkForProjectUsage')) { - function checkForProjectUsage(Document $project): void + function checkForProjectUsage(Document $project): Document { + return $project; } } From ab208a01b6d89c9ee10257e836a0bccad18bcf58 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Mon, 18 May 2026 11:22:24 +0530 Subject: [PATCH 155/192] Update Unity docs for client factories --- docs/sdks/unity/GETTING_STARTED.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/sdks/unity/GETTING_STARTED.md b/docs/sdks/unity/GETTING_STARTED.md index 174e932366..7e1f37879c 100644 --- a/docs/sdks/unity/GETTING_STARTED.md +++ b/docs/sdks/unity/GETTING_STARTED.md @@ -25,7 +25,7 @@ private async UniTask ExampleWithManager() _manager = AppwriteManager.Instance ?? new GameObject("AppwriteManager").AddComponent<AppwriteManager>(); _manager.SetConfig(config); - var success = await _manager.Initialize(); + var success = await _manager.Initialize(needRealtime: true); if (!success) { Debug.LogError("Failed to initialize AppwriteManager"); @@ -48,35 +48,29 @@ private async UniTask ExampleWithManager() Debug.Log($"Realtime event: {eventName}"); } ); + + // Keep a reference to close the subscription when your MonoBehaviour is destroyed. + // subscription.Close(); } ``` ### Using Client directly ```csharp -[SerializeField] private AppwriteConfig config; - private async UniTask ExampleWithDirectClient() { - var client = new Client() - .SetEndpoint(config.Endpoint) - .SetProject(config.ProjectId); - - if (!string.IsNullOrEmpty(config.DevKey)) - { - client.SetDevKey(config.DevKey); - } - - if (!string.IsNullOrEmpty(config.RealtimeEndpoint)) - { - client.SetEndPointRealtime(config.RealtimeEndpoint); - } + var client = Client.From( + projectId: "<PROJECT_ID>", + endpoint: "https://<REGION>.cloud.appwrite.io/v1", + endpointRealtime: "wss://<REGION>.cloud.appwrite.io/v1"); var pingResult = await client.Ping(); Debug.Log($"Direct client ping: {pingResult}"); } ``` +You can also create authenticated clients with `Client.FromSession`, `Client.FromDevKey`, or `Client.FromImpersonation` when those authentication flows are needed. + ### Error handling ```csharp @@ -119,3 +113,4 @@ You can use the following resources to learn more and get help: - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-client) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) +- 🧰 [Appwrite SDK Generator](https://github.com/appwrite/sdk-generator) From 8aa09cfcc15058d1fa1fd861141426f6aa4903d0 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 11:32:37 +0530 Subject: [PATCH 156/192] fix: update checkForProjectUsage function to return void instead of Document --- app/realtime.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index a3d49bbbf5..c8c7908b84 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -327,9 +327,8 @@ if (!function_exists('triggerStats')) { } if (!function_exists('checkForProjectUsage')) { - function checkForProjectUsage(Document $project): Document + function checkForProjectUsage(Document $project): void { - return $project; } } @@ -1280,6 +1279,7 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register, $ /** @var UsagePublisher $publisherForUsage */ $publisherForUsage = $container->get('publisherForUsage'); + /** @var array<string, true> $deletedIds */ $deletedIds = []; try { $deletionCount = $dbForProject->getAuthorization()->skip(fn () => $dbForProject->deleteDocuments( From ff298cb206b968ae331f1d8b7baf2d09a887282b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 11:48:52 +0530 Subject: [PATCH 157/192] updated clousure scope --- app/realtime.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index c8c7908b84..b34dd9f420 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1282,13 +1282,17 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register, $ /** @var array<string, true> $deletedIds */ $deletedIds = []; try { - $deletionCount = $dbForProject->getAuthorization()->skip(fn () => $dbForProject->deleteDocuments( - 'presenceLogs', - [Query::equal('$id', $presenceIds)], - onNext: function (Document $deleted) use (&$deletedIds): void { - $deletedIds[$deleted->getId()] = true; - }, - )); + $deletionCount = $dbForProject->getAuthorization()->skip( + function () use ($dbForProject, $presenceIds, &$deletedIds): int { + return $dbForProject->deleteDocuments( + 'presenceLogs', + [Query::equal('$id', $presenceIds)], + onNext: function (Document $deleted) use (&$deletedIds): void { + $deletedIds[$deleted->getId()] = true; + }, + ); + } + ); $presenceState->triggerUsage($publisherForUsage, $project, -$deletionCount); } catch (Throwable $th) { Span::error($th); @@ -1300,7 +1304,6 @@ $server->onClose(function (int $connection) use ($realtime, $stats, $register, $ $queueForEvents = getQueueForEvents(); $queueForRealtime = getQueueForRealtime(); - foreach ($presences as $presence) { if (!isset($deletedIds[$presence->getId()])) { continue; From 254606c4f9fbb6762a1ab207913264df0eb0fabe Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 18 May 2026 10:00:24 +0300 Subject: [PATCH 158/192] Add orderDesc --- src/Appwrite/Platform/Workers/Deletes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index a58fc48098..b9efd3ac3b 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -1021,6 +1021,7 @@ class Deletes extends Action Query::equal('resourceInternalId', [$resourceInternalId]), Query::equal('resourceType', [$resourceType]), Query::orderDesc('$createdAt'), + Query::orderDesc(), Query::offset($executionsRetentionCount), ]); From 20c0c8081c22fa7c91e9693736d7a28bc9cf0d9a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 12:30:58 +0530 Subject: [PATCH 159/192] feat: add documentation for presence API endpoints and update descriptions --- docs/references/presences/delete.md | 1 + docs/references/presences/get-usage.md | 1 + docs/references/presences/get.md | 1 + docs/references/presences/list.md | 1 + docs/references/presences/update.md | 1 + docs/references/presences/upsert.md | 1 + src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php | 3 ++- src/Appwrite/Platform/Modules/Presences/HTTP/Get.php | 3 ++- src/Appwrite/Platform/Modules/Presences/HTTP/Update.php | 6 ++++-- src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php | 6 ++++-- src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php | 3 ++- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 3 ++- 12 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 docs/references/presences/delete.md create mode 100644 docs/references/presences/get-usage.md create mode 100644 docs/references/presences/get.md create mode 100644 docs/references/presences/list.md create mode 100644 docs/references/presences/update.md create mode 100644 docs/references/presences/upsert.md diff --git a/docs/references/presences/delete.md b/docs/references/presences/delete.md new file mode 100644 index 0000000000..70220709c8 --- /dev/null +++ b/docs/references/presences/delete.md @@ -0,0 +1 @@ +Delete a presence log by its unique ID. diff --git a/docs/references/presences/get-usage.md b/docs/references/presences/get-usage.md new file mode 100644 index 0000000000..efbf31ef58 --- /dev/null +++ b/docs/references/presences/get-usage.md @@ -0,0 +1 @@ +Get presence usage metrics, including the current total of online users and historical online user counts for the selected time range. diff --git a/docs/references/presences/get.md b/docs/references/presences/get.md new file mode 100644 index 0000000000..f5f4a82489 --- /dev/null +++ b/docs/references/presences/get.md @@ -0,0 +1 @@ +Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found. diff --git a/docs/references/presences/list.md b/docs/references/presences/list.md new file mode 100644 index 0000000000..b00285b361 --- /dev/null +++ b/docs/references/presences/list.md @@ -0,0 +1 @@ +List presence logs. Expired entries are filtered out automatically. diff --git a/docs/references/presences/update.md b/docs/references/presences/update.md new file mode 100644 index 0000000000..af642d3307 --- /dev/null +++ b/docs/references/presences/update.md @@ -0,0 +1 @@ +Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated. diff --git a/docs/references/presences/upsert.md b/docs/references/presences/upsert.md new file mode 100644 index 0000000000..873dc793f5 --- /dev/null +++ b/docs/references/presences/upsert.md @@ -0,0 +1 @@ +Create or update a presence log by its user ID. diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php index 6005ad183e..66ab00c3a7 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Delete.php @@ -40,7 +40,8 @@ class Delete extends PlatformAction namespace: 'presences', group: 'presences', name: 'delete', - description: 'Delete a presence log by its unique ID.', + desc: 'Delete presence', + description: '/docs/references/presences/delete.md', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php index 0f15cb86bc..ba6b769f70 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Get.php @@ -35,7 +35,8 @@ class Get extends PlatformAction namespace: 'presences', group: 'presences', name: 'get', - description: 'Get a presence log by its unique ID.', + desc: 'Get presence', + description: '/docs/references/presences/get.md', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php index fcd76d0fbc..5387d3a91e 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Update.php @@ -51,7 +51,8 @@ class Update extends PlatformAction namespace: 'presences', group: 'presences', name: 'update', - description: 'Update a presence log by its unique ID.', + desc: 'Update presence', + description: '/docs/references/presences/update.md', auth: [AuthType::SESSION], responses: [ new SDKResponse( @@ -73,7 +74,8 @@ class Update extends PlatformAction namespace: 'presences', group: 'presences', name: 'updatePresence', - description: 'Update a presence log by its unique ID.', + desc: 'Update presence', + description: '/docs/references/presences/update.md', auth: [AuthType::KEY, AuthType::JWT, AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php index 2f93f4eb04..c85cb15f17 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Upsert.php @@ -52,7 +52,8 @@ class Upsert extends PlatformAction namespace: 'presences', group: 'presences', name: 'upsert', - description: 'Create or update a presence log by its unique ID.', + desc: 'Upsert presence', + description: '/docs/references/presences/upsert.md', auth: [AuthType::SESSION], responses: [ new SDKResponse( @@ -73,7 +74,8 @@ class Upsert extends PlatformAction namespace: 'presences', group: 'presences', name: 'upsert', - description: 'Create or update a presence log by its unique ID.', + desc: 'Upsert presence', + description: '/docs/references/presences/upsert.md', auth: [AuthType::KEY, AuthType::JWT, AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php index 6023a071e4..636010e765 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/Usage/Get.php @@ -35,7 +35,8 @@ class Get extends PlatformAction namespace: 'presences', group: null, name: 'getUsage', - description: 'Get presence usage metrics and statistics, including the current total of online users and historical online user counts for the selected time range.', + desc: 'Get presence usage', + description: '/docs/references/presences/get-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index bf7e40ad84..94dca8c4ee 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -45,7 +45,8 @@ class XList extends PlatformAction namespace: 'presences', group: 'presences', name: 'list', - description: 'List presence logs.', + desc: 'List presences', + description: '/docs/references/presences/list.md', auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( From 03e62dde94b13abceb1867bac90d3c6833b10105 Mon Sep 17 00:00:00 2001 From: Atharva Deosthale <atharva.deosthale17@gmail.com> Date: Mon, 18 May 2026 15:16:59 +0530 Subject: [PATCH 160/192] feat(sites): allow bun and deno as build runtimes for JS frameworks Merge BUN and DENO template runtimes into the runtimes list for every NODE-based Sites framework (analog, angular, nextjs, react, nuxt, vue, sveltekit, astro, tanstack-start, remix, lynx, react-native, vite, other). The Console's build-runtime dropdown reads framework.runtimes, so this is what surfaces bun-1.3 and deno-2.6 in the UI now that openruntimes/open-runtimes#485 has shipped SSR support for both runtimes. The server-side WhiteList validator on POST /v1/sites already accepts any runtime in the global runtimes config, so CLI and REST clients have been able to pick bun/deno all along; this change only flips the UI gate. Flutter stays flutter-only. --- app/config/frameworks.php | 84 ++++++++++++++++++++++++++++++++------- 1 file changed, 70 insertions(+), 14 deletions(-) diff --git a/app/config/frameworks.php b/app/config/frameworks.php index 6078c53c63..342657017f 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -14,7 +14,11 @@ return [ 'name' => 'Analog', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/analog/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/analog/env.sh', 'adapters' => [ @@ -40,7 +44,11 @@ return [ 'name' => 'Angular', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/angular/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/angular/env.sh', 'adapters' => [ @@ -66,7 +74,11 @@ return [ 'name' => 'Next.js', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/next-js/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/next-js/env.sh', 'adapters' => [ @@ -91,7 +103,11 @@ return [ 'name' => 'React', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'adapters' => [ 'static' => [ 'key' => 'static', @@ -108,7 +124,11 @@ return [ 'name' => 'Nuxt', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/nuxt/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/nuxt/env.sh', 'adapters' => [ @@ -133,7 +153,11 @@ return [ 'name' => 'Vue.js', 'screenshotSleep' => 5000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'adapters' => [ 'static' => [ 'key' => 'static', @@ -150,7 +174,11 @@ return [ 'name' => 'SvelteKit', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/sveltekit/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/sveltekit/env.sh', 'adapters' => [ @@ -175,7 +203,11 @@ return [ 'name' => 'Astro', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/astro/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/astro/env.sh', 'adapters' => [ @@ -200,7 +232,11 @@ return [ 'name' => 'TanStack Start', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/tanstack-start/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/tanstack-start/env.sh', 'adapters' => [ @@ -225,7 +261,11 @@ return [ 'name' => 'Remix', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'bundleCommand' => 'bash /usr/local/server/helpers/remix/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/remix/env.sh', 'adapters' => [ @@ -250,7 +290,11 @@ return [ 'name' => 'Lynx', 'screenshotSleep' => 5000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'adapters' => [ 'static' => [ 'key' => 'static', @@ -284,7 +328,11 @@ return [ 'name' => 'React Native', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'adapters' => [ 'static' => [ 'key' => 'static', @@ -301,7 +349,11 @@ return [ 'name' => 'Vite', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'adapters' => [ 'static' => [ 'key' => 'static', @@ -317,7 +369,11 @@ return [ 'name' => 'Other', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => $templateRuntimes['NODE'], + 'runtimes' => array_merge( + $templateRuntimes['NODE'], + $templateRuntimes['BUN'], + $templateRuntimes['DENO'] + ), 'adapters' => [ 'static' => [ 'key' => 'static', From b756a382523bbfc5b5a3edbdbad285664639f1b7 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Mon, 18 May 2026 12:39:23 +0530 Subject: [PATCH 161/192] Consolidate shared DI resources --- app/cli.php | 63 +------------ app/init/resources.php | 172 ++++++++++++++++++------------------ app/init/worker/message.php | 6 -- 3 files changed, 89 insertions(+), 152 deletions(-) diff --git a/app/cli.php b/app/cli.php index 9ad223a3ff..496a79eab9 100644 --- a/app/cli.php +++ b/app/cli.php @@ -2,18 +2,10 @@ require_once __DIR__ . '/init.php'; -use Appwrite\Event\Event; -use Appwrite\Event\Publisher\Certificate as CertificatePublisher; -use Appwrite\Event\Publisher\Database as DatabasePublisher; -use Appwrite\Event\Publisher\Delete as DeletePublisher; -use Appwrite\Event\Publisher\Func as FunctionPublisher; -use Appwrite\Event\Publisher\StatsResources as StatsResourcesPublisher; -use Appwrite\Event\Publisher\Usage as UsagePublisher; use Appwrite\Platform\Appwrite; use Appwrite\Runtimes\Runtimes; use Appwrite\Usage\Context as UsageContext; use Appwrite\Utopia\Database\Documents\User; -use Executor\Executor; use Swoole\Runtime; use Swoole\Timer; use Utopia\Cache\Adapter\Pool as CachePool; @@ -27,17 +19,12 @@ use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; -use Utopia\DI\Container; use Utopia\DSN\DSN; use Utopia\Logger\Log; use Utopia\Platform\Service; use Utopia\Pools\Group; -use Utopia\Queue\Broker\Pool as BrokerPool; -use Utopia\Queue\Publisher; -use Utopia\Queue\Queue; use Utopia\Registry\Registry; use Utopia\System\System; -use Utopia\Telemetry\Adapter\None as NoTelemetry; use function Swoole\Coroutine\run; @@ -48,6 +35,7 @@ Config::setParam('runtimes', (new Runtimes('v5'))->getAll(supported: false)); require_once __DIR__ . '/controllers/general.php'; global $register; +global $container; $platform = new Appwrite(); $args = $_SERVER['argv'] ?? []; @@ -59,7 +47,6 @@ if (! isset($args[0])) { } $taskName = $args[0]; -$container = new Container(); $cli = new CLI(new Generic(), $_SERVER['argv'] ?? [], $container); $platform->setCli($cli); @@ -132,10 +119,6 @@ $container->set('dbForPlatform', function ($pools, $cache, $authorization) { return $dbForPlatform; }, ['pools', 'cache', 'authorization']); -$container->set('console', function () { - return new Document(Config::getParam('console')); -}, []); - $container->set( 'isResourceBlocked', fn () => fn (Document $project, string $resourceType, ?string $resourceId) => false, @@ -252,48 +235,10 @@ $container->set('getLogsDB', function (Group $pools, Cache $cache, Authorization return $database; }; }, ['pools', 'cache', 'authorization']); -$container->set('publisher', function (Group $pools) { - return new BrokerPool(publisher: $pools->get('publisher')); -}, ['pools']); -$container->set('publisherDatabases', function (BrokerPool $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherFunctions', function (BrokerPool $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherMigrations', function (BrokerPool $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherMessaging', function (BrokerPool $publisher) { - return $publisher; -}, ['publisher']); + $container->set('usage', function () { return new UsageContext(); }, []); -$container->set('publisherForUsage', fn (Publisher $publisher) => new UsagePublisher( - $publisher, - new Queue(System::getEnv('_APP_STATS_USAGE_QUEUE_NAME', Event::STATS_USAGE_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForCertificates', fn (Publisher $publisher) => new CertificatePublisher( - $publisher, - new Queue(System::getEnv('_APP_CERTIFICATES_QUEUE_NAME', Event::CERTIFICATES_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForStatsResources', fn (Publisher $publisher) => new StatsResourcesPublisher( - $publisher, - new Queue(System::getEnv('_APP_STATS_RESOURCES_QUEUE_NAME', Event::STATS_RESOURCES_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForFunctions', fn (Publisher $publisher) => new FunctionPublisher( - $publisher, - new Queue(System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME), 'utopia-queue', Event::FUNCTIONS_QUEUE_TTL) -), ['publisher']); -$container->set('publisherForDatabase', fn (Publisher $publisherDatabases) => new DatabasePublisher( - $publisherDatabases, - new Queue(System::getEnv('_APP_DATABASE_QUEUE_NAME', Event::DATABASE_QUEUE_NAME)) -), ['publisherDatabases']); -$container->set('publisherForDeletes', fn (Publisher $publisher) => new DeletePublisher( - $publisher, - new Queue(System::getEnv('_APP_DELETE_QUEUE_NAME', Event::DELETE_QUEUE_NAME)) -), ['publisher']); $container->set('logError', function (Registry $register) { return function (Throwable $error, string $namespace, string $action) use ($register) { Console::error('[Error] Timestamp: ' . date('c', time())); @@ -346,14 +291,10 @@ $container->set('logError', function (Registry $register) { }; }, ['register']); -$container->set('executor', fn () => new Executor(), []); - $container->set('bus', function (Registry $register) use ($container) { return $register->get('bus')->setResolver(fn (string $name) => $container->get($name)); }, ['register']); -$container->set('telemetry', fn () => new NoTelemetry(), []); - $exitCode = 0; $cli diff --git a/app/init/resources.php b/app/init/resources.php index d48a60c06c..7b7e13482c 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -53,6 +53,93 @@ global $register; global $container; $container = new Container(); +$container->set('console', fn () => new Document(Config::getParam('console')), []); + +$container->set('executor', fn () => new Executor(), []); + +$container->set('telemetry', fn () => new NoTelemetry(), []); + +$container->set('publisher', fn (Group $pools) => new BrokerPool(publisher: $pools->get('publisher')), ['pools']); + +$container->set('publisherDatabases', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherFunctions', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherMigrations', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherMails', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherDeletes', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherMessaging', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherWebhooks', fn (Publisher $publisher) => $publisher, ['publisher']); + +$container->set('publisherForAudits', fn (Publisher $publisher) => new AuditPublisher( + $publisher, + new Queue(System::getEnv('_APP_AUDITS_QUEUE_NAME', Event::AUDITS_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForCertificates', fn (Publisher $publisher) => new CertificatePublisher( + $publisher, + new Queue(System::getEnv('_APP_CERTIFICATES_QUEUE_NAME', Event::CERTIFICATES_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForScreenshots', fn (Publisher $publisher) => new ScreenshotPublisher( + $publisher, + new Queue(System::getEnv('_APP_SCREENSHOTS_QUEUE_NAME', Event::SCREENSHOTS_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForUsage', fn (Publisher $publisher) => new UsagePublisher( + $publisher, + new Queue(System::getEnv('_APP_STATS_USAGE_QUEUE_NAME', Event::STATS_USAGE_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForExecutions', fn (Publisher $publisher) => new ExecutionPublisher( + $publisher, + new Queue(System::getEnv('_APP_EXECUTIONS_QUEUE_NAME', Event::EXECUTIONS_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForFunctions', fn (Publisher $publisher) => new FunctionPublisher( + $publisher, + new Queue(System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME), 'utopia-queue', Event::FUNCTIONS_QUEUE_TTL) +), ['publisher']); + +$container->set('publisherForMigrations', fn (Publisher $publisher) => new MigrationPublisher( + $publisher, + new Queue(System::getEnv('_APP_MIGRATIONS_QUEUE_NAME', Event::MIGRATIONS_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForStatsResources', fn (Publisher $publisher) => new StatsResourcesPublisher( + $publisher, + new Queue(System::getEnv('_APP_STATS_RESOURCES_QUEUE_NAME', Event::STATS_RESOURCES_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForBuilds', fn (Publisher $publisher) => new BuildPublisher( + $publisher, + new Queue(System::getEnv('_APP_BUILDS_QUEUE_NAME', Event::BUILDS_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForDatabase', fn (Publisher $publisherDatabases) => new DatabasePublisher( + $publisherDatabases, + new Queue(System::getEnv('_APP_DATABASE_QUEUE_NAME', Event::DATABASE_QUEUE_NAME)) +), ['publisherDatabases']); + +$container->set('publisherForDeletes', fn (Publisher $publisher) => new DeletePublisher( + $publisher, + new Queue(System::getEnv('_APP_DELETE_QUEUE_NAME', Event::DELETE_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForMails', fn (Publisher $publisher) => new MailPublisher( + $publisher, + new Queue(System::getEnv('_APP_MAILS_QUEUE_NAME', Event::MAILS_QUEUE_NAME)) +), ['publisher']); + +$container->set('publisherForMessaging', fn (Publisher $publisher) => new MessagingPublisher( + $publisher, + new Queue(System::getEnv('_APP_MESSAGING_QUEUE_NAME', Event::MESSAGING_QUEUE_NAME)) +), ['publisher']); + $container->set('logger', function ($register) { return $register->get('logger'); }, ['register']); @@ -67,83 +154,6 @@ $container->set('localeCodes', function () { return array_map(fn ($locale) => $locale['code'], Config::getParam('locale-codes', [])); }); -// Queues - shared infrastructure (stateless pool wrappers) -$container->set('publisher', function (Group $pools) { - return new BrokerPool(publisher: $pools->get('publisher')); -}, ['pools']); -$container->set('publisherDatabases', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherFunctions', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherMigrations', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherMails', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherDeletes', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherMessaging', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherWebhooks', function (Publisher $publisher) { - return $publisher; -}, ['publisher']); -$container->set('publisherForAudits', fn (Publisher $publisher) => new AuditPublisher( - $publisher, - new Queue(System::getEnv('_APP_AUDITS_QUEUE_NAME', Event::AUDITS_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForCertificates', fn (Publisher $publisher) => new CertificatePublisher( - $publisher, - new Queue(System::getEnv('_APP_CERTIFICATES_QUEUE_NAME', Event::CERTIFICATES_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForScreenshots', fn (Publisher $publisher) => new ScreenshotPublisher( - $publisher, - new Queue(System::getEnv('_APP_SCREENSHOTS_QUEUE_NAME', Event::SCREENSHOTS_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForUsage', fn (Publisher $publisher) => new UsagePublisher( - $publisher, - new Queue(System::getEnv('_APP_STATS_USAGE_QUEUE_NAME', Event::STATS_USAGE_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForExecutions', fn (Publisher $publisher) => new ExecutionPublisher( - $publisher, - new Queue(System::getEnv('_APP_EXECUTIONS_QUEUE_NAME', Event::EXECUTIONS_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForFunctions', fn (Publisher $publisher) => new FunctionPublisher( - $publisher, - new Queue(System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME), 'utopia-queue', Event::FUNCTIONS_QUEUE_TTL) -), ['publisher']); -$container->set('publisherForMigrations', fn (Publisher $publisher) => new MigrationPublisher( - $publisher, - new Queue(System::getEnv('_APP_MIGRATIONS_QUEUE_NAME', Event::MIGRATIONS_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForStatsResources', fn (Publisher $publisher) => new StatsResourcesPublisher( - $publisher, - new Queue(System::getEnv('_APP_STATS_RESOURCES_QUEUE_NAME', Event::STATS_RESOURCES_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForBuilds', fn (Publisher $publisher) => new BuildPublisher( - $publisher, - new Queue(System::getEnv('_APP_BUILDS_QUEUE_NAME', Event::BUILDS_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForDatabase', fn (Publisher $publisherDatabases) => new DatabasePublisher( - $publisherDatabases, - new Queue(System::getEnv('_APP_DATABASE_QUEUE_NAME', Event::DATABASE_QUEUE_NAME)) -), ['publisherDatabases']); -$container->set('publisherForDeletes', fn (Publisher $publisher) => new DeletePublisher( - $publisher, - new Queue(System::getEnv('_APP_DELETE_QUEUE_NAME', Event::DELETE_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForMails', fn (Publisher $publisher) => new MailPublisher( - $publisher, - new Queue(System::getEnv('_APP_MAILS_QUEUE_NAME', Event::MAILS_QUEUE_NAME)) -), ['publisher']); -$container->set('publisherForMessaging', fn (Publisher $publisher) => new MessagingPublisher( - $publisher, - new Queue(System::getEnv('_APP_MESSAGING_QUEUE_NAME', Event::MESSAGING_QUEUE_NAME)) -), ['publisher']); /** * Platform configuration @@ -152,10 +162,6 @@ $container->set('platform', function () { return Config::getParam('platform', []); }, []); -$container->set('console', function () { - return new Document(Config::getParam('console')); -}, []); - $container->set('authorization', function () { return new Authorization(); }, []); @@ -214,8 +220,6 @@ $container->set('getLogsDB', function (Group $pools, Cache $cache, Authorization }; }, ['pools', 'cache', 'authorization']); -$container->set('telemetry', fn () => new NoTelemetry()); - $container->set('cache', function (Group $pools, Telemetry $telemetry) { $list = Config::getParam('pools-cache', []); $adapters = []; @@ -416,5 +420,3 @@ $container->set( 'isResourceBlocked', fn () => fn (Document $project, string $resourceType, ?string $resourceId) => false ); - -$container->set('executor', fn () => new Executor()); diff --git a/app/init/worker/message.php b/app/init/worker/message.php index 3585421a28..5cabfc7859 100644 --- a/app/init/worker/message.php +++ b/app/init/worker/message.php @@ -1,7 +1,6 @@ <?php use Appwrite\Event\Event; -use Appwrite\Event\Publisher\Func as FunctionPublisher; use Appwrite\Event\Realtime; use Appwrite\Event\Webhook; use Appwrite\Usage\Context; @@ -21,7 +20,6 @@ use Utopia\DSN\DSN; use Utopia\Logger\Log; use Utopia\Pools\Group; use Utopia\Queue\Publisher; -use Utopia\Queue\Queue; use Utopia\Registry\Registry; use Utopia\Storage\Device\Telemetry as TelemetryDevice; use Utopia\System\System; @@ -334,10 +332,6 @@ return function (Container $container): void { return new Webhook($publisher); }, ['publisher']); - $container->set('publisherForFunctions', fn (Publisher $publisher) => new FunctionPublisher( - $publisher, - new Queue(System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME), 'utopia-queue', Event::FUNCTIONS_QUEUE_TTL) - ), ['publisher']); $container->set('queueForRealtime', function () { return new Realtime(); }, []); From 2cd422f4c2ca619d9b45a5dca1e374a6300579ca Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 18 May 2026 13:58:24 +0100 Subject: [PATCH 162/192] fix(health): use injected cache resource for healthcheck Inject the live cache resource and ping it directly instead of rebuilding pool adapters from pools-cache. The container already constructs the right adapter (pool, multiplexing, none), so the healthcheck now exercises the actual configured cache. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --- .../Modules/Health/Http/Health/Cache/Get.php | 47 +++++++------------ 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Health/Http/Health/Cache/Get.php b/src/Appwrite/Platform/Modules/Health/Http/Health/Cache/Get.php index bf7c3c4889..8d717eb9ab 100644 --- a/src/Appwrite/Platform/Modules/Health/Http/Health/Cache/Get.php +++ b/src/Appwrite/Platform/Modules/Health/Http/Health/Cache/Get.php @@ -8,12 +8,10 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; -use Utopia\Cache\Adapter\Pool as CachePool; -use Utopia\Config\Config; +use Utopia\Cache\Cache; use Utopia\Database\Document; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Pools\Group; class Get extends Action { @@ -47,45 +45,32 @@ class Get extends Action contentType: ContentType::JSON )) ->inject('response') - ->inject('pools') + ->inject('cache') ->callback($this->action(...)); } - public function action(Response $response, Group $pools): void + public function action(Response $response, Cache $cache): void { $output = []; - $failures = []; - $configs = [ - 'Cache' => Config::getParam('pools-cache'), - ]; + $checkStart = \microtime(true); - foreach ($configs as $key => $config) { - foreach ($config as $cache) { - try { - $adapter = new CachePool($pools->get($cache)); - - $checkStart = \microtime(true); - - if ($adapter->ping()) { - $output[] = new Document([ - 'name' => $key . " ($cache)", - 'status' => 'pass', - 'ping' => \round((\microtime(true) - $checkStart) * 1000), - ]); - } else { - $failures[] = $cache; - } - } catch (\Throwable) { - $failures[] = $cache; - } - } + try { + $ok = $cache->ping(); + } catch (\Throwable) { + $ok = false; } - if (!empty($failures)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Cache failure on: ' . \implode(', ', $failures)); + if (!$ok) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Cache failure on: cache'); } + $output[] = new Document([ + 'name' => 'Cache', + 'status' => 'pass', + 'ping' => \round((\microtime(true) - $checkStart) * 1000), + ]); + $response->dynamic(new Document([ 'statuses' => $output, 'total' => \count($output), From 05eead1857da512b1a8ed6fabd4528b19f2807f8 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Mon, 18 May 2026 17:51:11 +0530 Subject: [PATCH 163/192] Remove router deployment fallback --- app/controllers/general.php | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 6ca0a63ee2..b39c2e2623 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -184,31 +184,7 @@ function router(Http $utopia, Database $dbForPlatform, callable $getProjectDB, S /** @var Database $dbForProject */ $dbForProject = $getProjectDB($project); - if (!empty($rule->getAttribute('deploymentId', ''))) { - $deployment = $authorization->skip(fn () => $dbForProject->getDocument('deployments', $rule->getAttribute('deploymentId'))); - } else { - // 1.6.x DB schema compatibility - // TODO: Make sure deploymentId is never empty, and remove this code - - // Check if site or function; should never be site, but better safe than sorry - // Attempts to use attribute from both schemas (1.6 and 1.7) - $resourceType = $rule->getAttribute('deploymentResourceType', $rule->getAttribute('resourceType', '')); - - // ID of site or function - $resourceId = $rule->getAttribute('deploymentResourceId', ''); - - // Document of site or function - $resource = $resourceType === 'function' ? - $authorization->skip(fn () => $dbForProject->getDocument('functions', $resourceId)) : - $authorization->skip(fn () => $dbForProject->getDocument('sites', $resourceId)); - - // ID of active deployments - // Attempts to use attribute from both schemas (1.6 and 1.7) - $activeDeploymentId = $resource->getAttribute('deploymentId', $resource->getAttribute('deployment', '')); - - // Get deployment document, as intended originally - $deployment = $authorization->skip(fn () => $dbForProject->getDocument('deployments', $activeDeploymentId)); - } + $deployment = $authorization->skip(fn () => $dbForProject->getDocument('deployments', $rule->getAttribute('deploymentId'))); if ($deployment->isEmpty()) { $resourceType = $rule->getAttribute('deploymentResourceType', ''); From 42144ab9a0e373ed3c9d64e2a6c4521d8e1eedcf Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 21:23:21 +0530 Subject: [PATCH 164/192] added category to the presences scopes --- app/config/scopes/project.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/config/scopes/project.php b/app/config/scopes/project.php index b27f328308..d0d9ca21bf 100644 --- a/app/config/scopes/project.php +++ b/app/config/scopes/project.php @@ -381,8 +381,10 @@ return [ ], 'presences.read' => [ 'description' => 'Access to read your project\'s presences', + 'category' => 'Presences' ], 'presences.write' => [ 'description' => 'Access to create, update, and delete your project\'s presences', + 'category' => 'Presences' ], ]; From 6f28f2e4f7408e517f12795711e76acb752947e4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 21:26:21 +0530 Subject: [PATCH 165/192] linting --- app/config/scopes/project.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/scopes/project.php b/app/config/scopes/project.php index d0d9ca21bf..cd50abd57b 100644 --- a/app/config/scopes/project.php +++ b/app/config/scopes/project.php @@ -381,10 +381,10 @@ return [ ], 'presences.read' => [ 'description' => 'Access to read your project\'s presences', - 'category' => 'Presences' + 'category' => 'Presences', ], 'presences.write' => [ 'description' => 'Access to create, update, and delete your project\'s presences', - 'category' => 'Presences' + 'category' => 'Presences', ], ]; From 349db8d370852029a16e909b067429a1f786d5fb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 21:49:13 +0530 Subject: [PATCH 166/192] fix: improve error handling for Utopia DB exceptions in realtime API --- app/realtime.php | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index b34dd9f420..b677b525c4 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -35,7 +35,9 @@ use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Exception\Authorization as AuthorizationException; use Utopia\Database\Exception\Query as QueryException; +use Utopia\Database\Exception\Timeout as TimeoutException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; @@ -374,7 +376,16 @@ if (!function_exists('logError')) { $logger = $register->get('realtimeLogger'); - if ($logger && !$error instanceof Exception) { + // Match HTTP semantics (app/controllers/general.php): AppwriteException uses its + // configured publish flag; everything else publishes only for code 0 or >= 500. + // Without this, expected client errors (e.g. Utopia DB Authorization) hit Sentry. + if ($error instanceof Exception) { + $publish = $error->isPublishable(); + } else { + $publish = $error->getCode() === 0 || $error->getCode() >= 500; + } + + if ($logger && $publish) { $version = System::getEnv('_APP_VERSION', 'UNKNOWN'); $log = new Log(); @@ -990,6 +1001,16 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, $success = true; } catch (Throwable $th) { + Span::error($th); + + // Convert known Utopia DB exceptions to AppwriteException so isPublishable() + // suppresses expected client errors (permission denied, query timeout) from Sentry. + if ($th instanceof AuthorizationException) { + $th = new AppwriteException(AppwriteException::USER_UNAUTHORIZED, previous: $th); + } elseif ($th instanceof TimeoutException) { + $th = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $th); + } + logError($th, 'realtime', project: $project, user: $logUser, authorization: $authorization); // Handle SQL error code is 'HY000' @@ -1025,7 +1046,6 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, Console::error('[Error] Code: ' . $response['data']['code']); Console::error('[Error] Message: ' . $response['data']['message']); } - Span::error($th); } finally { Span::add('realtime.success', $success); Span::add('realtime.response_code', $responseCode); @@ -1171,6 +1191,16 @@ $server->onMessage(function (int $connection, string $message) use ($container, $success = true; } catch (Throwable $th) { + Span::error($th); + + // Convert known Utopia DB exceptions to AppwriteException so isPublishable() + // suppresses expected client errors (permission denied, query timeout) from Sentry. + if ($th instanceof AuthorizationException) { + $th = new AppwriteException(AppwriteException::USER_UNAUTHORIZED, previous: $th); + } elseif ($th instanceof TimeoutException) { + $th = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $th); + } + logError($th, 'realtimeMessage', project: $project, authorization: $authorization); $code = $th->getCode(); if (!is_int($code)) { @@ -1200,7 +1230,6 @@ $server->onMessage(function (int $connection, string $message) use ($container, if ($th->getCode() === 1008) { $server->close($connection, $th->getCode()); } - Span::error($th); } finally { Span::add('realtime.success', $success); Span::add('realtime.response_code', $responseCode); From 4d3c60b36c475ada888afc31b944580551cf68fb Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 18 May 2026 21:53:06 +0530 Subject: [PATCH 167/192] updated --- app/realtime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/realtime.php b/app/realtime.php index b677b525c4..73e7ab025a 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -379,7 +379,7 @@ if (!function_exists('logError')) { // Match HTTP semantics (app/controllers/general.php): AppwriteException uses its // configured publish flag; everything else publishes only for code 0 or >= 500. // Without this, expected client errors (e.g. Utopia DB Authorization) hit Sentry. - if ($error instanceof Exception) { + if ($error instanceof AppwriteException) { $publish = $error->isPublishable(); } else { $publish = $error->getCode() === 0 || $error->getCode() >= 500; From 27534133bb20a08779fe860d34fc5849f75b0436 Mon Sep 17 00:00:00 2001 From: Damodar Lohani <dlohani48@gmail.com> Date: Tue, 19 May 2026 02:11:49 +0000 Subject: [PATCH 168/192] feat(storage): expose sizeActual in File response model Adds the stored byte size (after compression and/or encryption) alongside sizeOriginal so clients can see how much space a file actually occupies. The sizeActual attribute is already persisted on file documents. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --- src/Appwrite/Utopia/Response/Model/File.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/File.php b/src/Appwrite/Utopia/Response/Model/File.php index 9b3e6ff618..61dd496f52 100644 --- a/src/Appwrite/Utopia/Response/Model/File.php +++ b/src/Appwrite/Utopia/Response/Model/File.php @@ -67,6 +67,12 @@ class File extends Model 'default' => 0, 'example' => 17890, ]) + ->addRule('sizeActual', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'File actual stored size in bytes after compression and/or encryption.', + 'default' => 0, + 'example' => 12345, + ]) ->addRule('chunksTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total number of chunks available', From 9233fe5b421224a880b02358986db0690643e88b Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 19 May 2026 14:47:54 +1200 Subject: [PATCH 169/192] fix: restrict advisor auth types --- .../Modules/Advisor/Http/Insights/Get.php | 2 +- .../Modules/Advisor/Http/Insights/XList.php | 2 +- .../Modules/Advisor/Http/Reports/Get.php | 2 +- .../Modules/Advisor/Http/Reports/XList.php | 2 +- tests/unit/Advisor/AuthTest.php | 37 +++++++++++++++++++ 5 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 tests/unit/Advisor/AuthTest.php diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php index 4796d5851f..d605cacaef 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/Get.php @@ -36,7 +36,7 @@ class Get extends Action group: 'insights', name: 'getInsight', description: '/docs/references/advisor/get-insight.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php index 64d3676c08..6cf779bfb9 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Insights/XList.php @@ -42,7 +42,7 @@ class XList extends Action group: 'insights', name: 'listInsights', description: '/docs/references/advisor/list-insights.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php index 78885a7c5d..e912161e26 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/Get.php @@ -37,7 +37,7 @@ class Get extends Action group: 'reports', name: 'getReport', description: '/docs/references/advisor/get-report.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php index c5debb7f68..1440d09142 100644 --- a/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php +++ b/src/Appwrite/Platform/Modules/Advisor/Http/Reports/XList.php @@ -41,7 +41,7 @@ class XList extends Action group: 'reports', name: 'listReports', description: '/docs/references/advisor/list-reports.md', - auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/tests/unit/Advisor/AuthTest.php b/tests/unit/Advisor/AuthTest.php new file mode 100644 index 0000000000..c2d4a93755 --- /dev/null +++ b/tests/unit/Advisor/AuthTest.php @@ -0,0 +1,37 @@ +<?php + +namespace Tests\Unit\Advisor; + +use Appwrite\Platform\Modules\Advisor\Http\Insights\Get as GetInsight; +use Appwrite\Platform\Modules\Advisor\Http\Insights\XList as ListInsights; +use Appwrite\Platform\Modules\Advisor\Http\Reports\Delete as DeleteReport; +use Appwrite\Platform\Modules\Advisor\Http\Reports\Get as GetReport; +use Appwrite\Platform\Modules\Advisor\Http\Reports\XList as ListReports; +use Appwrite\SDK\AuthType; +use Appwrite\SDK\Method; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; +use Utopia\Platform\Action; + +class AuthTest extends TestCase +{ + #[DataProvider('advisorActionsProvider')] + public function testAdvisorApisOnlySupportAdminAndKeyAuth(Action $action): void + { + /** @var Method $method */ + $method = $action->getLabels()['sdk']; + + $this->assertSame([AuthType::ADMIN, AuthType::KEY], $method->getAuth()); + } + + public static function advisorActionsProvider(): array + { + return [ + 'get report' => [new GetReport()], + 'list reports' => [new ListReports()], + 'delete report' => [new DeleteReport()], + 'get insight' => [new GetInsight()], + 'list insights' => [new ListInsights()], + ]; + } +} From c28f4764628974f786a16a6accd3493e5eddbd8d Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 19 May 2026 18:24:06 +1200 Subject: [PATCH 170/192] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- app/realtime.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index 6839f7d40c..27b1e23aff 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -1086,13 +1086,19 @@ $server->onMessage(function (int $connection, string $message) use ($container, if (!empty($projectId) && $projectId !== 'console') { // Negative-cache race: if any prior code path queried projects:$projectId // before this project existed (e.g. a router probe during connection - // setup), the Database's shared cache may hold an empty result. HTTP - // worker creates the project via dbForPlatform which purges on write, - // but there's a window during which Realtime can re-populate a stale - // cache entry. Purge before reading to force a fresh adapter hit. - $database->purgeCachedDocument('projects', $projectId); + // setup), the Database's shared cache may hold an empty result. Try the + // cached read first, and only purge/retry when the first lookup reports + // not-found so the shared cache remains effective for normal traffic. + try { + $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); + } catch (AppwriteException $e) { + if ($e->getCode() !== 404) { + throw $e; + } - $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); + $database->purgeCachedDocument('projects', $projectId); + $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); + } $database = getProjectDB($project); $database->setAuthorization($authorization); From 948c702ad46b08a1ada61e8aedeea42a8fcd511c Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 19 May 2026 18:28:20 +1200 Subject: [PATCH 171/192] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/Appwrite/Platform/Workers/StatsResources.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index 65d78dd818..f56813a6d9 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -81,7 +81,12 @@ class StatsResources extends Action $this->documents = []; if ($statsResources->gauges !== []) { - $this->writeGauges($getLogsDB, $project, $statsResources->gauges); + try { + $this->writeGauges($getLogsDB, $project, $statsResources->gauges); + } catch (Throwable $th) { + call_user_func($this->logError, $th); + } + return; } From 282b5b2a6c86d2050e33a3b78be775da92ba7546 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 19 May 2026 06:32:06 +0000 Subject: [PATCH 172/192] fix(databases): map cursor lookup NotFound to collection 404 Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/546b5830-100b-4a48-9d71-f19c204e269f Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com> --- .../Http/Databases/Collections/Documents/XList.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 659982ff78..fdcbced6f3 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 @@ -119,7 +119,14 @@ class XList extends Action $documentId = $cursor->getValue(); - $cursorDocument = $authorization->skip(fn () => $dbForDatabases->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); + try { + $cursorDocument = $authorization->skip(fn () => $dbForDatabases->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); + } catch (NotFoundException) { + // The collection metadata document exists but the backing store (e.g. a + // dedicated DocumentsDB shard) has no table for it. Treat this as a + // not-found on the collection so the caller sees a 404 instead of a 500. + throw new Exception($this->getParentNotFoundException(), params: [$collectionId]); + } if ($cursorDocument->isEmpty()) { $type = ucfirst($this->getContext()); From 218cc13b20e91638e4428496fbbc5eb142dbd07e Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 19 May 2026 18:32:54 +1200 Subject: [PATCH 173/192] Update src/Appwrite/Platform/Workers/StatsResources.php Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- src/Appwrite/Platform/Workers/StatsResources.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index f56813a6d9..91cf3a1246 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -84,7 +84,7 @@ class StatsResources extends Action try { $this->writeGauges($getLogsDB, $project, $statsResources->gauges); } catch (Throwable $th) { - call_user_func($this->logError, $th); + call_user_func_array($this->logError, [$th, "StatsResources", "write_gauges_{$project->getId()}"]); } return; From 8c903ab6874666692e67775c4c02f7a9e8718ed5 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Tue, 19 May 2026 16:01:54 +0530 Subject: [PATCH 174/192] fix: allow empty string to clear optional SMTP and email template fields --- .../Project/Http/Project/SMTP/Update.php | 20 +-- .../Http/Project/Templates/Email/Update.php | 7 +- tests/e2e/Services/Project/SMTPBase.php | 116 +++++++++++++++++- tests/e2e/Services/Project/TemplatesBase.php | 53 ++++++++ 4 files changed, 180 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php index 97e723f52c..47a533ebf9 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php @@ -60,12 +60,12 @@ class Update extends Action )) ->param('host', null, new Nullable(new Hostname()), 'SMTP server hostname (domain)', optional: true) ->param('port', null, new Nullable(new Integer()), 'SMTP server port', optional: true) - ->param('username', null, new Nullable(new Text(256)), 'SMTP server username. Leave empty for no authorization.', optional: true) - ->param('password', null, new Nullable(new Text(256)), 'SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).', optional: true) - ->param('senderEmail', null, new Nullable(new Email()), 'Email address shown in inbox as the sender of the email.', optional: true) - ->param('senderName', null, new Nullable(new Text(256)), 'Name shown in inbox as the sender of the email.', optional: true) - ->param('replyToEmail', null, new Nullable(new Email()), 'Email used when user replies to the email.', optional: true) - ->param('replyToName', null, new Nullable(new Text(256)), 'Name used when user replies to the email.', optional: true) + ->param('username', null, new Nullable(new Text(256, 0)), 'SMTP server username. Pass an empty string to clear a previously set value.', optional: true) + ->param('password', null, new Nullable(new Text(256, 0)), 'SMTP server password. Pass an empty string to clear a previously set value. This property is stored securely and cannot be read in future (write-only).', optional: true) + ->param('senderEmail', null, new Nullable(new Email(allowEmpty: true)), 'Email address shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.', optional: true) + ->param('senderName', null, new Nullable(new Text(256, 0)), 'Name shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.', optional: true) + ->param('replyToEmail', null, new Nullable(new Email(allowEmpty: true)), 'Email used when user replies to the email. Pass an empty string to clear a previously set value.', optional: true) + ->param('replyToName', null, new Nullable(new Text(256, 0)), 'Name used when user replies to the email. Pass an empty string to clear a previously set value.', optional: true) ->param('secure', null, new Nullable(new WhiteList(['tls', 'ssl'], true)), 'Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.', optional: true) ->param('enabled', null, new Nullable(new Boolean()), 'Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.', optional: true) ->inject('response') @@ -95,7 +95,8 @@ class Update extends Action // Fetch current configuration $smtp = $project->getAttribute('smtp', []); - // Apply changes + // Apply changes — null means "not provided, keep existing". + // Empty string explicitly clears a previously-set value. $keys = ['host', 'port', 'username', 'password', 'senderEmail', 'senderName', 'replyToEmail', 'replyToName', 'secure', 'enabled']; foreach ($keys as $key) { if (!\is_null(${$key})) { @@ -119,8 +120,9 @@ class Update extends Action // Validate SMTP credentials // Validate when the caller is explicitly enabling or hasn't expressed a preference // (so a credentials-only PATCH can auto-enable). Skip only when the caller is - // explicitly keeping/turning SMTP off. - if (\is_null($enabled) || $enabled === true) { + // explicitly keeping/turning SMTP off, or when senderEmail is not yet configured + // (no valid From address means no connection test is possible). + if ((\is_null($enabled) || $enabled === true) && !empty($smtp['senderEmail'] ?? '')) { $mail = new PHPMailer(true); $mail->isSMTP(); diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/Update.php index ef93abf683..c9c64ebdfa 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/Update.php @@ -61,8 +61,8 @@ class Update extends Action ->param('subject', null, new Nullable(new Text(255)), 'Subject of the email template. Can be up to 255 characters.', optional: true) ->param('message', null, new Nullable(new Text(10485760)), 'Plain or HTML body of the email template message. Can be up to 10MB of content.', optional: true) ->param('senderName', null, new Nullable(new Text(255, 0)), 'Name of the email sender.', optional: true) - ->param('senderEmail', null, new Nullable(new Email()), 'Email of the sender.', optional: true) - ->param('replyToEmail', null, new Nullable(new Email()), 'Reply to email.', optional: true) + ->param('senderEmail', null, new Nullable(new Email(allowEmpty: true)), 'Email of the sender. Pass an empty string to clear a previously set value.', optional: true) + ->param('replyToEmail', null, new Nullable(new Email(allowEmpty: true)), 'Reply to email. Pass an empty string to clear a previously set value.', optional: true) ->param('replyToName', null, new Nullable(new Text(255, 0)), 'Reply to name.', optional: true) ->inject('response') ->inject('queueForEvents') @@ -99,7 +99,8 @@ class Update extends Action $templates = $project->getAttribute('templates', []); $template = $templates['email.' . $templateId . '-' . $locale] ?? []; - // Apply changes + // Apply changes — null means "not provided, keep existing". + // Empty string explicitly clears a previously-set value. $keys = ['senderName', 'senderEmail', 'replyToEmail', 'replyToName', 'message', 'subject']; foreach ($keys as $key) { if (!\is_null(${$key})) { diff --git a/tests/e2e/Services/Project/SMTPBase.php b/tests/e2e/Services/Project/SMTPBase.php index 748fb3502b..19355bdce0 100644 --- a/tests/e2e/Services/Project/SMTPBase.php +++ b/tests/e2e/Services/Project/SMTPBase.php @@ -294,6 +294,7 @@ trait SMTPBase public function testUpdateSMTPEmptySenderName(): void { + // Empty sender name is valid — PHPMailer accepts '' as display name. $response = $this->updateSMTP( senderName: '', senderEmail: 'sender@example.com', @@ -301,11 +302,17 @@ trait SMTPBase port: 1025, ); - $this->assertSame(400, $response['headers']['status-code']); + $this->assertSame(200, $response['headers']['status-code']); + $this->assertSame('', $response['body']['smtpSenderName']); + + // Cleanup + $this->updateSMTP(enabled: false); } public function testUpdateSMTPEmptySenderEmail(): void { + // Empty senderEmail clears the stored value; connection test is skipped when + // there is no valid From address, so this is accepted even without enabled=false. $response = $this->updateSMTP( senderName: 'Test', senderEmail: '', @@ -313,7 +320,11 @@ trait SMTPBase port: 1025, ); - $this->assertSame(400, $response['headers']['status-code']); + $this->assertSame(200, $response['headers']['status-code']); + $this->assertSame('', $response['body']['smtpSenderEmail']); + + // Cleanup + $this->updateSMTP(enabled: false); } public function testUpdateSMTPEmptyHost(): void @@ -353,6 +364,59 @@ trait SMTPBase $this->assertSame(400, $response['headers']['status-code']); } + public function testUpdateSMTPReplyToEmailCanBeCleared(): void + { + // Step 1: Set a custom replyToEmail. + $set = $this->updateSMTP( + senderName: 'Test Sender', + senderEmail: 'sender@example.com', + host: 'maildev', + port: 1025, + replyToEmail: 'reply@example.com', + ); + $this->assertSame(200, $set['headers']['status-code']); + $this->assertSame('reply@example.com', $set['body']['smtpReplyToEmail']); + + // Step 2: Clear it with an empty string. + $clear = $this->updateSMTP(replyToEmail: ''); + $this->assertSame(200, $clear['headers']['status-code']); + $this->assertSame('', $clear['body']['smtpReplyToEmail']); + + // Step 3: Verify the cleared value persists. + $verify = $this->updateSMTP(); + $this->assertSame(200, $verify['headers']['status-code']); + $this->assertSame('', $verify['body']['smtpReplyToEmail']); + + // Cleanup + $this->updateSMTP(enabled: false); + } + + public function testUpdateSMTPSenderEmailCanBeClearedWhenDisabled(): void + { + // Step 1: Configure SMTP with a sender email, then disable it. + $this->updateSMTP( + senderName: 'Test Sender', + senderEmail: 'sender@example.com', + host: 'maildev', + port: 1025, + enabled: false, + ); + + // Step 2: Clear senderEmail while keeping SMTP disabled. + // enabled=false skips the PHPMailer connection check so empty senderEmail is valid. + $clear = $this->updateSMTP( + senderEmail: '', + enabled: false, + ); + $this->assertSame(200, $clear['headers']['status-code']); + $this->assertSame('', $clear['body']['smtpSenderEmail']); + + // Step 3: Verify the cleared value persists. + $verify = $this->updateSMTP(enabled: false); + $this->assertSame(200, $verify['headers']['status-code']); + $this->assertSame('', $verify['body']['smtpSenderEmail']); + } + public function testUpdateSMTPInvalidSecure(): void { $response = $this->updateSMTP( @@ -461,6 +525,7 @@ trait SMTPBase public function testUpdateSMTPUsernameEmpty(): void { + // Empty string clears a previously-set username (no-auth SMTP). $response = $this->updateSMTP( senderName: 'Test', senderEmail: 'sender@example.com', @@ -469,7 +534,11 @@ trait SMTPBase username: '', ); - $this->assertSame(400, $response['headers']['status-code']); + $this->assertSame(200, $response['headers']['status-code']); + $this->assertSame('', $response['body']['smtpUsername']); + + // Cleanup + $this->updateSMTP(enabled: false); } public function testUpdateSMTPPasswordMinLength(): void @@ -524,6 +593,7 @@ trait SMTPBase public function testUpdateSMTPPasswordEmpty(): void { + // Empty string clears a previously-set password (no-auth SMTP). $response = $this->updateSMTP( senderName: 'Test', senderEmail: 'sender@example.com', @@ -532,7 +602,45 @@ trait SMTPBase password: '', ); - $this->assertSame(400, $response['headers']['status-code']); + $this->assertSame(200, $response['headers']['status-code']); + // smtpPassword is write-only and never echoed back. + $this->assertSame('', $response['body']['smtpPassword']); + + // Cleanup + $this->updateSMTP(enabled: false); + } + + public function testUpdateSMTPCredentialsCanBeCleared(): void + { + // Step 1: Set username and password. + $set = $this->updateSMTP( + senderName: 'Test Sender', + senderEmail: 'sender@example.com', + host: 'maildev', + port: 1025, + username: 'myuser', + password: 'mypassword', + ); + $this->assertSame(200, $set['headers']['status-code']); + $this->assertSame('myuser', $set['body']['smtpUsername']); + + // Step 2: Clear both credentials by passing empty strings. + $clear = $this->updateSMTP( + username: '', + password: '', + ); + $this->assertSame(200, $clear['headers']['status-code']); + $this->assertSame('', $clear['body']['smtpUsername']); + // smtpPassword is write-only and never echoed back regardless. + $this->assertSame('', $clear['body']['smtpPassword']); + + // Step 3: Verify the cleared username persists (a no-params PATCH must not restore it). + $verify = $this->updateSMTP(); + $this->assertSame(200, $verify['headers']['status-code']); + $this->assertSame('', $verify['body']['smtpUsername']); + + // Cleanup + $this->updateSMTP(enabled: false); } public function testUpdateSMTPWithoutSecure(): void diff --git a/tests/e2e/Services/Project/TemplatesBase.php b/tests/e2e/Services/Project/TemplatesBase.php index 11dc6dc80b..9e329dfc3b 100644 --- a/tests/e2e/Services/Project/TemplatesBase.php +++ b/tests/e2e/Services/Project/TemplatesBase.php @@ -548,6 +548,59 @@ trait TemplatesBase $this->assertSame(401, $response['headers']['status-code']); } + public function testUpdateEmailTemplateSenderFieldsCanBeCleared(): void + { + $this->ensureSMTPEnabled(); + + // Step 1: Set a custom en verification template with sender and reply-to fields. + $first = $this->updateEmailTemplate( + templateId: 'verification', + locale: 'en', + subject: 'Verify your email', + message: 'Please verify: {{url}}', + senderName: 'Custom Sender', + senderEmail: 'custom-sender@appwrite.io', + replyToName: 'Custom Reply', + replyToEmail: 'custom-reply@appwrite.io', + ); + $this->assertSame(200, $first['headers']['status-code']); + $this->assertSame('Custom Sender', $first['body']['senderName']); + $this->assertSame('custom-sender@appwrite.io', $first['body']['senderEmail']); + $this->assertSame('Custom Reply', $first['body']['replyToName']); + $this->assertSame('custom-reply@appwrite.io', $first['body']['replyToEmail']); + + // Step 2: GET en verification template and ensure it reflects the custom values. + $get = $this->getEmailTemplate('verification', 'en'); + $this->assertSame(200, $get['headers']['status-code']); + $this->assertSame('Custom Sender', $get['body']['senderName']); + $this->assertSame('custom-sender@appwrite.io', $get['body']['senderEmail']); + $this->assertSame('Custom Reply', $get['body']['replyToName']); + $this->assertSame('custom-reply@appwrite.io', $get['body']['replyToEmail']); + + // Step 3: Update the same template, clearing sender and reply-to fields to empty strings. + $clear = $this->updateEmailTemplate( + templateId: 'verification', + locale: 'en', + senderName: '', + senderEmail: '', + replyToName: '', + replyToEmail: '', + ); + $this->assertSame(200, $clear['headers']['status-code']); + $this->assertSame('', $clear['body']['senderName']); + $this->assertSame('', $clear['body']['senderEmail']); + $this->assertSame('', $clear['body']['replyToName']); + $this->assertSame('', $clear['body']['replyToEmail']); + + // Step 4: GET again to confirm the cleared values persist. + $getAfter = $this->getEmailTemplate('verification', 'en'); + $this->assertSame(200, $getAfter['headers']['status-code']); + $this->assertSame('', $getAfter['body']['senderName']); + $this->assertSame('', $getAfter['body']['senderEmail']); + $this->assertSame('', $getAfter['body']['replyToName']); + $this->assertSame('', $getAfter['body']['replyToEmail']); + } + public function testUpdateEmailTemplateBlockedWhenSMTPDisabled(): void { // Custom templates only make sense alongside a custom SMTP configuration. From f7b09c090bab61ab2a5ba3ada9d7d102e930c352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= <matejbaco2000@gmail.com> Date: Tue, 19 May 2026 15:23:34 +0200 Subject: [PATCH 175/192] Fix subspan ending main request span --- src/Utopia/Bus/Bus.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Utopia/Bus/Bus.php b/src/Utopia/Bus/Bus.php index bef39f0481..d0a6d213a7 100644 --- a/src/Utopia/Bus/Bus.php +++ b/src/Utopia/Bus/Bus.php @@ -37,14 +37,19 @@ class Bus foreach ($listeners as $listener) { $deps = array_map($resolver, $listener->getInjections()); - Span::init('listener.' . $listener::getName()); - Span::add('bus.event', $event::class); + + Span::current()?->add('listener.' . $listener::getName() . '.event', $event::class); + try { ($listener->getCallback())($event, ...$deps); + Span::current()?->add('listener.' . $listener::getName() . '.success', true); } catch (\Throwable $e) { - Span::error($e); - } finally { - Span::current()?->finish(); + Span::current()?->add('listener.' . $listener::getName() . '.success', false); + Span::current()?->add('listener.' . $listener::getName() . '.error.code', $e->getCode()); + Span::current()?->add('listener.' . $listener::getName() . '.error.message', $e->getMessage()); + Span::current()?->add('listener.' . $listener::getName() . '.error.line', $e->getLine()); + Span::current()?->add('listener.' . $listener::getName() . '.error.file', $e->getFile()); + Span::current()?->add('listener.' . $listener::getName() . '.error.trace', $e->getTraceAsString()); } } } From 90df8efe0ac8b99c1bee9a78fa7dec594a003a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= <matejbaco2000@gmail.com> Date: Tue, 19 May 2026 15:50:48 +0200 Subject: [PATCH 176/192] Formatting fix --- src/Utopia/Bus/Bus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utopia/Bus/Bus.php b/src/Utopia/Bus/Bus.php index d0a6d213a7..2debb22f98 100644 --- a/src/Utopia/Bus/Bus.php +++ b/src/Utopia/Bus/Bus.php @@ -39,7 +39,7 @@ class Bus $deps = array_map($resolver, $listener->getInjections()); Span::current()?->add('listener.' . $listener::getName() . '.event', $event::class); - + try { ($listener->getCallback())($event, ...$deps); Span::current()?->add('listener.' . $listener::getName() . '.success', true); From cc51f4243081efaa70cf9dfac87648e1d9f58195 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 11:40:23 +0530 Subject: [PATCH 177/192] fix: allow SMTP connection test without senderEmail --- .../Modules/Project/Http/Project/SMTP/Update.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php index 47a533ebf9..3b73c7b1d8 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php @@ -120,16 +120,18 @@ class Update extends Action // Validate SMTP credentials // Validate when the caller is explicitly enabling or hasn't expressed a preference // (so a credentials-only PATCH can auto-enable). Skip only when the caller is - // explicitly keeping/turning SMTP off, or when senderEmail is not yet configured - // (no valid From address means no connection test is possible). - if ((\is_null($enabled) || $enabled === true) && !empty($smtp['senderEmail'] ?? '')) { + // explicitly keeping/turning SMTP off. + if (\is_null($enabled) || $enabled === true) { $mail = new PHPMailer(true); $mail->isSMTP(); $mail->Host = $smtp['host'] ?? ''; $mail->Port = $smtp['port'] ?? ''; $mail->SMTPSecure = $smtp['secure'] ?? ''; - $mail->setFrom($smtp['senderEmail'], $smtp['senderName'] ?? ''); + + if (!empty($smtp['senderEmail'] ?? '')) { + $mail->setFrom($smtp['senderEmail'], $smtp['senderName'] ?? ''); + } if (!empty($smtp['username'] ?? '')) { $mail->SMTPAuth = true; From 1d9acf5f29bb539a3699a4347d02b861bfbdeb7a Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Wed, 20 May 2026 14:03:20 +0530 Subject: [PATCH 178/192] Fix account SDK specs auth --- app/controllers/api/account.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index e12263a009..c7da65f818 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1239,7 +1239,6 @@ Http::get('/v1/account/sessions/oauth2/:provider') ) ], contentType: ContentType::HTML, - hide: [APP_SDK_PLATFORM_SERVER], )) ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') @@ -4515,7 +4514,7 @@ Http::post('/v1/account/targets/push') group: 'pushTargets', name: 'createPushTarget', description: '/docs/references/account/create-push-target.md', - auth: [AuthType::ADMIN, AuthType::SESSION], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: Response::STATUS_CODE_CREATED, @@ -4599,7 +4598,7 @@ Http::put('/v1/account/targets/:targetId/push') group: 'pushTargets', name: 'updatePushTarget', description: '/docs/references/account/update-push-target.md', - auth: [AuthType::ADMIN, AuthType::SESSION], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -4669,7 +4668,7 @@ Http::delete('/v1/account/targets/:targetId/push') group: 'pushTargets', name: 'deletePushTarget', description: '/docs/references/account/delete-push-target.md', - auth: [AuthType::ADMIN, AuthType::SESSION], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: Response::STATUS_CODE_NOCONTENT, From 0d1989433169f443a8421e2bed715102f2a36e1e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Wed, 20 May 2026 14:09:07 +0530 Subject: [PATCH 179/192] Move Web SDK to server platform --- app/config/sdks.php | 98 ++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/app/config/sdks.php b/app/config/sdks.php index e29b28690f..36a973167d 100644 --- a/app/config/sdks.php +++ b/app/config/sdks.php @@ -8,55 +8,6 @@ return [ 'enabled' => true, 'beta' => false, 'sdks' => [ - [ - 'key' => 'web', - 'name' => 'Web', - 'version' => '22.4.0', - 'url' => 'https://github.com/appwrite/sdk-for-web', - 'package' => 'https://www.npmjs.com/package/appwrite', - 'enabled' => true, - 'beta' => false, - 'dev' => false, - 'hidden' => false, - 'family' => APP_SDK_PLATFORM_CLIENT, - 'prism' => 'javascript', - 'source' => \realpath(__DIR__ . '/../sdks/client-web'), - 'gitUrl' => 'git@github.com:appwrite/sdk-for-web.git', - 'gitRepoName' => 'sdk-for-web', - 'gitUserName' => 'appwrite', - 'gitBranch' => 'dev', - 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/web/CHANGELOG.md'), - 'demos' => [ - [ - 'icon' => 'react.svg', - 'name' => 'Todo App with React JS', - 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', - 'source' => 'https://github.com/appwrite/todo-with-react', - 'url' => 'https://appwrite-todo-with-react.vercel.app/', - ], - [ - 'icon' => 'vue.svg', - 'name' => 'Todo App with Vue JS', - 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', - 'source' => 'https://github.com/appwrite/todo-with-vue', - 'url' => 'https://appwrite-todo-with-vue.vercel.app/', - ], - [ - 'icon' => 'angular.svg', - 'name' => 'Todo App with Angular', - 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', - 'source' => 'https://github.com/appwrite/todo-with-angular', - 'url' => 'https://appwrite-todo-with-angular.vercel.app/', - ], - [ - 'icon' => 'svelte.svg', - 'name' => 'Todo App with Svelte', - 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', - 'source' => 'https://github.com/appwrite/todo-with-svelte', - 'url' => 'https://appwrite-todo-with-svelte.vercel.app/', - ], - ] - ], [ 'key' => 'flutter', 'name' => 'Flutter', @@ -350,6 +301,55 @@ return [ 'enabled' => true, 'beta' => false, 'sdks' => [ + [ + 'key' => 'web', + 'name' => 'Web', + 'version' => '22.4.0', + 'url' => 'https://github.com/appwrite/sdk-for-web', + 'package' => 'https://www.npmjs.com/package/appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_SDK_PLATFORM_SERVER, + 'prism' => 'javascript', + 'source' => \realpath(__DIR__ . '/../sdks/client-web'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-web.git', + 'gitRepoName' => 'sdk-for-web', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/web/CHANGELOG.md'), + 'demos' => [ + [ + 'icon' => 'react.svg', + 'name' => 'Todo App with React JS', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-react', + 'url' => 'https://appwrite-todo-with-react.vercel.app/', + ], + [ + 'icon' => 'vue.svg', + 'name' => 'Todo App with Vue JS', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-vue', + 'url' => 'https://appwrite-todo-with-vue.vercel.app/', + ], + [ + 'icon' => 'angular.svg', + 'name' => 'Todo App with Angular', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-angular', + 'url' => 'https://appwrite-todo-with-angular.vercel.app/', + ], + [ + 'icon' => 'svelte.svg', + 'name' => 'Todo App with Svelte', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-svelte', + 'url' => 'https://appwrite-todo-with-svelte.vercel.app/', + ], + ] + ], [ 'key' => 'nodejs', 'name' => 'Node.js', From 515696dd36d05a54a64358e0fd13f4acb61d8bfd Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Wed, 20 May 2026 14:38:14 +0530 Subject: [PATCH 180/192] Fix generated spec endpoint and enum defaults --- .../Modules/Avatars/Http/Screenshots/Get.php | 2 +- src/Appwrite/SDK/Specification/Format.php | 14 ++++++++++++++ .../SDK/Specification/Format/OpenAPI3.php | 15 +++++++++++++-- .../SDK/Specification/Format/Swagger2.php | 10 ++++++++-- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php index c43c0fc4bf..f33bfa938a 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Screenshots/Get.php @@ -72,7 +72,7 @@ class Get extends Action ->param('userAgent', '', new Text(512), 'Custom user agent string. Defaults to browser default.', true, example: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15') ->param('fullpage', false, new Boolean(true), 'Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.', true, example: 'true') ->param('locale', '', new Text(10), 'Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.', true, example: 'en-US') - ->param('timezone', '', new WhiteList(timezone_identifiers_list()), 'IANA timezone identifier (e.g., "America/New_York", "Europe/London"). Defaults to browser default.', true, example: 'america/new_york') + ->param('timezone', '', new WhiteList(timezone_identifiers_list()), 'IANA timezone identifier (e.g., "America/New_York", "Europe/London"). Defaults to browser default.', true, example: 'America/New_York') ->param('latitude', 0, new Range(-90, 90, Range::TYPE_FLOAT), 'Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.', true, example: '37.7749') ->param('longitude', 0, new Range(-180, 180, Range::TYPE_FLOAT), 'Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.', true, example: '-122.4194') ->param('accuracy', 0, new Range(0, 100000, Range::TYPE_FLOAT), 'Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.', true, example: '100') diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 60884323c7..0cbd83cf3f 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -29,6 +29,7 @@ abstract class Format 'name' => '', 'description' => '', 'endpoint' => 'https://localhost', + 'endpoint.docs' => 'https://<REGION>.cloud.appwrite.io/v1', 'version' => '1.0.0', 'terms' => '', 'support.email' => '', @@ -1032,6 +1033,19 @@ abstract class Format return $values; } + protected function shouldEmitDefaultForSchema(mixed $default, array $schema): bool + { + if (isset($schema['enum'])) { + return \in_array($default, $schema['enum'], true); + } + + if (isset($schema['items']['enum'])) { + return \is_array($default) && empty(\array_diff($default, $schema['items']['enum'])); + } + + return true; + } + protected function getRequestParameterConfig(string $service, string $method, string $param, bool $optional, bool $nullable, mixed $default): array { $config = [ diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 5fb13e853f..117fb5e321 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -55,11 +55,22 @@ class OpenAPI3 extends Format 'servers' => [ [ 'url' => $this->getParam('endpoint', ''), + 'description' => 'Appwrite Cloud endpoint.', ], [ - 'url' => $this->getParam('endpoint.docs', ''), + 'url' => \str_replace('<REGION>', '{region}', $this->getParam('endpoint.docs', '')), + 'description' => 'Appwrite Cloud regional endpoint. Replace `{region}` with your project region.', + 'variables' => [ + 'region' => [ + 'default' => 'fra', + 'description' => 'Appwrite Cloud region.', + ], + ], ], ], + 'x-appwrite' => [ + 'endpointDocs' => $this->getParam('endpoint.docs', ''), + ], 'paths' => [], 'tags' => $this->services, 'components' => [ @@ -768,7 +779,7 @@ class OpenAPI3 extends Format break; } - if ($parameter['emitDefault']) { // Param has default value + if ($parameter['emitDefault'] && $this->shouldEmitDefaultForSchema($param['default'], $node['schema'])) { // Param has default value $node['schema']['default'] = $param['default']; } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index df6cb5bf3a..f0cd52bf99 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -55,6 +55,9 @@ class Swagger2 extends Format ], 'host' => \parse_url($this->getParam('endpoint', ''), PHP_URL_HOST), 'x-host-docs' => \parse_url($this->getParam('endpoint.docs', ''), PHP_URL_HOST), + 'x-appwrite' => [ + 'endpointDocs' => $this->getParam('endpoint.docs', ''), + ], 'basePath' => \parse_url($this->getParam('endpoint', ''), PHP_URL_PATH), 'schemes' => [\parse_url($this->getParam('endpoint', ''), PHP_URL_SCHEME)], 'consumes' => ['application/json', 'multipart/form-data'], @@ -731,7 +734,7 @@ class Swagger2 extends Format break; } - if ($parameter['emitDefault']) { // Param has default value + if ($parameter['emitDefault'] && $this->shouldEmitDefaultForSchema($param['default'], $node)) { // Param has default value $node['default'] = $param['default']; } @@ -767,10 +770,13 @@ class Swagger2 extends Format $body['schema']['properties'][$name] = [ 'type' => $node['type'], 'description' => $node['description'], - 'default' => $node['default'] ?? null, 'x-example' => $node['x-example'] ?? null, ]; + if (\array_key_exists('default', $node)) { + $body['schema']['properties'][$name]['default'] = $node['default']; + } + if (isset($node['format'])) { $body['schema']['properties'][$name]['format'] = $node['format']; } From 43b9bf8152acd7f8024eb953080d582b678db48d Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 16:25:04 +0530 Subject: [PATCH 181/192] fix: remove redundant senderEmail empty check before setFrom --- .../Platform/Modules/Project/Http/Project/SMTP/Update.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php index 3b73c7b1d8..dd1834e9bc 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php @@ -128,10 +128,7 @@ class Update extends Action $mail->Host = $smtp['host'] ?? ''; $mail->Port = $smtp['port'] ?? ''; $mail->SMTPSecure = $smtp['secure'] ?? ''; - - if (!empty($smtp['senderEmail'] ?? '')) { - $mail->setFrom($smtp['senderEmail'], $smtp['senderName'] ?? ''); - } + $mail->setFrom($smtp['senderEmail'] ?? '', $smtp['senderName'] ?? ''); if (!empty($smtp['username'] ?? '')) { $mail->SMTPAuth = true; From 8272aa6fa27904f929ee06b95deed41acbd42972 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 16:27:52 +0530 Subject: [PATCH 182/192] fix: remove unnecessary null coalescing on senderEmail --- .../Platform/Modules/Project/Http/Project/SMTP/Update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php index dd1834e9bc..ef2e478d96 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php @@ -128,7 +128,7 @@ class Update extends Action $mail->Host = $smtp['host'] ?? ''; $mail->Port = $smtp['port'] ?? ''; $mail->SMTPSecure = $smtp['secure'] ?? ''; - $mail->setFrom($smtp['senderEmail'] ?? '', $smtp['senderName'] ?? ''); + $mail->setFrom($smtp['senderEmail'], $smtp['senderName'] ?? ''); if (!empty($smtp['username'] ?? '')) { $mail->SMTPAuth = true; From d397ab9b40e44fbdccca62e813e871aad4010e69 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 16:33:20 +0530 Subject: [PATCH 183/192] chore: update composer dependencies --- composer.lock | 134 +++++++++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 61 deletions(-) diff --git a/composer.lock b/composer.lock index 1d71d75447..80af00a95d 100644 --- a/composer.lock +++ b/composer.lock @@ -3615,16 +3615,16 @@ }, { "name": "utopia-php/cache", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "ece1f4d11ec2804cd7e05b9717dc7a2bc66e4176" + "reference": "086687d7ae23dd1dae67b943161e8cef143539e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/ece1f4d11ec2804cd7e05b9717dc7a2bc66e4176", - "reference": "ece1f4d11ec2804cd7e05b9717dc7a2bc66e4176", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/086687d7ae23dd1dae67b943161e8cef143539e1", + "reference": "086687d7ae23dd1dae67b943161e8cef143539e1", "shasum": "" }, "require": { @@ -3663,9 +3663,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/3.0.0" + "source": "https://github.com/utopia-php/cache/tree/3.0.2" }, - "time": "2026-05-14T14:13:17+00:00" + "time": "2026-05-19T22:38:16+00:00" }, { "name": "utopia-php/circuit-breaker", @@ -4079,16 +4079,16 @@ }, { "name": "utopia-php/dns", - "version": "1.7.0", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/utopia-php/dns.git", - "reference": "90bf1bc4a51ceca93590d09e7365317b28d1eb89" + "reference": "5225f52a82d4128e69ad17c2a81fcfea6aa00ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dns/zipball/90bf1bc4a51ceca93590d09e7365317b28d1eb89", - "reference": "90bf1bc4a51ceca93590d09e7365317b28d1eb89", + "url": "https://api.github.com/repos/utopia-php/dns/zipball/5225f52a82d4128e69ad17c2a81fcfea6aa00ae1", + "reference": "5225f52a82d4128e69ad17c2a81fcfea6aa00ae1", "shasum": "" }, "require": { @@ -4099,9 +4099,9 @@ "utopia-php/validators": "0.*" }, "require-dev": { - "laravel/pint": "1.25.*", + "laravel/pint": "1.29.*", "phpstan/phpstan": "2.0.*", - "phpunit/phpunit": "12.4.*", + "phpunit/phpunit": "12.5.*", "swoole/ide-helper": "5.1.8" }, "type": "library", @@ -4130,9 +4130,9 @@ ], "support": { "issues": "https://github.com/utopia-php/dns/issues", - "source": "https://github.com/utopia-php/dns/tree/1.7.0" + "source": "https://github.com/utopia-php/dns/tree/1.7.2" }, - "time": "2026-05-13T07:11:31+00:00" + "time": "2026-05-20T04:49:11+00:00" }, { "name": "utopia-php/domains", @@ -4606,16 +4606,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.22.2", + "version": "0.22.3", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "f99feceab575243f3a86ee2e90cd1a6407805def" + "reference": "67366d5f45cc92efe7adb6aab5d6dcd2342f2f9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/f99feceab575243f3a86ee2e90cd1a6407805def", - "reference": "f99feceab575243f3a86ee2e90cd1a6407805def", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/67366d5f45cc92efe7adb6aab5d6dcd2342f2f9e", + "reference": "67366d5f45cc92efe7adb6aab5d6dcd2342f2f9e", "shasum": "" }, "require": { @@ -4651,9 +4651,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.22.2" + "source": "https://github.com/utopia-php/messaging/tree/0.22.3" }, - "time": "2026-05-14T08:51:26+00:00" + "time": "2026-05-19T05:31:20+00:00" }, { "name": "utopia-php/migration", @@ -5638,16 +5638,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.29.5", + "version": "1.30.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "e670edcdfb9ffcec36125b1eb3e4473dce30b620" + "reference": "9e43d7966f37b4fdf374c08107c07104626f5191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/e670edcdfb9ffcec36125b1eb3e4473dce30b620", - "reference": "e670edcdfb9ffcec36125b1eb3e4473dce30b620", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/9e43d7966f37b4fdf374c08107c07104626f5191", + "reference": "9e43d7966f37b4fdf374c08107c07104626f5191", "shasum": "" }, "require": { @@ -5683,9 +5683,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.29.5" + "source": "https://github.com/appwrite/sdk-generator/tree/1.30.1" }, - "time": "2026-05-15T06:49:05+00:00" + "time": "2026-05-19T05:14:06+00:00" }, { "name": "brianium/paratest", @@ -6394,11 +6394,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.54", + "version": "2.1.55", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8be50c3992107dc837b17da4d140fbbdf9a5c5bd", - "reference": "8be50c3992107dc837b17da4d140fbbdf9a5c5bd", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9eaac3826ed5e9b8427350a43cac825eeca3f566", + "reference": "9eaac3826ed5e9b8427350a43cac825eeca3f566", "shasum": "" }, "require": { @@ -6443,7 +6443,7 @@ "type": "github" } ], - "time": "2026-04-29T13:31:09+00:00" + "time": "2026-05-18T11:57:34+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6882,23 +6882,23 @@ }, { "name": "sebastian/cli-parser", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" + "reference": "7d05781b13f7dec9043a629a21d086ed74582a15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7d05781b13f7dec9043a629a21d086ed74582a15", + "reference": "7d05781b13f7dec9043a629a21d086ed74582a15", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -6927,7 +6927,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.1" }, "funding": [ { @@ -6947,7 +6947,7 @@ "type": "tidelift" } ], - "time": "2025-09-14T09:36:45+00:00" + "time": "2026-05-17T05:29:34+00:00" }, { "name": "sebastian/comparator", @@ -7244,25 +7244,25 @@ }, { "name": "sebastian/exporter", - "version": "7.0.2", + "version": "7.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7" + "reference": "c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23", + "reference": "c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23", "shasum": "" }, "require": { "ext-mbstring": "*", "php": ">=8.3", - "sebastian/recursion-context": "^7.0" + "sebastian/recursion-context": "^7.0.1" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -7310,7 +7310,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.3" }, "funding": [ { @@ -7330,7 +7330,7 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:16:11+00:00" + "time": "2026-05-20T04:37:17+00:00" }, { "name": "sebastian/global-state", @@ -7408,24 +7408,24 @@ }, { "name": "sebastian/lines-of-code", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" + "reference": "d543b8ef219dcd8da262cbb958639a96bedba10e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d543b8ef219dcd8da262cbb958639a96bedba10e", + "reference": "d543b8ef219dcd8da262cbb958639a96bedba10e", "shasum": "" }, "require": { - "nikic/php-parser": "^5.0", + "nikic/php-parser": "^5.7.0", "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -7454,15 +7454,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/lines-of-code", + "type": "tidelift" } ], - "time": "2025-02-07T04:57:28+00:00" + "time": "2026-05-19T16:22:07+00:00" }, { "name": "sebastian/object-enumerator", @@ -7656,23 +7668,23 @@ }, { "name": "sebastian/type", - "version": "6.0.3", + "version": "6.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d" + "reference": "82ff822c2edc46724be9f7411d3163021f602773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/82ff822c2edc46724be9f7411d3163021f602773", + "reference": "82ff822c2edc46724be9f7411d3163021f602773", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -7701,7 +7713,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/6.0.3" + "source": "https://github.com/sebastianbergmann/type/tree/6.0.4" }, "funding": [ { @@ -7721,7 +7733,7 @@ "type": "tidelift" } ], - "time": "2025-08-09T06:57:12+00:00" + "time": "2026-05-20T06:45:45+00:00" }, { "name": "sebastian/version", @@ -8537,7 +8549,7 @@ }, { "name": "twig/twig", - "version": "v3.14.2", + "version": "3.14.x-dev", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", From a3fca62818f09c517458b33eb91dcbf724052e78 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 16:45:17 +0530 Subject: [PATCH 184/192] chore: bump twig/twig to ^3.26 to fix security advisories --- composer.json | 1 + composer.lock | 125 ++++++++++---------------------------------------- 2 files changed, 24 insertions(+), 102 deletions(-) diff --git a/composer.json b/composer.json index d4472c6868..7d4c285dbf 100644 --- a/composer.json +++ b/composer.json @@ -101,6 +101,7 @@ "require-dev": { "ext-fileinfo": "*", "appwrite/sdk-generator": "*", + "twig/twig": "^3.26", "brianium/paratest": "7.*", "phpunit/phpunit": "12.*", "swoole/ide-helper": "6.*", diff --git a/composer.lock b/composer.lock index 80af00a95d..d47e353039 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": "b645c7da1728536497fe8186b158f9c6", + "content-hash": "bef01ba77dd48b8627d1d9966c67e694", "packages": [ { "name": "adhocore/jwt", @@ -5638,30 +5638,30 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.30.1", + "version": "0.36.4", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "9e43d7966f37b4fdf374c08107c07104626f5191" + "reference": "8d932098009d62d37dda73cfe4ebc11f83e21405" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/9e43d7966f37b4fdf374c08107c07104626f5191", - "reference": "9e43d7966f37b4fdf374c08107c07104626f5191", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8d932098009d62d37dda73cfe4ebc11f83e21405", + "reference": "8d932098009d62d37dda73cfe4ebc11f83e21405", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "matthiasmullie/minify": "1.3.*", - "php": ">=8.3", - "twig/twig": "3.14.*" + "matthiasmullie/minify": "^1.3.68", + "php": ">=8.0", + "twig/twig": "^3.4.1" }, "require-dev": { - "brianium/paratest": "7.*", - "phpunit/phpunit": "11.*", - "squizlabs/php_codesniffer": "3.*" + "brianium/paratest": "^6.4", + "phpunit/phpunit": "^9.5.21", + "squizlabs/php_codesniffer": "^3.6" }, "type": "library", "autoload": { @@ -5683,9 +5683,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.30.1" + "source": "https://github.com/appwrite/sdk-generator/tree/0.36.4" }, - "time": "2026-05-19T05:14:06+00:00" + "time": "2024-02-20T16:36:15+00:00" }, { "name": "brianium/paratest", @@ -8213,86 +8213,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php81", - "version": "v1.37.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/process", "version": "v8.0.11", @@ -8549,26 +8469,27 @@ }, { "name": "twig/twig", - "version": "3.14.x-dev", + "version": "v3.26.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" + "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", - "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/1fcae487b180d78e6351f4e0afa91f9eab96a2bc", + "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { + "php-cs-fixer/shim": "^3.0@stable", + "phpstan/phpstan": "^2.0@stable", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -8612,7 +8533,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.14.2" + "source": "https://github.com/twigphp/Twig/tree/v3.26.0" }, "funding": [ { @@ -8624,7 +8545,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T12:36:22+00:00" + "time": "2026-05-20T07:31:59+00:00" } ], "aliases": [], From 5473be57561043972790854e9e23c13ee86ccf75 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 16:56:56 +0530 Subject: [PATCH 185/192] chore: revert twig override, restore sdk-generator to 1.31.0 --- composer.json | 1 - composer.lock | 125 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 102 insertions(+), 24 deletions(-) diff --git a/composer.json b/composer.json index 7d4c285dbf..d4472c6868 100644 --- a/composer.json +++ b/composer.json @@ -101,7 +101,6 @@ "require-dev": { "ext-fileinfo": "*", "appwrite/sdk-generator": "*", - "twig/twig": "^3.26", "brianium/paratest": "7.*", "phpunit/phpunit": "12.*", "swoole/ide-helper": "6.*", diff --git a/composer.lock b/composer.lock index d47e353039..a954399162 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": "bef01ba77dd48b8627d1d9966c67e694", + "content-hash": "b645c7da1728536497fe8186b158f9c6", "packages": [ { "name": "adhocore/jwt", @@ -5638,30 +5638,30 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.36.4", + "version": "1.31.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "8d932098009d62d37dda73cfe4ebc11f83e21405" + "reference": "a7119db15696131a86d477b3bed348beda85523f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8d932098009d62d37dda73cfe4ebc11f83e21405", - "reference": "8d932098009d62d37dda73cfe4ebc11f83e21405", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/a7119db15696131a86d477b3bed348beda85523f", + "reference": "a7119db15696131a86d477b3bed348beda85523f", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "matthiasmullie/minify": "^1.3.68", - "php": ">=8.0", - "twig/twig": "^3.4.1" + "matthiasmullie/minify": "1.3.*", + "php": ">=8.3", + "twig/twig": "3.14.*" }, "require-dev": { - "brianium/paratest": "^6.4", - "phpunit/phpunit": "^9.5.21", - "squizlabs/php_codesniffer": "^3.6" + "brianium/paratest": "7.*", + "phpunit/phpunit": "11.*", + "squizlabs/php_codesniffer": "3.*" }, "type": "library", "autoload": { @@ -5683,9 +5683,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.36.4" + "source": "https://github.com/appwrite/sdk-generator/tree/1.31.0" }, - "time": "2024-02-20T16:36:15+00:00" + "time": "2026-05-20T11:16:09+00:00" }, { "name": "brianium/paratest", @@ -8213,6 +8213,86 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, { "name": "symfony/process", "version": "v8.0.11", @@ -8469,27 +8549,26 @@ }, { "name": "twig/twig", - "version": "v3.26.0", + "version": "3.14.x-dev", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc" + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/1fcae487b180d78e6351f4e0afa91f9eab96a2bc", - "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", "shasum": "" }, "require": { - "php": ">=8.1.0", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php81": "^1.29" }, "require-dev": { - "php-cs-fixer/shim": "^3.0@stable", - "phpstan/phpstan": "^2.0@stable", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -8533,7 +8612,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.26.0" + "source": "https://github.com/twigphp/Twig/tree/v3.14.2" }, "funding": [ { @@ -8545,7 +8624,7 @@ "type": "tidelift" } ], - "time": "2026-05-20T07:31:59+00:00" + "time": "2024-11-07T12:36:22+00:00" } ], "aliases": [], From a3ae9f39ec5c24d11772b99cfd9585878e51c867 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 23:40:41 +0530 Subject: [PATCH 186/192] Fix SMTP empty sender regressions --- .../Modules/Project/Http/Project/SMTP/Update.php | 2 +- .../Services/Projects/ProjectsConsoleClientTest.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php index ef2e478d96..b99a9db3c2 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php @@ -121,7 +121,7 @@ class Update extends Action // Validate when the caller is explicitly enabling or hasn't expressed a preference // (so a credentials-only PATCH can auto-enable). Skip only when the caller is // explicitly keeping/turning SMTP off. - if (\is_null($enabled) || $enabled === true) { + if ((\is_null($enabled) || $enabled === true) && !empty($smtp['senderEmail'] ?? '')) { $mail = new PHPMailer(true); $mail->isSMTP(); diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index aa5e6911f1..ec82d44b0c 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -1801,6 +1801,16 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('verification', $response['body']['type']); $this->assertEquals('en-us', $response['body']['locale']); + /** Ensure cached project state starts with SMTP disabled */ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-response-format' => '1.9.1', + ], $this->getHeaders()), [ + 'enabled' => false, + ]); + $this->assertEquals(200, $response['headers']['status-code']); + /** Update Email template, fail due to SMTP disabled */ $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([ 'content-type' => 'application/json', From 436064e7cc19d0f4086f394e8eb72e1dd03407a4 Mon Sep 17 00:00:00 2001 From: harsh mahajan <harshmahajan2345@gmail.com> Date: Wed, 20 May 2026 23:44:11 +0530 Subject: [PATCH 187/192] Revert test fixture change --- .../Services/Projects/ProjectsConsoleClientTest.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index ec82d44b0c..aa5e6911f1 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -1801,16 +1801,6 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals('verification', $response['body']['type']); $this->assertEquals('en-us', $response['body']['locale']); - /** Ensure cached project state starts with SMTP disabled */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-response-format' => '1.9.1', - ], $this->getHeaders()), [ - 'enabled' => false, - ]); - $this->assertEquals(200, $response['headers']['status-code']); - /** Update Email template, fail due to SMTP disabled */ $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([ 'content-type' => 'application/json', From 41ff2ed48e683d2d1adbad9fd9aedaab637c07b1 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 21 May 2026 10:37:36 +1200 Subject: [PATCH 188/192] chore: update lock --- composer.lock | 153 ++++++++++++-------------------------------------- 1 file changed, 37 insertions(+), 116 deletions(-) diff --git a/composer.lock b/composer.lock index a954399162..5be223d686 100644 --- a/composer.lock +++ b/composer.lock @@ -4245,16 +4245,16 @@ }, { "name": "utopia-php/emails", - "version": "0.7.0", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/utopia-php/emails.git", - "reference": "115e24aa908e2b1f06c7ff3b94434a0bdbed9107" + "reference": "a5f1d111e5023918731f2de96d348f5b6a0de143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/emails/zipball/115e24aa908e2b1f06c7ff3b94434a0bdbed9107", - "reference": "115e24aa908e2b1f06c7ff3b94434a0bdbed9107", + "url": "https://api.github.com/repos/utopia-php/emails/zipball/a5f1d111e5023918731f2de96d348f5b6a0de143", + "reference": "a5f1d111e5023918731f2de96d348f5b6a0de143", "shasum": "" }, "require": { @@ -4300,9 +4300,9 @@ ], "support": { "issues": "https://github.com/utopia-php/emails/issues", - "source": "https://github.com/utopia-php/emails/tree/0.7.0" + "source": "https://github.com/utopia-php/emails/tree/0.7.1" }, - "time": "2026-05-13T05:01:26+00:00" + "time": "2026-05-20T13:05:30+00:00" }, { "name": "utopia-php/fetch", @@ -4346,16 +4346,16 @@ }, { "name": "utopia-php/http", - "version": "2.0.0-rc1", + "version": "2.0.0-rc2", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "3e3b431d443844c6bf810120dee735f45880856f" + "reference": "17f3d5e966ada8a5c041717436f069f269aef2b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/3e3b431d443844c6bf810120dee735f45880856f", - "reference": "3e3b431d443844c6bf810120dee735f45880856f", + "url": "https://api.github.com/repos/utopia-php/http/zipball/17f3d5e966ada8a5c041717436f069f269aef2b3", + "reference": "17f3d5e966ada8a5c041717436f069f269aef2b3", "shasum": "" }, "require": { @@ -4396,9 +4396,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/2.0.0-rc1" + "source": "https://github.com/utopia-php/http/tree/2.0.0-rc2" }, - "time": "2026-05-05T15:00:03+00:00" + "time": "2026-05-20T11:13:49+00:00" }, { "name": "utopia-php/image", @@ -5638,16 +5638,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.31.0", + "version": "1.31.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "a7119db15696131a86d477b3bed348beda85523f" + "reference": "5699f6da951aef9378fabdcf12f40a9a54fb3128" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/a7119db15696131a86d477b3bed348beda85523f", - "reference": "a7119db15696131a86d477b3bed348beda85523f", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5699f6da951aef9378fabdcf12f40a9a54fb3128", + "reference": "5699f6da951aef9378fabdcf12f40a9a54fb3128", "shasum": "" }, "require": { @@ -5656,7 +5656,7 @@ "ext-mbstring": "*", "matthiasmullie/minify": "1.3.*", "php": ">=8.3", - "twig/twig": "3.14.*" + "twig/twig": "3.26.*" }, "require-dev": { "brianium/paratest": "7.*", @@ -5683,9 +5683,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.31.0" + "source": "https://github.com/appwrite/sdk-generator/tree/1.31.1" }, - "time": "2026-05-20T11:16:09+00:00" + "time": "2026-05-20T22:22:59+00:00" }, { "name": "brianium/paratest", @@ -6951,16 +6951,16 @@ }, { "name": "sebastian/comparator", - "version": "7.1.6", + "version": "7.1.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "c769009dee98f494e0edc3fd4f4087501688f11e" + "reference": "0ed818fb2660fd80d71fbb982c80153bba8da7ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c769009dee98f494e0edc3fd4f4087501688f11e", - "reference": "c769009dee98f494e0edc3fd4f4087501688f11e", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/0ed818fb2660fd80d71fbb982c80153bba8da7ef", + "reference": "0ed818fb2660fd80d71fbb982c80153bba8da7ef", "shasum": "" }, "require": { @@ -6968,10 +6968,10 @@ "ext-mbstring": "*", "php": ">=8.3", "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" + "sebastian/exporter": "^7.0.3" }, "require-dev": { - "phpunit/phpunit": "^12.2" + "phpunit/phpunit": "^12.5.25" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" @@ -7019,7 +7019,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.7" }, "funding": [ { @@ -7039,7 +7039,7 @@ "type": "tidelift" } ], - "time": "2026-04-14T08:23:15+00:00" + "time": "2026-05-20T11:50:17+00:00" }, { "name": "sebastian/complexity", @@ -8213,86 +8213,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php81", - "version": "v1.37.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/process", "version": "v8.0.11", @@ -8549,26 +8469,27 @@ }, { "name": "twig/twig", - "version": "3.14.x-dev", + "version": "v3.26.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" + "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", - "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/1fcae487b180d78e6351f4e0afa91f9eab96a2bc", + "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { + "php-cs-fixer/shim": "^3.0@stable", + "phpstan/phpstan": "^2.0@stable", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -8612,7 +8533,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.14.2" + "source": "https://github.com/twigphp/Twig/tree/v3.26.0" }, "funding": [ { @@ -8624,7 +8545,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T12:36:22+00:00" + "time": "2026-05-20T07:31:59+00:00" } ], "aliases": [], From 52d7ebd41ebc97273fe06e3c2a9568e3c3484b3f Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 21 May 2026 10:59:37 +1200 Subject: [PATCH 189/192] chore: revert to 2.0.0-rc.1 --- composer.json | 2 +- composer.lock | 147 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 113 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index d4472c6868..34a0238b7a 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "utopia-php/emails": "0.7.*", "utopia-php/dns": "1.7.*", "utopia-php/dsn": "0.2.1", - "utopia-php/http": "^2.0@RC", + "utopia-php/http": "2.0.0-rc1", "utopia-php/fetch": "^1.1", "utopia-php/validators": "0.2.*", "utopia-php/image": "0.8.*", diff --git a/composer.lock b/composer.lock index 5be223d686..8145a642cc 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": "b645c7da1728536497fe8186b158f9c6", + "content-hash": "597066d71be48add0c649828d820a505", "packages": [ { "name": "adhocore/jwt", @@ -4346,16 +4346,16 @@ }, { "name": "utopia-php/http", - "version": "2.0.0-rc2", + "version": "2.0.0-rc1", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "17f3d5e966ada8a5c041717436f069f269aef2b3" + "reference": "3e3b431d443844c6bf810120dee735f45880856f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/17f3d5e966ada8a5c041717436f069f269aef2b3", - "reference": "17f3d5e966ada8a5c041717436f069f269aef2b3", + "url": "https://api.github.com/repos/utopia-php/http/zipball/3e3b431d443844c6bf810120dee735f45880856f", + "reference": "3e3b431d443844c6bf810120dee735f45880856f", "shasum": "" }, "require": { @@ -4396,9 +4396,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/2.0.0-rc2" + "source": "https://github.com/utopia-php/http/tree/2.0.0-rc1" }, - "time": "2026-05-20T11:13:49+00:00" + "time": "2026-05-05T15:00:03+00:00" }, { "name": "utopia-php/image", @@ -5638,16 +5638,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.31.1", + "version": "1.31.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "5699f6da951aef9378fabdcf12f40a9a54fb3128" + "reference": "a7119db15696131a86d477b3bed348beda85523f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5699f6da951aef9378fabdcf12f40a9a54fb3128", - "reference": "5699f6da951aef9378fabdcf12f40a9a54fb3128", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/a7119db15696131a86d477b3bed348beda85523f", + "reference": "a7119db15696131a86d477b3bed348beda85523f", "shasum": "" }, "require": { @@ -5656,7 +5656,7 @@ "ext-mbstring": "*", "matthiasmullie/minify": "1.3.*", "php": ">=8.3", - "twig/twig": "3.26.*" + "twig/twig": "3.14.*" }, "require-dev": { "brianium/paratest": "7.*", @@ -5683,9 +5683,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.31.1" + "source": "https://github.com/appwrite/sdk-generator/tree/1.31.0" }, - "time": "2026-05-20T22:22:59+00:00" + "time": "2026-05-20T11:16:09+00:00" }, { "name": "brianium/paratest", @@ -6951,16 +6951,16 @@ }, { "name": "sebastian/comparator", - "version": "7.1.7", + "version": "7.1.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "0ed818fb2660fd80d71fbb982c80153bba8da7ef" + "reference": "c769009dee98f494e0edc3fd4f4087501688f11e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/0ed818fb2660fd80d71fbb982c80153bba8da7ef", - "reference": "0ed818fb2660fd80d71fbb982c80153bba8da7ef", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c769009dee98f494e0edc3fd4f4087501688f11e", + "reference": "c769009dee98f494e0edc3fd4f4087501688f11e", "shasum": "" }, "require": { @@ -6968,10 +6968,10 @@ "ext-mbstring": "*", "php": ">=8.3", "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0.3" + "sebastian/exporter": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^12.5.25" + "phpunit/phpunit": "^12.2" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" @@ -7019,7 +7019,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.7" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.6" }, "funding": [ { @@ -7039,7 +7039,7 @@ "type": "tidelift" } ], - "time": "2026-05-20T11:50:17+00:00" + "time": "2026-04-14T08:23:15+00:00" }, { "name": "sebastian/complexity", @@ -8213,6 +8213,86 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, { "name": "symfony/process", "version": "v8.0.11", @@ -8469,27 +8549,26 @@ }, { "name": "twig/twig", - "version": "v3.26.0", + "version": "3.14.x-dev", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc" + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/1fcae487b180d78e6351f4e0afa91f9eab96a2bc", - "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", "shasum": "" }, "require": { - "php": ">=8.1.0", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php81": "^1.29" }, "require-dev": { - "php-cs-fixer/shim": "^3.0@stable", - "phpstan/phpstan": "^2.0@stable", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -8533,7 +8612,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.26.0" + "source": "https://github.com/twigphp/Twig/tree/v3.14.2" }, "funding": [ { @@ -8545,14 +8624,12 @@ "type": "tidelift" } ], - "time": "2026-05-20T07:31:59+00:00" + "time": "2024-11-07T12:36:22+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "utopia-php/http": 5 - }, + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { From c6ac0f28e4a99e5ee3aba317528f3b917fdd3e9a Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 21 May 2026 12:16:06 +1200 Subject: [PATCH 190/192] chore: restore twig security update --- composer.lock | 113 ++++++++------------------------------------------ 1 file changed, 17 insertions(+), 96 deletions(-) diff --git a/composer.lock b/composer.lock index 8145a642cc..a0a687d8ae 100644 --- a/composer.lock +++ b/composer.lock @@ -5638,16 +5638,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.31.0", + "version": "1.31.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "a7119db15696131a86d477b3bed348beda85523f" + "reference": "5699f6da951aef9378fabdcf12f40a9a54fb3128" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/a7119db15696131a86d477b3bed348beda85523f", - "reference": "a7119db15696131a86d477b3bed348beda85523f", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5699f6da951aef9378fabdcf12f40a9a54fb3128", + "reference": "5699f6da951aef9378fabdcf12f40a9a54fb3128", "shasum": "" }, "require": { @@ -5656,7 +5656,7 @@ "ext-mbstring": "*", "matthiasmullie/minify": "1.3.*", "php": ">=8.3", - "twig/twig": "3.14.*" + "twig/twig": "3.26.*" }, "require-dev": { "brianium/paratest": "7.*", @@ -5683,9 +5683,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.31.0" + "source": "https://github.com/appwrite/sdk-generator/tree/1.31.1" }, - "time": "2026-05-20T11:16:09+00:00" + "time": "2026-05-20T22:22:59+00:00" }, { "name": "brianium/paratest", @@ -8213,86 +8213,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php81", - "version": "v1.37.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/process", "version": "v8.0.11", @@ -8549,26 +8469,27 @@ }, { "name": "twig/twig", - "version": "3.14.x-dev", + "version": "v3.26.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" + "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", - "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/1fcae487b180d78e6351f4e0afa91f9eab96a2bc", + "reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { + "php-cs-fixer/shim": "^3.0@stable", + "phpstan/phpstan": "^2.0@stable", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -8612,7 +8533,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.14.2" + "source": "https://github.com/twigphp/Twig/tree/v3.26.0" }, "funding": [ { @@ -8624,7 +8545,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T12:36:22+00:00" + "time": "2026-05-20T07:31:59+00:00" } ], "aliases": [], From fd145e988ad47699441d0b1f0823db12aa9ab823 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 21 May 2026 12:18:11 +1200 Subject: [PATCH 191/192] test: align versions endpoint expectations --- tests/e2e/General/HTTPTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index 450e4f2378..0358281eb7 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -101,7 +101,7 @@ class HTTPTest extends Scope $body = $response['body']; $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsString($body['server']); - $this->assertIsString($body['client-web']); + $this->assertIsString($body['server-web']); $this->assertIsString($body['client-flutter']); $this->assertIsString($body['console-web']); $this->assertIsString($body['server-nodejs']); From 349ac6bbc13c4f3075a1fa0be94360936a68fec1 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 21 May 2026 16:47:45 +1200 Subject: [PATCH 192/192] test: stabilize account log pagination --- .../Account/AccountCustomClientTest.php | 166 ++++++++---------- 1 file changed, 72 insertions(+), 94 deletions(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 160ee39e21..5b0d947198 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -1026,123 +1026,101 @@ class AccountCustomClientTest extends Scope // Use fresh account for predictable log count $data = $this->createFreshAccountWithSession(); $session = $data['session']; + $headers = array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ]); /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, - ])); + $this->assertEventually(function () use ($headers) { + $response = $this->client->call(Client::METHOD_GET, '/account/logs', $headers); - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertIsArray($response['body']['logs']); - $this->assertNotEmpty($response['body']['logs']); - // Fresh account: session.create is always logged. user.create audit may or may not - // be present depending on async audit processing timing. - $logCount = count($response['body']['logs']); - $this->assertContains($logCount, [1, 2]); - $this->assertIsNumeric($response['body']['total']); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsArray($response['body']['logs']); + $this->assertNotEmpty($response['body']['logs']); + $logCount = count($response['body']['logs']); + $this->assertContains($logCount, [1, 2]); + $this->assertIsNumeric($response['body']['total']); - // Check session.create log (logs[0] - most recent) - $this->assertEquals('Windows', $response['body']['logs'][0]['osName']); - $this->assertEquals('WIN', $response['body']['logs'][0]['osCode']); - $this->assertEquals('10', $response['body']['logs'][0]['osVersion']); + $this->assertEquals('session.create', $response['body']['logs'][0]['event']); + $this->assertEquals('Windows', $response['body']['logs'][0]['osName']); + $this->assertEquals('WIN', $response['body']['logs'][0]['osCode']); + $this->assertEquals('10', $response['body']['logs'][0]['osVersion']); - $this->assertEquals('browser', $response['body']['logs'][0]['clientType']); - $this->assertEquals('Chrome', $response['body']['logs'][0]['clientName']); - $this->assertEquals('CH', $response['body']['logs'][0]['clientCode']); - $this->assertEquals('70.0', $response['body']['logs'][0]['clientVersion']); - $this->assertEquals('Blink', $response['body']['logs'][0]['clientEngine']); + $this->assertEquals('browser', $response['body']['logs'][0]['clientType']); + $this->assertEquals('Chrome', $response['body']['logs'][0]['clientName']); + $this->assertEquals('CH', $response['body']['logs'][0]['clientCode']); + $this->assertEquals('70.0', $response['body']['logs'][0]['clientVersion']); + $this->assertEquals('Blink', $response['body']['logs'][0]['clientEngine']); - $this->assertEquals('desktop', $response['body']['logs'][0]['deviceName']); - $this->assertEquals('', $response['body']['logs'][0]['deviceBrand']); - $this->assertEquals('', $response['body']['logs'][0]['deviceModel']); - $this->assertEquals(filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP), $response['body']['logs'][0]['ip']); + $this->assertEquals('desktop', $response['body']['logs'][0]['deviceName']); + $this->assertEquals('', $response['body']['logs'][0]['deviceBrand']); + $this->assertEquals('', $response['body']['logs'][0]['deviceModel']); + $this->assertEquals(filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP), $response['body']['logs'][0]['ip']); - $this->assertEquals('--', $response['body']['logs'][0]['countryCode']); - $this->assertEquals('Unknown', $response['body']['logs'][0]['countryName']); + $this->assertEquals('--', $response['body']['logs'][0]['countryCode']); + $this->assertEquals('Unknown', $response['body']['logs'][0]['countryName']); - if ($logCount === 2) { - // Check user.create log (logs[1] - oldest) - $this->assertEquals('user.create', $response['body']['logs'][1]['event']); - $this->assertEquals(filter_var($response['body']['logs'][1]['ip'], FILTER_VALIDATE_IP), $response['body']['logs'][1]['ip']); - $this->assertTrue((new DatetimeValidator())->isValid($response['body']['logs'][1]['time'])); - } + if ($logCount === 2) { + $this->assertEquals('user.create', $response['body']['logs'][1]['event']); + $this->assertEquals(filter_var($response['body']['logs'][1]['ip'], FILTER_VALIDATE_IP), $response['body']['logs'][1]['ip']); + $this->assertTrue((new DatetimeValidator())->isValid($response['body']['logs'][1]['time'])); + } - $responseLimit = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, - ]), [ - 'queries' => [ - Query::limit(1)->toString() - ] - ]); + $responseLimit = $this->client->call(Client::METHOD_GET, '/account/logs', $headers, [ + 'queries' => [ + Query::limit(1)->toString() + ] + ]); - $this->assertEquals(200, $responseLimit['headers']['status-code']); - $this->assertIsArray($responseLimit['body']['logs']); - $this->assertNotEmpty($responseLimit['body']['logs']); - $this->assertCount(1, $responseLimit['body']['logs']); - $this->assertIsNumeric($responseLimit['body']['total']); + $this->assertEquals(200, $responseLimit['headers']['status-code']); + $this->assertIsArray($responseLimit['body']['logs']); + $this->assertNotEmpty($responseLimit['body']['logs']); + $this->assertCount(1, $responseLimit['body']['logs']); + $this->assertIsNumeric($responseLimit['body']['total']); - $this->assertEquals($response['body']['logs'][0], $responseLimit['body']['logs'][0]); + $this->assertEquals($response['body']['logs'][0], $responseLimit['body']['logs'][0]); - $responseOffset = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, - ]), [ - 'queries' => [ - Query::offset(1)->toString() - ] - ]); + $responseOffset = $this->client->call(Client::METHOD_GET, '/account/logs', $headers, [ + 'queries' => [ + Query::offset(1)->toString() + ] + ]); - $this->assertEquals($responseOffset['headers']['status-code'], 200); - $this->assertIsArray($responseOffset['body']['logs']); - // With offset(1), remaining logs = logCount - 1 - $this->assertCount($logCount - 1, $responseOffset['body']['logs']); - $this->assertIsNumeric($responseOffset['body']['total']); + $this->assertEquals(200, $responseOffset['headers']['status-code']); + $this->assertIsArray($responseOffset['body']['logs']); + $this->assertCount($logCount - 1, $responseOffset['body']['logs']); + $this->assertIsNumeric($responseOffset['body']['total']); - if ($logCount === 2) { - $this->assertEquals($response['body']['logs'][1], $responseOffset['body']['logs'][0]); - } + if ($logCount === 2) { + $this->assertEquals($response['body']['logs'][1], $responseOffset['body']['logs'][0]); + } - $responseLimitOffset = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, - ]), [ - 'queries' => [ - Query::offset(1)->toString(), - Query::limit(1)->toString() - ] - ]); + $responseLimitOffset = $this->client->call(Client::METHOD_GET, '/account/logs', $headers, [ + 'queries' => [ + Query::offset(1)->toString(), + Query::limit(1)->toString() + ] + ]); - $this->assertEquals(200, $responseLimitOffset['headers']['status-code']); - $this->assertIsArray($responseLimitOffset['body']['logs']); - // With offset(1)+limit(1), remaining logs = min(1, logCount - 1) - $this->assertCount(min(1, $logCount - 1), $responseLimitOffset['body']['logs']); - $this->assertIsNumeric($responseLimitOffset['body']['total']); + $this->assertEquals(200, $responseLimitOffset['headers']['status-code']); + $this->assertIsArray($responseLimitOffset['body']['logs']); + $this->assertCount(min(1, $logCount - 1), $responseLimitOffset['body']['logs']); + $this->assertIsNumeric($responseLimitOffset['body']['total']); - if ($logCount === 2) { - $this->assertEquals($response['body']['logs'][1], $responseLimitOffset['body']['logs'][0]); - } + if ($logCount === 2) { + $this->assertEquals($response['body']['logs'][1], $responseLimitOffset['body']['logs'][0]); + } + }); /** * Test for total=false */ - $logsWithIncludeTotalFalse = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, - ]), [ + $logsWithIncludeTotalFalse = $this->client->call(Client::METHOD_GET, '/account/logs', $headers, [ 'total' => false ]);